diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index fe3876435755d0..7418a53ef5fc67 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 66ae3a04488447..ac717ef1e7b245 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -135,7 +135,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -283,7 +283,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -343,7 +343,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --sysctl "net.ipv6.conf.all.disable_ipv6=0 @@ -451,7 +451,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index abb438c004fa76..e68021d143fa59 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 options: --user root steps: @@ -54,7 +54,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:25 + image: ghcr.io/project-chip/chip-build-esp32:26 options: --user root steps: @@ -75,7 +75,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:25 + image: ghcr.io/project-chip/chip-build-nrf-platform:26 options: --user root steps: @@ -96,7 +96,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:25 + image: ghcr.io/project-chip/chip-build-telink:26 options: --user root steps: diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 8a869f9577928f..a8d18c5dec9d85 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -40,7 +40,7 @@ jobs: # need to run with privilege, which isn't supported by job.XXX.contaner # https://github.com/actions/container-action/issues/2 # container: - # image: ghcr.io/project-chip/chip-build-cirque:25 + # image: ghcr.io/project-chip/chip-build-cirque:26 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 4dcee19d7ee344..e89d26c1c335d4 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:25 + image: ghcr.io/project-chip/chip-build-doxygen:26 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 90d707b2a6ccc4..ac1e6d01fde353 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:25 + image: ghcr.io/project-chip/chip-build-ameba:26 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index f49c6d10f86dfd..918a5e0e67bd49 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:25 + image: ghcr.io/project-chip/chip-build-asr:26 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index fdaba18c3a06a0..0efaf4831a91b0 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:25 + image: ghcr.io/project-chip/chip-build-bouffalolab:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 77371b836fe571..c2ad4bfef8b2a8 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:25 + image: ghcr.io/project-chip/chip-build-ti:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 5e8ac6d3f5809d..a3a17188ae677d 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:25 + image: ghcr.io/project-chip/chip-build-ti:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 65cec1c0fc5200..83c66dcf6e7bfe 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:25 + image: ghcr.io/project-chip/chip-build-efr32:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 11a808306a33e9..48ffb63425f611 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:25 + image: ghcr.io/project-chip/chip-build-esp32:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -130,7 +130,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:25 + image: ghcr.io/project-chip/chip-build-esp32:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 783d13352aa8c8..4ea2a28f61cc6f 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:25 + image: ghcr.io/project-chip/chip-build-infineon:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 53bfc177199839..5d811a986c757a 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:25 + image: ghcr.io/project-chip/chip-build-k32w:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 589069998d6e69..c49b8d84d75fdc 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:25 + image: ghcr.io/project-chip/chip-build-crosscompile:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 69b64649d20451..f5aaa654af9295 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:25 + image: ghcr.io/project-chip/chip-build-imx:26 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 76391d188a219c..4845ce0b235567 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 8d680b52bdb31f..7ecdfdb6f8a41f 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-mbed-os:25 + image: ghcr.io/project-chip/chip-build-mbed-os:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 16ac5114070c5e..6f87859071cb8b 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index dc09d6f433abba..c8495aad304a60 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:25 + image: ghcr.io/project-chip/chip-build-nrf-platform:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index a61d68d8d4f9e8..f468341b0b84b1 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:25 + image: ghcr.io/project-chip/chip-build-openiotsdk:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index a1bc1d47dffad4..027aaa80c18a87 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index f9455c54b38d83..6da7ccd697fe06 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 92cb016442b6df..4af591a58c91f0 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:25 + image: ghcr.io/project-chip/chip-build-telink:26 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -151,13 +151,13 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92 retention) Lock App with DFU + - name: Build example Telink (B92) Lock App with DFU run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-lock-dfu' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9528a-lock-dfu' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a_retention lock-app-dfu \ - out/telink-tlsr9528a_retention-lock-dfu/zephyr/zephyr.elf \ + telink tlsr9528a lock-app-dfu \ + out/telink-tlsr9528a-lock-dfu/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output @@ -235,13 +235,13 @@ jobs: - name: clean out build output run: rm -rf ./out - - name: Build example Telink (B92 retention) Temperature Measurement App + - name: Build example Telink (B91 Mars) Temperature Measurement App with OTA run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --target 'telink-tlsr9528a_retention-temperature-measurement' build" + "./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-temperature-measurement-mars-ota' build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - telink tlsr9528a_retention temperature-measurement-app \ - out/telink-tlsr9528a_retention-temperature-measurement/zephyr/zephyr.elf \ + telink tlsr9518adk80d temperature-measurement-app-mars-ota \ + out/telink-tlsr9518adk80d-temperature-measurement-mars-ota/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: clean out build output diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index ed3886f31b2b43..807491dc2e5871 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:25 + image: ghcr.io/project-chip/chip-build-tizen:26 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 d34876e1f5f4f4..2cb3cc1d48e7da 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:25 + image: ghcr.io/project-chip/chip-build-android:26 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 007fde6ec94a9a..687ff3c9a5e404 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:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index 69d81fedb80224..9e800ba2e7ef99 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:25 + image: ghcr.io/project-chip/chip-build-java:26 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 1be3fe8d2a3c10..f7f691c7568250 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 steps: - name: Checkout @@ -99,6 +99,19 @@ jobs: run: | git grep -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0 + # git grep exits with 0 if it finds a match, but we want + # to fail (exit nonzero) on match. And we want to exclude this file, + # to avoid our grep regexp matching itself. + - name: Check for use of PRI*64, which are not supported on some libcs. + if: always() + run: | + # TODO: MessageDefHelper should ideally not be excluded here. + # TODO: chip_im_initiatore should ideally not be excluded here. + # TODO: TLVDebug should ideally not be excluded here. + # TODO: protocol_decoder.cpp should ideally not be excluded here. + # TODO: PersistentStorageMacros.h should ideally not be excluded here. + git grep -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0 + # git grep exits with 0 if it finds a match, but we want # to fail (exit nonzero) on match. And we want to exclude this file, # to avoid our grep regexp matching itself. diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 82f6667c95f54d..58a1a67e180115 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:25 + image: ghcr.io/project-chip/chip-build-minimal:26 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index e1e221ab2d5b7e..a45534cc2f15bb 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:25 + image: ghcr.io/project-chip/chip-build-esp32-qemu:26 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -76,7 +76,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:25 + image: ghcr.io/project-chip/chip-build-tizen-qemu:26 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index c3feed075eb27e..903c8d0acf0051 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:25 + image: ghcr.io/project-chip/chip-build-esp32:26 steps: - name: Checkout @@ -68,7 +68,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:25 + image: ghcr.io/project-chip/chip-build-efr32:26 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 969f6c6fd72da3..7791b230f5b037 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:25 + image: ghcr.io/project-chip/chip-build-android:26 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index cf81c997065c0c..74ae921d929a54 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -144,6 +144,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \ @@ -411,7 +412,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 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 ae2bdb82fc0b65..0896aa4ff3a75e 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 volumes: - "/tmp/log_output:/tmp/test_logs" options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 02994409014617..7ab698049dfb08 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:25 + image: ghcr.io/project-chip/chip-build:26 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 0747c1da0f877d..61b6ddea5b807d 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:25 + image: ghcr.io/project-chip/chip-build:26 defaults: run: shell: sh diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 371df3b0e1ee60..8822dafadbe2db 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,82 +2,142 @@ This Project CHIP Open Source Code of Conduct applies to all those contributing to, participating in, or maintaining the Project CHIP open source project, -including Zigbee Alliance members and non-members. +including Connectivity Standards Alliance members and non-members. + +# Contributor Covenant Code of Conduct ## Our Pledge -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and our +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and -expression, level of experience, education, socio-economic status, nationality, -personal appearance, race, religion, or sexual identity and orientation. +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. ## Our Standards -Examples of behavior that contributes to creating a positive environment -include: +Examples of behavior that contributes to a positive environment for our +community include: -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community +- Respecting people's privacy and private product plans -Examples of unacceptable behavior by participants include: +Examples of unacceptable behavior include: -- The use of violent threats, abusive, discriminatory, or derogatory language -- The use of sexualized language or imagery and unwelcome sexual attention or - advances -- Trolling, insulting/derogatory comments, and personal or political attacks +- The use of sexualized language or imagery, and sexual attention or advances + of any kind +- Trolling, insulting or derogatory comments, and personal or political + attacks - Public or private harassment -- Publishing others' private information, such as a physical or electronic - address, without explicit permission -- Posting of violent content -- Engaging in unwanted physical contact +- Publishing others' private information, such as a physical or email address, + without their explicit permission - Other conduct which could reasonably be considered inappropriate in a professional setting -- Advocating for or encouraging any of the above behaviors +- Disclosure of private information, unreleased products +- Disclosure of unreleased specification information outside of Connectivity + Standards Alliance approved forums + +## Enforcement Responsibilities -## Our Responsibilities +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. -Project maintainers are expected to take appropriate and fair corrective action -in response to any instances of unacceptable behavior. Project maintainers have -the right and responsibility to remove, edit, or reject comments, commits, code, -wiki edits, issues, and other contributions that are not aligned to this Code of -Conduct, or to ban temporarily or permanently any contributor for other -behaviors that they deem inappropriate, threatening, offensive, or harmful. +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. ## Scope -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the Project CHIP open source team at [INSERT EMAIL -ADDRESS]. All complaints will be reviewed and investigated and will result in a -response that is deemed necessary and appropriate to the circumstances. The -Project CHIP open source team should maintain confidentiality with regard to the -reporter of an incident. Further details of specific enforcement policies may be -posted separately. +reported to the community leaders responsible for enforcement at +help@csa-iot.org. All submissions will be reviewed and investigated promptly and +fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by Project -CHIP open source leadership. +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 1.4, available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. -[homepage]: https://www.contributor-covenant.org +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder][mozilla coc]. -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][faq]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[mozilla coc]: https://github.com/mozilla/diversity +[faq]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/config/nrfconnect/chip-module/Kconfig.defaults b/config/nrfconnect/chip-module/Kconfig.defaults index 49a219eacdd491..8684adb2be3c52 100644 --- a/config/nrfconnect/chip-module/Kconfig.defaults +++ b/config/nrfconnect/chip-module/Kconfig.defaults @@ -341,9 +341,6 @@ config MBEDTLS_ENABLE_HEAP config MBEDTLS_HEAP_SIZE default 8192 -config MBEDTLS_TLS_LIBRARY - default y - config NRF_SECURITY_ADVANCED default y @@ -362,9 +359,6 @@ config MBEDTLS_CTR_DRBG_C config MBEDTLS_CIPHER_MODE_CTR default y -config MBEDTLS_ECJPAKE_C - default y - config MBEDTLS_SHA256_C default y diff --git a/data_model/clusters/KeypadInput.xml b/data_model/clusters/KeypadInput.xml index 7179ae676b65fe..30936891c6c71d 100644 --- a/data_model/clusters/KeypadInput.xml +++ b/data_model/clusters/KeypadInput.xml @@ -72,7 +72,7 @@ Davis, CA 95616, USA - + @@ -348,7 +348,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/device_types/Aggregator.xml b/data_model/device_types/Aggregator.xml new file mode 100644 index 00000000000000..3f70f3d78ccb4b --- /dev/null +++ b/data_model/device_types/Aggregator.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/clusters/Mode_LaundryWasher.xml b/data_model/device_types/AirPurifier.xml similarity index 75% rename from data_model/clusters/Mode_LaundryWasher.xml rename to data_model/device_types/AirPurifier.xml index 96190a4009850c..9793cd1d36b215 100644 --- a/data_model/clusters/Mode_LaundryWasher.xml +++ b/data_model/device_types/AirPurifier.xml @@ -55,37 +55,27 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + - - - - - - - - - - - - - - - - - + + + + - - + + + + + + + + + + + - - - - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/data_model/device_types/AirQualitySensor.xml b/data_model/device_types/AirQualitySensor.xml new file mode 100644 index 00000000000000..0c96fbd60515b7 --- /dev/null +++ b/data_model/device_types/AirQualitySensor.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BaseDeviceType.xml b/data_model/device_types/BaseDeviceType.xml new file mode 100644 index 00000000000000..22cec956aa6061 --- /dev/null +++ b/data_model/device_types/BaseDeviceType.xml @@ -0,0 +1,65 @@ + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BasicVideoPlayer.xml b/data_model/device_types/BasicVideoPlayer.xml new file mode 100644 index 00000000000000..f6b86091004bfe --- /dev/null +++ b/data_model/device_types/BasicVideoPlayer.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BooleanSensor.xml b/data_model/device_types/BooleanSensor.xml new file mode 100644 index 00000000000000..185fdc47176813 --- /dev/null +++ b/data_model/device_types/BooleanSensor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/BridgedNode.xml b/data_model/device_types/BridgedNode.xml new file mode 100644 index 00000000000000..a383ed2b541d6b --- /dev/null +++ b/data_model/device_types/BridgedNode.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CastingVideoClient.xml b/data_model/device_types/CastingVideoClient.xml new file mode 100644 index 00000000000000..06ef2b5492f337 --- /dev/null +++ b/data_model/device_types/CastingVideoClient.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CastingVideoPlayer.xml b/data_model/device_types/CastingVideoPlayer.xml new file mode 100644 index 00000000000000..fd26bb675cbdf6 --- /dev/null +++ b/data_model/device_types/CastingVideoPlayer.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ColorDimmerSwitch.xml b/data_model/device_types/ColorDimmerSwitch.xml new file mode 100644 index 00000000000000..dcd2ac18b1a912 --- /dev/null +++ b/data_model/device_types/ColorDimmerSwitch.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ColorTemperatureLight.xml b/data_model/device_types/ColorTemperatureLight.xml new file mode 100644 index 00000000000000..5897f0ee0b796a --- /dev/null +++ b/data_model/device_types/ColorTemperatureLight.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ContactSensor.xml b/data_model/device_types/ContactSensor.xml new file mode 100644 index 00000000000000..e8a7c3f343a9f4 --- /dev/null +++ b/data_model/device_types/ContactSensor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ContentApp.xml b/data_model/device_types/ContentApp.xml new file mode 100644 index 00000000000000..8f927c48f44a35 --- /dev/null +++ b/data_model/device_types/ContentApp.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ControlBridge.xml b/data_model/device_types/ControlBridge.xml new file mode 100644 index 00000000000000..6ed528c0122d96 --- /dev/null +++ b/data_model/device_types/ControlBridge.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/CookSurface.xml b/data_model/device_types/CookSurface.xml new file mode 100644 index 00000000000000..34f5556234a6e5 --- /dev/null +++ b/data_model/device_types/CookSurface.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Cooktop.xml b/data_model/device_types/Cooktop.xml new file mode 100644 index 00000000000000..8288f38c8a87ba --- /dev/null +++ b/data_model/device_types/Cooktop.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmableLight.xml b/data_model/device_types/DimmableLight.xml new file mode 100644 index 00000000000000..39f193f53e7553 --- /dev/null +++ b/data_model/device_types/DimmableLight.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmablePlug-InUnit.xml b/data_model/device_types/DimmablePlug-InUnit.xml new file mode 100644 index 00000000000000..c262abf3741d7e --- /dev/null +++ b/data_model/device_types/DimmablePlug-InUnit.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DimmerSwitch.xml b/data_model/device_types/DimmerSwitch.xml new file mode 100644 index 00000000000000..a3bae868a2498b --- /dev/null +++ b/data_model/device_types/DimmerSwitch.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Dishwasher.xml b/data_model/device_types/Dishwasher.xml new file mode 100644 index 00000000000000..429e96c149abe9 --- /dev/null +++ b/data_model/device_types/Dishwasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DoorLock.xml b/data_model/device_types/DoorLock.xml new file mode 100644 index 00000000000000..d31aaad30d8d98 --- /dev/null +++ b/data_model/device_types/DoorLock.xml @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/DoorLockController.xml b/data_model/device_types/DoorLockController.xml new file mode 100644 index 00000000000000..4f4efb3ea90d1c --- /dev/null +++ b/data_model/device_types/DoorLockController.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EVSE.xml b/data_model/device_types/EVSE.xml new file mode 100644 index 00000000000000..b5e57c83aa3ac1 --- /dev/null +++ b/data_model/device_types/EVSE.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EnergyTariff.xml b/data_model/device_types/EnergyTariff.xml new file mode 100644 index 00000000000000..9e6e0b4c12ab36 --- /dev/null +++ b/data_model/device_types/EnergyTariff.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/EnergyTariffCalendar.xml b/data_model/device_types/EnergyTariffCalendar.xml new file mode 100644 index 00000000000000..3dca889b777e66 --- /dev/null +++ b/data_model/device_types/EnergyTariffCalendar.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ExtendedColorLight.xml b/data_model/device_types/ExtendedColorLight.xml new file mode 100644 index 00000000000000..4120226176e7a1 --- /dev/null +++ b/data_model/device_types/ExtendedColorLight.xml @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ExtractorHood.xml b/data_model/device_types/ExtractorHood.xml new file mode 100644 index 00000000000000..5fdbc7c84a1583 --- /dev/null +++ b/data_model/device_types/ExtractorHood.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Fan.xml b/data_model/device_types/Fan.xml new file mode 100644 index 00000000000000..49538ec32097b6 --- /dev/null +++ b/data_model/device_types/Fan.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/FlowSensor.xml b/data_model/device_types/FlowSensor.xml new file mode 100644 index 00000000000000..8c604586481536 --- /dev/null +++ b/data_model/device_types/FlowSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/GenericSwitch.xml b/data_model/device_types/GenericSwitch.xml new file mode 100644 index 00000000000000..7e13a7e18223ab --- /dev/null +++ b/data_model/device_types/GenericSwitch.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/HeatingCoolingUnit.xml b/data_model/device_types/HeatingCoolingUnit.xml new file mode 100644 index 00000000000000..244ff14b0a15fa --- /dev/null +++ b/data_model/device_types/HeatingCoolingUnit.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/HumiditySensor.xml b/data_model/device_types/HumiditySensor.xml new file mode 100644 index 00000000000000..d59ed7caf43abe --- /dev/null +++ b/data_model/device_types/HumiditySensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LaundryDryer.xml b/data_model/device_types/LaundryDryer.xml new file mode 100644 index 00000000000000..a7d365f22e14fe --- /dev/null +++ b/data_model/device_types/LaundryDryer.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LaundryWasher.xml b/data_model/device_types/LaundryWasher.xml new file mode 100644 index 00000000000000..07cd62a605fc9c --- /dev/null +++ b/data_model/device_types/LaundryWasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/LightSensor.xml b/data_model/device_types/LightSensor.xml new file mode 100644 index 00000000000000..618901b398b5f8 --- /dev/null +++ b/data_model/device_types/LightSensor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/MicrowaveOven.xml b/data_model/device_types/MicrowaveOven.xml new file mode 100644 index 00000000000000..8e77925b4131fc --- /dev/null +++ b/data_model/device_types/MicrowaveOven.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ModeSelectDeviceType.xml b/data_model/device_types/ModeSelectDeviceType.xml new file mode 100644 index 00000000000000..748dc1bae2f0a3 --- /dev/null +++ b/data_model/device_types/ModeSelectDeviceType.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/NetworkInfraIntro.xml b/data_model/device_types/NetworkInfraIntro.xml new file mode 100644 index 00000000000000..22d91b6f459c6d --- /dev/null +++ b/data_model/device_types/NetworkInfraIntro.xml @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/data_model/device_types/NetworkInfraManager.xml b/data_model/device_types/NetworkInfraManager.xml new file mode 100644 index 00000000000000..750a97f22cad86 --- /dev/null +++ b/data_model/device_types/NetworkInfraManager.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OccupancySensor.xml b/data_model/device_types/OccupancySensor.xml new file mode 100644 index 00000000000000..bef470cc1c9ec6 --- /dev/null +++ b/data_model/device_types/OccupancySensor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffLight.xml b/data_model/device_types/OnOffLight.xml new file mode 100644 index 00000000000000..1ce39e8545c84a --- /dev/null +++ b/data_model/device_types/OnOffLight.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffLightSwitch.xml b/data_model/device_types/OnOffLightSwitch.xml new file mode 100644 index 00000000000000..c2c324c8ee5d2a --- /dev/null +++ b/data_model/device_types/OnOffLightSwitch.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffPlug-inUnit.xml b/data_model/device_types/OnOffPlug-inUnit.xml new file mode 100644 index 00000000000000..1847119e49426c --- /dev/null +++ b/data_model/device_types/OnOffPlug-inUnit.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OnOffSensor.xml b/data_model/device_types/OnOffSensor.xml new file mode 100644 index 00000000000000..d2c6553fc1140c --- /dev/null +++ b/data_model/device_types/OnOffSensor.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OtaProvider.xml b/data_model/device_types/OtaProvider.xml new file mode 100644 index 00000000000000..28c4e3c70b88e9 --- /dev/null +++ b/data_model/device_types/OtaProvider.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/OtaRequestor.xml b/data_model/device_types/OtaRequestor.xml new file mode 100644 index 00000000000000..7f5a8ca11c58c8 --- /dev/null +++ b/data_model/device_types/OtaRequestor.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Oven.xml b/data_model/device_types/Oven.xml new file mode 100644 index 00000000000000..5a13b0ec9ba053 --- /dev/null +++ b/data_model/device_types/Oven.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PowerSource.xml b/data_model/device_types/PowerSource.xml new file mode 100644 index 00000000000000..05aaa56f88cf92 --- /dev/null +++ b/data_model/device_types/PowerSource.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PressureSensor.xml b/data_model/device_types/PressureSensor.xml new file mode 100644 index 00000000000000..f472daaf4e39ff --- /dev/null +++ b/data_model/device_types/PressureSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Pump.xml b/data_model/device_types/Pump.xml new file mode 100644 index 00000000000000..6f1b1f39aae53c --- /dev/null +++ b/data_model/device_types/Pump.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/PumpController.xml b/data_model/device_types/PumpController.xml new file mode 100644 index 00000000000000..070e3a5912942b --- /dev/null +++ b/data_model/device_types/PumpController.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Refrigerator.xml b/data_model/device_types/Refrigerator.xml new file mode 100644 index 00000000000000..19a9b568872e4a --- /dev/null +++ b/data_model/device_types/Refrigerator.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RoboticVacuumCleaner.xml b/data_model/device_types/RoboticVacuumCleaner.xml new file mode 100644 index 00000000000000..4e02b17d772606 --- /dev/null +++ b/data_model/device_types/RoboticVacuumCleaner.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RoomAirConditioner.xml b/data_model/device_types/RoomAirConditioner.xml new file mode 100644 index 00000000000000..86240698da6789 --- /dev/null +++ b/data_model/device_types/RoomAirConditioner.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/RootNodeDeviceType.xml b/data_model/device_types/RootNodeDeviceType.xml new file mode 100644 index 00000000000000..f4792a2e1f5a96 --- /dev/null +++ b/data_model/device_types/RootNodeDeviceType.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/SmokeCOAlarm.xml b/data_model/device_types/SmokeCOAlarm.xml new file mode 100644 index 00000000000000..5888e8148f0927 --- /dev/null +++ b/data_model/device_types/SmokeCOAlarm.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Speaker.xml b/data_model/device_types/Speaker.xml new file mode 100644 index 00000000000000..f8bc0ab150036e --- /dev/null +++ b/data_model/device_types/Speaker.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/TemperatureControlledCabinet.xml b/data_model/device_types/TemperatureControlledCabinet.xml new file mode 100644 index 00000000000000..93c09339a65a75 --- /dev/null +++ b/data_model/device_types/TemperatureControlledCabinet.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/TemperatureSensor.xml b/data_model/device_types/TemperatureSensor.xml new file mode 100644 index 00000000000000..19d3fef781c717 --- /dev/null +++ b/data_model/device_types/TemperatureSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Thermostat.xml b/data_model/device_types/Thermostat.xml new file mode 100644 index 00000000000000..ebc43e7dbf7203 --- /dev/null +++ b/data_model/device_types/Thermostat.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ThreadBorderRouter.xml b/data_model/device_types/ThreadBorderRouter.xml new file mode 100644 index 00000000000000..5a069e57e93243 --- /dev/null +++ b/data_model/device_types/ThreadBorderRouter.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/ThreePhasePowerSource.xml b/data_model/device_types/ThreePhasePowerSource.xml new file mode 100644 index 00000000000000..3a3d5a018223b4 --- /dev/null +++ b/data_model/device_types/ThreePhasePowerSource.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/Valve.xml b/data_model/device_types/Valve.xml new file mode 100644 index 00000000000000..4ce864b01ab246 --- /dev/null +++ b/data_model/device_types/Valve.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/VideoRemoteControl.xml b/data_model/device_types/VideoRemoteControl.xml new file mode 100644 index 00000000000000..c86fb3ba437a55 --- /dev/null +++ b/data_model/device_types/VideoRemoteControl.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WaterHeater.xml b/data_model/device_types/WaterHeater.xml new file mode 100644 index 00000000000000..2f2f7fae235e1b --- /dev/null +++ b/data_model/device_types/WaterHeater.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WaterLeakDetector.xml b/data_model/device_types/WaterLeakDetector.xml new file mode 100644 index 00000000000000..596a9cebb2ac04 --- /dev/null +++ b/data_model/device_types/WaterLeakDetector.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WindowCovering.xml b/data_model/device_types/WindowCovering.xml new file mode 100644 index 00000000000000..83f03a2a04e5ed --- /dev/null +++ b/data_model/device_types/WindowCovering.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/device_types/WindowCoveringController.xml b/data_model/device_types/WindowCoveringController.xml new file mode 100644 index 00000000000000..c79d5a2279f6a8 --- /dev/null +++ b/data_model/device_types/WindowCoveringController.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/scraper_version b/data_model/scraper_version new file mode 100644 index 00000000000000..26aaba0e86632e --- /dev/null +++ b/data_model/scraper_version @@ -0,0 +1 @@ +1.2.0 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 8d419ff58b2efd..99693cb41a99b2 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 @@ -231,6 +231,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -428,13 +430,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1821,8 +1823,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap index 44f7fbb4327799..1f0867d7757cbb 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 8eb854e587e37b..c0c1236fa44335 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 @@ -225,6 +225,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -422,13 +424,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1831,8 +1833,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index 440a130222bc83..1e8c4ca9bcc558 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/air-quality-sensor-app/linux/main.cpp b/examples/air-quality-sensor-app/linux/main.cpp index cad641e8971cdd..fddb23fb7b38a6 100644 --- a/examples/air-quality-sensor-app/linux/main.cpp +++ b/examples/air-quality-sensor-app/linux/main.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED #include 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 8b390b8979b571..1161b93c5119ee 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 @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -845,6 +850,8 @@ server cluster BasicInformation = 40 { readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; readonly attribute 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; @@ -1072,7 +1079,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1364,13 +1371,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -5220,12 +5227,14 @@ endpoint 0 { callback attribute uniqueID; callback attribute capabilityMinima; callback attribute productAppearance; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -5668,19 +5677,15 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport default = 0x80; ram attribute lastConfiguredBy; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; @@ -6752,19 +6757,15 @@ endpoint 2 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport default = 0x80; ram attribute lastConfiguredBy; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 0b6dbc2e7831b0..fe400ec5019b28 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -1074,6 +1074,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -1164,7 +1196,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -6594,70 +6626,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -6707,16 +6675,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6796,7 +6764,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13033,7 +13001,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -13049,7 +13017,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -13065,7 +13033,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ScheduleProgrammingVisibilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -20186,70 +20154,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -20299,16 +20203,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -20388,7 +20292,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -21681,6 +21585,8 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] + + ] } + + diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 8bd7bb532fcb89..0ccc472986ed53 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 - Setup build environment: 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 a91f01342e01ad..9d88b46dc0b097 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 @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -686,6 +691,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -1188,13 +1195,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -3359,7 +3366,7 @@ server cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -3468,7 +3475,7 @@ server cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -4106,12 +4113,14 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -4420,19 +4429,15 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute nameSupport default = 0x80; + callback attribute lastConfiguredBy; + callback attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; @@ -4984,18 +4989,14 @@ endpoint 2 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport default = 0x80; - ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute nameSupport default = 0x80; + callback attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 2773862326105b..43de928aba7937 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -915,6 +915,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -1005,7 +1037,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4633,70 +4665,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -4704,7 +4672,7 @@ "side": "server", "type": "NameSupportBitmap", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x80", @@ -4720,7 +4688,7 @@ "side": "server", "type": "node_id", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4736,7 +4704,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "16", @@ -4746,16 +4714,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4835,7 +4803,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7096,7 +7064,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7112,7 +7080,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10933,70 +10901,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -11004,7 +10908,7 @@ "side": "server", "type": "NameSupportBitmap", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x80", @@ -11020,7 +10924,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "16", @@ -11030,16 +10934,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11119,7 +11023,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12348,6 +12252,7 @@ "endpointId": 65534, "networkId": 0 } - ], - "log": [] -} \ No newline at end of file + ] +} + + diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 1735aa5530ac03..b7189f9931a11c 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 ``` - Setup build environment: diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index f0d4b2a15f7203..8d49b997c2b5ce 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -569,6 +569,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -647,7 +649,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -696,13 +698,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1698,11 +1700,13 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index bd02908278d406..6239fd432b0695 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -747,6 +747,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -821,7 +853,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/build_overrides/pigweed_environment.gni b/examples/build_overrides/pigweed_environment.gni index bcc75edcff777b..bf8dc3cc9dacc5 100644 --- a/examples/build_overrides/pigweed_environment.gni +++ b/examples/build_overrides/pigweed_environment.gni @@ -19,72 +19,3 @@ _bootstrap_root = "//third_party/connectedhomeip" import("${_bootstrap_root}/build_overrides/pigweed_environment.gni") -# Rebase paths to our root. -# -# If out of tree, the paths will look like: -# -# pw_env_setup_CIPD_PIGWEED = "//../home/vscode/pigweed/env/cipd/packages/pigweed" -# -# and these paths are used by things like protoc since -# https://github.com/google/pigweed/commit/ddbc9fc7f5c601ab417db37e02cbe5294f21ad6d -# -# See https://github.com/project-chip/connectedhomeip/issues/30475 -# -# Existing logic: -# - this file is imported from `examples/common/pigweed` or similar -# - we transform paths from "//../" into "//../../../" -# -# TODO: need a better expansion here. This replacement logic seems very brittle and -# it is unclear how we know exactly 3 levels of indirections are correct -# -if (defined(pw_env_setup_CIPD_ARM)) { - _split_arm = string_split(pw_env_setup_CIPD_ARM, "//../") - if (_split_arm[0] == "") { - pw_env_setup_CIPD_ARM = get_path_info( - string_replace(pw_env_setup_CIPD_ARM, "//../", "//../../../"), - "abspath") - } else { - pw_env_setup_CIPD_ARM = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_ARM}", "abspath") - } -} -if (defined(pw_env_setup_CIPD_PIGWEED)) { - _split_pigweed = string_split(pw_env_setup_CIPD_PIGWEED, "//../") - if (_split_pigweed[0] == "") { - pw_env_setup_CIPD_PIGWEED = - get_path_info( - string_replace(pw_env_setup_CIPD_PIGWEED, "//../", "//../../../"), - "abspath") - } else { - pw_env_setup_CIPD_PIGWEED = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PIGWEED}", - "abspath") - } -} - -if (defined(pw_env_setup_CIPD_PYTHON)) { - _split_python = string_split(pw_env_setup_CIPD_PYTHON, "//../") - if (_split_python[0] == "") { - pw_env_setup_CIPD_PYTHON = - get_path_info( - string_replace(pw_env_setup_CIPD_PYTHON, "//../", "//../../../"), - "abspath") - } else { - pw_env_setup_CIPD_PYTHON = - get_path_info("${_bootstrap_root}/${pw_env_setup_CIPD_PYTHON}", - "abspath") - } -} -if (defined(pw_env_setup_VIRTUAL_ENV)) { - _split_env = string_split(pw_env_setup_VIRTUAL_ENV, "//../") - if (_split_env[0] == "") { - pw_env_setup_VIRTUAL_ENV = - get_path_info( - string_replace(pw_env_setup_VIRTUAL_ENV, "//../", "//../../../"), - "abspath") - } else { - pw_env_setup_VIRTUAL_ENV = - get_path_info("${_bootstrap_root}/${pw_env_setup_VIRTUAL_ENV}", - "abspath") - } -} diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 85c82fb8079bb7..6643553b596f33 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -464,6 +464,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -716,13 +718,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1537,8 +1539,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 021e202ca27407..5dddab962ab92f 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 94f8c902651b55..926a7ab24e2e5c 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 @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -348,13 +350,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1800,8 +1802,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 3c69ca5aae9ba2..f3f41e46305681 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 45b825227c8c81..c97039eead045e 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -225,6 +225,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -477,13 +479,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1746,8 +1748,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap index de1ad6a7428692..df07c599f92608 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index b8420779b737f8..af80df7a588a38 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -231,6 +231,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -483,13 +485,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1311,7 +1313,7 @@ server cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -1420,7 +1422,7 @@ server cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -1517,8 +1519,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index f9b6772b58d4f2..f287b3f5abe3f1 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 773e2ad7abd973..ef3e2bd3915ed5 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -463,6 +463,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -660,13 +662,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1583,8 +1585,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index d0eccdb6f3c0db..a2ccb2218b9b44 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 9986d23d29e88a..1cd605c3038367 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -313,6 +313,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -565,13 +567,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1243,8 +1245,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 49c9fe342f96be..58edcaed617651 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 48481ed4a348e8..3bb21cad2c8fd2 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -464,6 +464,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -716,13 +718,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1420,8 +1422,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 9072e47eecd233..be39d61988a65f 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -664,6 +664,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -690,7 +722,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 53f0d9557f3e41..ad451cc40b47d2 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -232,6 +232,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -308,7 +310,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -357,13 +359,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1081,11 +1083,13 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap index 25a0d0d1be222b..407747b420cdef 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -820,6 +820,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -894,7 +926,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index dc570ef1525154..a1dca12a7c3b68 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -313,6 +313,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -565,13 +567,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1715,8 +1717,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index fc97739ea6ec98..899965ed932fdb 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 10ba3a2510670e..167e1986118ac9 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -464,6 +464,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -716,13 +718,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1647,8 +1649,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 2ead46c0cbbed1..9d943c92a0eacd 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 2beede15863c4f..fb585469387214 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -552,13 +554,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1285,8 +1287,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index f410f56974d928..08484afb2288f4 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 1b0079fc78b32b..ef5bcab551a4db 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1248,8 +1250,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index d193bb5d236e2b..30c7e0d89e3214 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 1f149a49141bc9..7d29171e24ae92 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -231,6 +231,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -279,13 +281,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -942,8 +944,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap index 568708c64ea1ad..2e5d3e588ea4f3 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 52988cf072bfc4..634539605ed12a 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -458,6 +458,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -710,13 +712,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1596,8 +1598,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 9969ef4fa0c689..f0c2e1585333d0 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 2c859f242c244c..19f61d9c984d74 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1248,8 +1250,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 9837d64370ea7f..503159de43d60f 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index f3eb75af407253..6f315142dee3bf 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -232,6 +232,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -308,7 +310,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -357,13 +359,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1079,11 +1081,13 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index c33f7639fe02d9..7e92c6a621a953 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -820,6 +820,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -894,7 +926,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 97d93f34716e58..6d2c02333f1d73 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1253,8 +1255,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 4628663d2048eb..9e6f0d6566f168 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 0caef98633bde1..8cb041c2b970f1 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1264,8 +1266,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index e0a1133e2b10c7..d4110e496bc8b3 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 988af0a35fc0ae..491e50edea3090 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -464,6 +464,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -716,13 +718,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1379,8 +1381,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index b7328566cefcb0..c441ae5007824f 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index d2b113cbc1d56c..bb63561efae3a3 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -464,6 +464,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -716,13 +718,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1402,8 +1404,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index e044944cd0fad8..fff208de328e3b 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 592f141dd59d6e..7990f876ec47ff 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -429,6 +429,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -681,13 +683,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1344,8 +1346,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index 801d9c4fd2de67..a0dcf69daaa0de 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 1d4e16ab74d332..4aa4c41a77e0dc 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -363,6 +363,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -615,13 +617,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1278,8 +1280,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 66744fe2fc879e..9be8280f46acca 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index bdf2b57582204b..b28c2b6286477d 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1267,8 +1269,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 4ed304754c594f..ce0cabdcf5f7a3 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index b078a0e9e8e79f..374b98fddf442c 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -270,6 +270,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -394,13 +396,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1110,11 +1112,13 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.zap b/examples/chef/devices/rootnode_pump_5f904818cc.zap index 2ee3d12d058997..f72e57e0bf2a0b 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.zap +++ b/examples/chef/devices/rootnode_pump_5f904818cc.zap @@ -584,6 +584,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 2067a28d9e5bb6..a8c27e6215c259 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -270,6 +270,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -394,13 +396,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1062,11 +1064,13 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index c4ce099577de7a..fe4e9df44c4c3d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -584,6 +584,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 1b8031b6bc7874..ed1cad3db868eb 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -232,6 +232,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -308,7 +310,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -357,13 +359,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1046,11 +1048,13 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index f63a0072d3fc7e..bcc34cc0080a4f 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -820,6 +820,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -894,7 +926,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index cad3129660ac77..09154e0b759f97 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -348,13 +350,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1124,8 +1126,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index b12960c0ad7c65..c0d0c9fada8e89 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 354c39aea13a34..4c899818f54a7d 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -346,6 +346,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -394,13 +396,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1189,8 +1191,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index 22078ba8f841f7..f844ff02c238a1 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3005,7 +3037,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3021,7 +3053,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 79c4fdd0da3b2b..c489e13b5103ce 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -580,13 +582,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1300,8 +1302,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap index 9fdb65c8035573..5d20d1ac956322 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 7ef91d6ec4fb30..c3330f7e5eaba7 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -389,6 +389,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -641,13 +643,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1304,8 +1306,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 15f1f5b3ae308f..1c877ed4327bbc 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index cff243e9e73418..c438d63c55ef0e 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -319,6 +319,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -571,13 +573,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1247,8 +1249,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index d9c6dffbd74f44..67d155a40253f3 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 09a8cc93afa0f0..2f3880ebf8bad4 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -313,6 +313,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -565,13 +567,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1515,8 +1517,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index fbe5c0f9c50a56..a2239be9ab987b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3564,7 +3596,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3580,7 +3612,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index b14f34a64d701c..8273d1559a610e 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -313,6 +313,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -565,13 +567,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1372,8 +1374,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 0d68f07eccb7a1..2c60ffb9256806 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index 5fa73bfadf0056..13c8c53c8cc328 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -2390,70 +2390,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, diff --git a/examples/chip-tool/commands/common/CHIPCommand.cpp b/examples/chip-tool/commands/common/CHIPCommand.cpp index fc8295e00e887b..043fbc33ac4f30 100644 --- a/examples/chip-tool/commands/common/CHIPCommand.cpp +++ b/examples/chip-tool/commands/common/CHIPCommand.cpp @@ -19,8 +19,8 @@ #include "CHIPCommand.h" #include -#include #include +#include #include #include #include diff --git a/examples/chip-tool/commands/common/DeviceScanner.h b/examples/chip-tool/commands/common/DeviceScanner.h index 5ea7d036bb3d66..bcdcf26c84feb1 100644 --- a/examples/chip-tool/commands/common/DeviceScanner.h +++ b/examples/chip-tool/commands/common/DeviceScanner.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #if CHIP_DEVICE_LAYER_TARGET_DARWIN diff --git a/examples/common/imgui_ui/windows/light.cpp b/examples/common/imgui_ui/windows/light.cpp index 1fe6032281a2c6..24f88212ae23a1 100644 --- a/examples/common/imgui_ui/windows/light.cpp +++ b/examples/common/imgui_ui/windows/light.cpp @@ -155,14 +155,14 @@ void Light::Render() ImGui::Text("Color Control:"); ImGui::Indent(); const char * mode = // based on ColorMode attribute: spec 3.2.7.9 - (mColorMode == EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION) ? "Hue/Saturation" - : (mColorMode == EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y) ? "X/Y" - : (mColorMode == EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE) ? "Temperature/Mireds" - : "UNKNOWN"; + (mColorMode == kColorModeCurrentHueAndCurrentSaturation) ? "Hue/Saturation" + : (mColorMode == kColorModeCurrentXAndCurrentY) ? "X/Y" + : (mColorMode == kColorModeColorTemperature) ? "Temperature/Mireds" + : "UNKNOWN"; ImGui::Text("Mode: %s", mode); - if (mColorMode == EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION) + if (mColorMode == kColorModeCurrentHueAndCurrentSaturation) { const float hueDegrees = (mColorHue * 360.0f) / 254.0f; const float saturationPercent = 100.0f * (mColorSaturation / 254.0f); @@ -173,12 +173,12 @@ void Light::Render() ImGui::ColorButton("LightColor", HueSaturationToColor(hueDegrees, saturationPercent), 0 /* ImGuiColorEditFlags_* */, ImVec2(80, 80)); } - else if (mColorMode == EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y) + else if (mColorMode == kColorModeCurrentXAndCurrentY) { ImGui::Text("Current X: %d", mColorX); ImGui::Text("Current Y: %d", mColorY); } - else if (mColorMode == EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE) + else if (mColorMode == kColorModeColorTemperature) { ImGui::Text("Color Temperature Mireds: %d", mColorTemperatureMireds); } diff --git a/examples/common/imgui_ui/windows/light.h b/examples/common/imgui_ui/windows/light.h index 68d9cebb945da5..20942373d3111c 100644 --- a/examples/common/imgui_ui/windows/light.h +++ b/examples/common/imgui_ui/windows/light.h @@ -44,6 +44,11 @@ class Light : public Window private: const chip::EndpointId mEndpointId; + static constexpr uint8_t kColorModeCurrentHueAndCurrentSaturation = 0; + static constexpr uint8_t kColorModeCurrentXAndCurrentY = 1; + static constexpr uint8_t kColorModeColorTemperature = 2; + static constexpr uint8_t kColorModeEnhancedCurrentHueAndCurrentSaturation = 3; + // OnOff bool mLightIsOn = false; chip::Optional mTargetLightIsOn; // allow UI control of this @@ -57,7 +62,7 @@ class Light : public Window uint16_t mLevelRemainingTime10sOfSec = 0; // Color control - uint8_t mColorMode = EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION; + uint8_t mColorMode = kColorModeCurrentHueAndCurrentSaturation; uint8_t mColorHue = 0; uint8_t mColorSaturation = 0; uint16_t mColorX = 0; diff --git a/examples/common/websocket-server/WebSocketServer.cpp b/examples/common/websocket-server/WebSocketServer.cpp index 46f9a63c9a7034..6fbd47ddd94f9c 100644 --- a/examples/common/websocket-server/WebSocketServer.cpp +++ b/examples/common/websocket-server/WebSocketServer.cpp @@ -166,10 +166,15 @@ CHIP_ERROR WebSocketServer::Run(chip::Optional port, WebSocketServerDe lws_context_creation_info info; memset(&info, 0, sizeof(info)); - info.port = port.ValueOr(kDefaultWebSocketServerPort); - info.iface = nullptr; - info.pt_serv_buf_size = kMaxMessageBufferLen; - info.protocols = protocols; + info.port = port.ValueOr(kDefaultWebSocketServerPort); + info.iface = nullptr; + info.pt_serv_buf_size = kMaxMessageBufferLen; + info.protocols = protocols; + static const lws_retry_bo_t retry = { + .secs_since_valid_ping = 400, + .secs_since_valid_hangup = 400, + }; + info.retry_and_idle_policy = &retry; auto context = lws_create_context(&info); VerifyOrReturnError(nullptr != context, CHIP_ERROR_INTERNAL); 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 8faaa13e43c9a0..0e6f9891abfc4d 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 @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -552,13 +554,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1569,8 +1571,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index bab9345f11f795..6b20e69bdf6d43 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -772,6 +772,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -798,7 +830,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/contact-sensor-app/linux/main.cpp b/examples/contact-sensor-app/linux/main.cpp index fcc56d7c3d02a4..0b520bdd538e04 100644 --- a/examples/contact-sensor-app/linux/main.cpp +++ b/examples/contact-sensor-app/linux/main.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #if defined(CHIP_IMGUI_ENABLED) && CHIP_IMGUI_ENABLED #include diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index eb938c2abb0614..ef99e4fd0deac7 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -21,7 +21,7 @@ #import "CHIPToolKeypair.h" #import -#include +#include #include #include "MTRError_Utils.h" diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index fb15c5e8e92e37..1bc430a981a730 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -62,6 +62,8 @@ "Test_TC_FLW_2_1", "Test_TC_RH_2_1", "Disabled because darwin-framework-tool does not handle substraction in parameters", - "Test_TC_S_2_3" + "Test_TC_S_2_3", + "TestScenesMultiFabric", + "TestScenesFabricSceneInfo" ] } diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 4cc9cfd2826565..2b18f41c2b593c 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -320,6 +320,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -396,7 +398,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -445,13 +447,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1181,11 +1183,13 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index 41dba9f1f5f557..d47f5bcf2dde6f 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -960,6 +960,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -1034,7 +1066,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 5fc2a3a587abb0..15c034ee6f270d 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 - Setup build environment: 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 df878a1ec1492d..3619291c024505 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 @@ -191,14 +191,23 @@ provisional client cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -619,6 +628,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -871,13 +882,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2387,8 +2398,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index 5b0585a6aa1c39..1da8588daf412e 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -690,6 +690,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -716,7 +748,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index c5d897463b3bd4..b17498ce331e79 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 - Setup build environment: 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 b3e60e5cc1a2fb..3b9aead26244af 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -472,6 +472,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -724,13 +726,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1718,8 +1720,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap index 2a2f63daff482b..496954ec505896 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap @@ -526,6 +526,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -552,7 +584,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index ca4fc928d64907..cddc0928db536d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -472,6 +472,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -724,13 +726,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1850,8 +1852,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 4a9640eb98edfb..46ee05bddcbb95 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index b0ce81ddbc8faf..8a89f166b8f693 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -472,6 +472,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -724,13 +726,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1760,8 +1762,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index 1584189f9e401c..464185ab335d6d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 920454abc38d36..9d5ac549470cbc 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -623,6 +628,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -875,13 +882,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2180,8 +2187,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -2506,18 +2515,14 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport default = 0x80; ram attribute lastConfiguredBy; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 930e46dfdcac15..6da9e05979bbf4 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4532,70 +4564,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -4645,16 +4613,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4718,7 +4686,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index d9e4ca9a38cc98..351eaccf2b59ce 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -457,6 +457,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -654,13 +656,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1395,8 +1397,10 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 65feeee427a102..5aa0118ac8d750 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -504,6 +504,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -530,7 +562,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index a85e2f6d197e78..46c98d3638c1b8 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -465,6 +465,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -662,13 +664,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1788,11 +1790,13 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index 2a18ea225cbd7f..6c9dc0fb1397f7 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -712,6 +712,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -786,7 +818,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 45d0e611dbaae6..0e86b5ec1dd408 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -644,6 +649,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -1132,13 +1139,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2239,8 +2246,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -2522,19 +2531,15 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; - ram attribute nameSupport default = 0x80; - ram attribute lastConfiguredBy; - ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute nameSupport default = 0x80; + callback attribute lastConfiguredBy; + callback attribute sceneTableSize default = 16; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + callback attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index c00e0730ae050e..850576d9647ba9 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4072,70 +4104,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -4143,7 +4111,7 @@ "side": "server", "type": "NameSupportBitmap", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0x80", @@ -4159,7 +4127,7 @@ "side": "server", "type": "node_id", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4175,7 +4143,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "16", @@ -4185,16 +4153,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4271,10 +4239,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5932,6 +5900,7 @@ "endpointId": 1, "networkId": 0 } - ], - "log": [] -} \ No newline at end of file + ] +} + + 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 908e4338a8dd45..f853bf5e8e30ee 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -623,6 +628,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -1111,13 +1118,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2129,8 +2136,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -2362,19 +2371,15 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport default = 0x80; ram attribute lastConfiguredBy; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index 9962edfa9ad934..93b568a897ddd9 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3248,70 +3280,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -3361,16 +3329,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3450,7 +3418,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lighting-app/tizen/src/DBusInterface.cpp b/examples/lighting-app/tizen/src/DBusInterface.cpp index e33f5f086f670c..7c6e29d6a1cc38 100644 --- a/examples/lighting-app/tizen/src/DBusInterface.cpp +++ b/examples/lighting-app/tizen/src/DBusInterface.cpp @@ -94,8 +94,8 @@ void DBusInterface::SetCurrentLevel(uint8_t value) void DBusInterface::SetColorMode(chip::app::Clusters::ColorControl::ColorMode colorMode) { InternalSetGuard guard(this); - if (light_app_color_control_get_color_mode(mIfaceColorControl) != colorMode) - light_app_color_control_set_color_mode(mIfaceColorControl, colorMode); + if (light_app_color_control_get_color_mode(mIfaceColorControl) != chip::to_underlying(colorMode)) + light_app_color_control_set_color_mode(mIfaceColorControl, chip::to_underlying(colorMode)); } void DBusInterface::SetColorTemperature(uint16_t value) diff --git a/examples/lighting-app/tizen/src/main.cpp b/examples/lighting-app/tizen/src/main.cpp index 6a32e84b50cb6c..c1cda62a2378d5 100644 --- a/examples/lighting-app/tizen/src/main.cpp +++ b/examples/lighting-app/tizen/src/main.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -122,8 +123,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & void emberAfColorControlClusterInitCallback(EndpointId endpoint) { // Set the color mode to color temperature. - Clusters::ColorControl::Attributes::ColorMode::Set(endpoint, - Clusters::ColorControl::ColorMode::EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE); + Clusters::ColorControl::Attributes::ColorMode::Set(endpoint, ColorControlServer::EnhancedColorMode::kColorTemperature); // Preserve the state of the color temperature attribute across reboots. Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::SetNull(endpoint); } 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 c29c173487d37f..8a393f226e104b 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 @@ -218,6 +218,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -438,13 +440,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1268,9 +1270,13 @@ server cluster IcdManagement = 70 { int32u ICDCounter = 0; } + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } endpoint 0 { @@ -1330,12 +1336,14 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -1568,6 +1576,7 @@ endpoint 0 { handle command RegisterClientResponse; handle command UnregisterClient; handle command StayActiveRequest; + handle command StayActiveResponse; } } diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index e44c0005f5d8d8..21f90987583de4 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -717,6 +717,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -807,7 +839,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3332,6 +3364,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "StayActiveResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 1bb5053b7cc4a3..91ca8528d179ad 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -231,6 +231,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -702,13 +704,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2296,12 +2298,14 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index b2ece3bbed1985..dfbfb05d175301 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -752,6 +752,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -842,7 +874,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 951255e4a25b30..edc3b3adafea8f 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -223,6 +223,8 @@ server cluster BasicInformation = 40 { readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -271,13 +273,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1481,8 +1483,10 @@ endpoint 0 { callback attribute softwareVersion default = 0; callback attribute softwareVersionString; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 2632e6556aca0c..3d68942b6f24b0 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -504,6 +504,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -530,7 +562,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index abbb95e0a5642e..40c69b8c583861 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -497,13 +499,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1869,11 +1871,13 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index 40dd10c27df989..42c88a01cd0502 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -712,6 +712,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -786,7 +818,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lock-app/telink/CMakeLists.txt b/examples/lock-app/telink/CMakeLists.txt index 10771bd371c76e..70ac496507afe7 100755 --- a/examples/lock-app/telink/CMakeLists.txt +++ b/examples/lock-app/telink/CMakeLists.txt @@ -76,7 +76,8 @@ add_definitions( target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp - src/BoltLockManager.cpp + src/LockManager.cpp + src/LockSettingsStorage.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp diff --git a/examples/lock-app/telink/include/AppConfig.h b/examples/lock-app/telink/include/AppConfig.h index 5c5eb8819cdd68..f4b55ec79564af 100644 --- a/examples/lock-app/telink/include/AppConfig.h +++ b/examples/lock-app/telink/include/AppConfig.h @@ -20,6 +20,15 @@ // ---- Lock Example App Config ---- +#define LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE 1 +#define LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS 2000 + +#define APP_DEFAULT_USERS_COUNT 5 +#define APP_DEFAULT_CREDENTIAL_COUNT 5 +#define APP_DEFAULT_WEEKDAY_SCHEDULE_PER_USER_COUNT 5 +#define APP_DEFAULT_YEARDAY_SCHEDULE_PER_USER_COUNT 5 +#define APP_DEFAULT_HOLYDAY_SCHEDULE_PER_USER_COUNT 5 + #define APP_USE_EXAMPLE_START_BUTTON 1 #define APP_USE_BLE_START_BUTTON 0 #define APP_USE_THREAD_START_BUTTON 0 diff --git a/examples/lock-app/telink/include/AppTask.h b/examples/lock-app/telink/include/AppTask.h index c63643ca89ca6d..d5244bb7b7728f 100644 --- a/examples/lock-app/telink/include/AppTask.h +++ b/examples/lock-app/telink/include/AppTask.h @@ -18,14 +18,20 @@ #pragma once +#include "AppConfig.h" #include "AppTaskCommon.h" -#include "BoltLockManager.h" +#include "LockManager.h" + +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) +#define APP_ERROR_ALLOCATION_FAILED CHIP_APPLICATION_ERROR(0x07) class AppTask : public AppTaskCommon { -public: - void UpdateClusterState(BoltLockManager::State state, BoltLockManager::OperationSource source); - private: friend AppTask & GetAppTask(void); friend class AppTaskCommon; @@ -33,7 +39,7 @@ class AppTask : public AppTaskCommon CHIP_ERROR Init(void); static void LockActionEventHandler(AppEvent * event); - static void LockStateChanged(BoltLockManager::State state, BoltLockManager::OperationSource source); + static void LockStateChanged(LockManager::State_t state); static AppTask sAppTask; }; diff --git a/examples/lock-app/telink/include/BoltLockManager.h b/examples/lock-app/telink/include/BoltLockManager.h deleted file mode 100644 index 28176c9efee3b6..00000000000000 --- a/examples/lock-app/telink/include/BoltLockManager.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include - -#include - -#include -#include - -// Maximum number of credentials per user supported by lock -#define CONFIG_LOCK_NUM_CREDENTIALS_PER_USER (2) -// Maximum number of users supported by lock -#define CONFIG_LOCK_NUM_USERS (5) -// Maximum number of credentials supported by lock -#define CONFIG_LOCK_NUM_CREDENTIALS (10) - -struct LockCredentialInfo; - -#define CONFIG_LOCK_CREDENTIAL_INFO_MAX_DATA_SIZE (20) -#define CONFIG_LOCK_CREDENTIAL_INFO_MAX_TYPES (6) - -class AppEvent; - -class BoltLockManager -{ -public: - BoltLockManager() : - mCredentials(CONFIG_LOCK_CREDENTIAL_INFO_MAX_TYPES, std::vector(CONFIG_LOCK_NUM_CREDENTIALS + 1)) - {} - static constexpr size_t kMaxCredentialLength = 128; - - enum class State : uint8_t - { - kLockingInitiated = 0, - kLockingCompleted, - kUnlockingInitiated, - kUnlockingCompleted, - }; - - struct UserData - { - char mName[DOOR_LOCK_USER_NAME_BUFFER_SIZE]; - CredentialStruct mCredentials[CONFIG_LOCK_NUM_CREDENTIALS_PER_USER]; - }; - - struct CredentialData - { - chip::Platform::ScopedMemoryBuffer mSecret; - }; - - using OperationSource = chip::app::Clusters::DoorLock::OperationSourceEnum; - using StateChangeCallback = void (*)(State, OperationSource); - - static constexpr uint32_t kActuatorMovementTimeMs = 2000; - - void Init(StateChangeCallback callback); - - State GetState() const { return mState; } - bool IsLocked() const { return mState == State::kLockingCompleted; } - - bool GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) const; - bool SetUser(uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, const chip::CharSpan & userName, - uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum userType, CredentialRuleEnum credentialRule, - const CredentialStruct * credentials, size_t totalCredentials); - - bool GetCredential(uint16_t credentialIndex, CredentialTypeEnum credentialType, - EmberAfPluginDoorLockCredentialInfo & credential) const; - bool SetCredential(uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier, - DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, - const chip::ByteSpan & credentialData); - - bool ValidatePIN(const Optional & pinCode, OperationErrorEnum & err) const; - - void Lock(OperationSource source); - void Unlock(OperationSource source); - -private: - void SetState(State state, OperationSource source); - - static void ActuatorTimerEventHandler(k_timer * timer); - static void ActuatorAppEventHandler(const AppEvent & aEvent); - friend BoltLockManager & BoltLockMgr(); - - State mState = State::kLockingCompleted; - StateChangeCallback mStateChangeCallback = nullptr; - OperationSource mActuatorOperationSource = OperationSource::kButton; - k_timer mActuatorTimer = {}; - - UserData mUserData[CONFIG_LOCK_NUM_USERS]; - EmberAfPluginDoorLockUserInfo mUsers[CONFIG_LOCK_NUM_USERS] = {}; - - struct LockCredentialInfo - { - DlCredentialStatus status; - CredentialTypeEnum credentialType; - chip::FabricIndex createdBy; - chip::FabricIndex modifiedBy; - uint8_t credentialData[CONFIG_LOCK_CREDENTIAL_INFO_MAX_TYPES]; - size_t credentialDataSize; - }; - std::vector> mCredentials; - - static BoltLockManager sLock; -}; - -inline BoltLockManager & BoltLockMgr() -{ - return BoltLockManager::sLock; -} diff --git a/examples/lock-app/telink/include/LockManager.h b/examples/lock-app/telink/include/LockManager.h new file mode 100644 index 00000000000000..72fbcc648216cd --- /dev/null +++ b/examples/lock-app/telink/include/LockManager.h @@ -0,0 +1,228 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include + +#include +#include +#include + +#include +#include + +#include + +struct WeekDaysScheduleInfo +{ + DlScheduleStatus status; + EmberAfPluginDoorLockWeekDaySchedule schedule; +}; + +struct YearDayScheduleInfo +{ + DlScheduleStatus status; + EmberAfPluginDoorLockYearDaySchedule schedule; +}; + +struct HolidayScheduleInfo +{ + DlScheduleStatus status; + EmberAfPluginDoorLockHolidaySchedule schedule; +}; + +namespace TelinkDoorLock { +namespace ResourceRanges { +// Used to size arrays +static constexpr uint16_t kMaxUsers = 10; +static constexpr uint8_t kMaxCredentialsPerUser = 10; +static constexpr uint8_t kMaxWeekdaySchedulesPerUser = 10; +static constexpr uint8_t kMaxYeardaySchedulesPerUser = 10; +static constexpr uint8_t kMaxHolidaySchedules = 10; +static constexpr uint8_t kMaxCredentialSize = 20; +static constexpr uint8_t kNumCredentialTypes = 6; + +static constexpr uint8_t kMaxCredentials = kMaxUsers * kMaxCredentialsPerUser; + +} // namespace ResourceRanges + +namespace LockInitParams { + +struct LockParam +{ + // Read from zap attributes + uint16_t numberOfUsers = 0; + uint8_t numberOfCredentialsPerUser = 0; + uint8_t numberOfWeekdaySchedulesPerUser = 0; + uint8_t numberOfYeardaySchedulesPerUser = 0; + uint8_t numberOfHolidaySchedules = 0; +}; + +class ParamBuilder +{ +public: + ParamBuilder & SetNumberOfUsers(uint16_t numberOfUsers) + { + lockParam_.numberOfUsers = numberOfUsers; + return *this; + } + ParamBuilder & SetNumberOfCredentialsPerUser(uint8_t numberOfCredentialsPerUser) + { + lockParam_.numberOfCredentialsPerUser = numberOfCredentialsPerUser; + return *this; + } + ParamBuilder & SetNumberOfWeekdaySchedulesPerUser(uint8_t numberOfWeekdaySchedulesPerUser) + { + lockParam_.numberOfWeekdaySchedulesPerUser = numberOfWeekdaySchedulesPerUser; + return *this; + } + ParamBuilder & SetNumberOfYeardaySchedulesPerUser(uint8_t numberOfYeardaySchedulesPerUser) + { + lockParam_.numberOfYeardaySchedulesPerUser = numberOfYeardaySchedulesPerUser; + return *this; + } + ParamBuilder & SetNumberOfHolidaySchedules(uint8_t numberOfHolidaySchedules) + { + lockParam_.numberOfHolidaySchedules = numberOfHolidaySchedules; + return *this; + } + LockParam GetLockParam() { return lockParam_; } + +private: + LockParam lockParam_; +}; + +} // namespace LockInitParams +} // namespace TelinkDoorLock + +using namespace ::chip; +using namespace TelinkDoorLock::ResourceRanges; + +class LockManager +{ +public: + enum Action_t + { + LOCK_ACTION = 0, + UNLOCK_ACTION, + UNBOLT_ACTION, + + INVALID_ACTION + } Action; + + enum State_t + { + kState_LockInitiated = 0, + kState_LockCompleted, + kState_UnlockInitiated, + kState_UnlockCompleted, + kState_UnlatchInitiated, + kState_UnlatchCompleted, + kState_NotFulyLocked + } State; + + using StateChangeCallback = void (*)(State_t); + using OperationSource = chip::app::Clusters::DoorLock::OperationSourceEnum; + + CHIP_ERROR Init(chip::app::DataModel::Nullable state, + TelinkDoorLock::LockInitParams::LockParam lockParam, StateChangeCallback callback); + + bool LockAction(int32_t appSource, Action_t aAction, OperationSource source, chip::EndpointId endpointId); + + bool LockAction(int32_t appSource, Action_t aAction, OperationSource source, chip::EndpointId endpointId, + OperationErrorEnum & err, const Nullable & fabricIdx = NullNullable, + const Nullable & nodeId = NullNullable, const Optional & pinCode = NullNullable); + + bool IsLocked() const { return mState == State_t::kState_LockCompleted; } + + State_t getLockState() { return mState; } + + bool GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user); + bool SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype, + CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials); + + bool GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, + EmberAfPluginDoorLockCredentialInfo & credential); + + bool SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, + const chip::ByteSpan & credentialData); + + DlStatus GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule); + + DlStatus SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, DlScheduleStatus status, + DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, uint8_t endMinute); + + DlStatus GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule); + + DlStatus SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime); + + DlStatus GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, EmberAfPluginDoorLockHolidaySchedule & schedule); + + DlStatus SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, uint32_t localStartTime, + uint32_t localEndTime, OperatingModeEnum operatingMode); + + bool IsValidUserIndex(uint16_t userIndex); + bool IsValidCredentialIndex(uint16_t credentialIndex, CredentialTypeEnum type); + bool IsValidCredentialType(CredentialTypeEnum type); + bool IsValidWeekdayScheduleIndex(uint8_t scheduleIndex); + bool IsValidYeardayScheduleIndex(uint8_t scheduleIndex); + bool IsValidHolidayScheduleIndex(uint8_t scheduleIndex); + + const char * lockStateToString(DlLockState lockState) const; + +private: + friend LockManager & LockMgr(); + State_t mState = kState_NotFulyLocked; + StateChangeCallback mStateChangeCallback = nullptr; + OperationSource mActuatorOperationSource = OperationSource::kButton; + k_timer mActuatorTimer = {}; + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + bool ReadConfigValues(); +#endif + + bool setLockState(chip::EndpointId endpointId, DlLockState lockState, OperationSource source, OperationErrorEnum & err, + const Nullable & fabricIdx, const Nullable & nodeId, + const Optional & pin); + + static void ActuatorTimerEventHandler(k_timer * timer); + static void ActuatorAppEventHandler(const AppEvent & event); + + EmberAfPluginDoorLockUserInfo mLockUsers[kMaxUsers]; + EmberAfPluginDoorLockCredentialInfo mLockCredentials[kNumCredentialTypes][kMaxCredentials]; + WeekDaysScheduleInfo mWeekdaySchedule[kMaxUsers][kMaxWeekdaySchedulesPerUser]; + YearDayScheduleInfo mYeardaySchedule[kMaxUsers][kMaxYeardaySchedulesPerUser]; + HolidayScheduleInfo mHolidaySchedule[kMaxHolidaySchedules]; + + char mUserNames[ArraySize(mLockUsers)][DOOR_LOCK_MAX_USER_NAME_SIZE]; + uint8_t mCredentialData[kNumCredentialTypes][kMaxCredentials][kMaxCredentialSize]; + CredentialStruct mCredentials[kMaxUsers][kMaxCredentials]; + + static LockManager sLock; + TelinkDoorLock::LockInitParams::LockParam LockParams; +}; + +inline LockManager & LockMgr() +{ + return LockManager::sLock; +} diff --git a/examples/lock-app/telink/include/LockSettingsStorage.h b/examples/lock-app/telink/include/LockSettingsStorage.h new file mode 100644 index 00000000000000..5cb1773eea4040 --- /dev/null +++ b/examples/lock-app/telink/include/LockSettingsStorage.h @@ -0,0 +1,43 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <../Zephyr/ZephyrConfig.h> +#include + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE +namespace chip { +namespace DeviceLayer { +namespace Internal { + +class LockSettingsStorage : ZephyrConfig +{ +public: + static const ZephyrConfig::Key kConfigKey_LockUser; + static const ZephyrConfig::Key kConfigKey_Credential; + static const ZephyrConfig::Key kConfigKey_LockUserName; + static const ZephyrConfig::Key kConfigKey_CredentialData; + static const ZephyrConfig::Key kConfigKey_UserCredentials; + static const ZephyrConfig::Key kConfigKey_WeekDaySchedules; + static const ZephyrConfig::Key kConfigKey_YearDaySchedules; + static const ZephyrConfig::Key kConfigKey_HolidaySchedules; +}; +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip + +#endif diff --git a/examples/lock-app/telink/src/AppTask.cpp b/examples/lock-app/telink/src/AppTask.cpp index bf7fc3311cd0e8..11f8499bd5bd41 100644 --- a/examples/lock-app/telink/src/AppTask.cpp +++ b/examples/lock-app/telink/src/AppTask.cpp @@ -17,13 +17,20 @@ */ #include "AppTask.h" -#include "BoltLockManager.h" - +#include #include +#include +#include +#include LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); using namespace ::chip::app::Clusters::DoorLock; +using namespace chip; +using namespace chip::app; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceLayer::Internal; +using namespace TelinkDoorLock::LockInitParams; namespace { #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED @@ -42,10 +49,82 @@ CHIP_ERROR AppTask::Init(void) #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED sLockLED.Init(GPIO_DT_SPEC_GET(DT_ALIAS(led2), gpios)); - sLockLED.Set(BoltLockMgr().IsLocked()); + sLockLED.Set(LockMgr().IsLocked()); #endif - BoltLockMgr().Init(LockStateChanged); + chip::app::DataModel::Nullable state; + chip::EndpointId endpointId{ kExampleEndpointId }; + chip::DeviceLayer::PlatformMgr().LockChipStack(); + chip::app::Clusters::DoorLock::Attributes::LockState::Get(endpointId, state); + + uint8_t numberOfCredentialsPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfCredentialsSupportedPerUser(endpointId, numberOfCredentialsPerUser)) + { + ChipLogError(Zcl, + "Unable to get number of credentials supported per user when initializing lock endpoint, defaulting to %d " + "[endpointId=%d]", + APP_DEFAULT_CREDENTIAL_COUNT, endpointId); + numberOfCredentialsPerUser = APP_DEFAULT_CREDENTIAL_COUNT; + } + + uint16_t numberOfUsers = 0; + if (!DoorLockServer::Instance().GetNumberOfUserSupported(endpointId, numberOfUsers)) + { + ChipLogError(Zcl, + "Unable to get number of supported users when initializing lock endpoint, defaulting to %d [endpointId=%d]", + APP_DEFAULT_USERS_COUNT, endpointId); + numberOfUsers = APP_DEFAULT_USERS_COUNT; + } + + uint8_t numberOfWeekdaySchedulesPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfWeekDaySchedulesPerUserSupported(endpointId, numberOfWeekdaySchedulesPerUser)) + { + ChipLogError( + Zcl, + "Unable to get number of supported weekday schedules when initializing lock endpoint, defaulting to %d [endpointId=%d]", + APP_DEFAULT_WEEKDAY_SCHEDULE_PER_USER_COUNT, endpointId); + numberOfWeekdaySchedulesPerUser = APP_DEFAULT_WEEKDAY_SCHEDULE_PER_USER_COUNT; + } + + uint8_t numberOfYeardaySchedulesPerUser = 0; + if (!DoorLockServer::Instance().GetNumberOfYearDaySchedulesPerUserSupported(endpointId, numberOfYeardaySchedulesPerUser)) + { + ChipLogError( + Zcl, + "Unable to get number of supported yearday schedules when initializing lock endpoint, defaulting to %d [endpointId=%d]", + APP_DEFAULT_YEARDAY_SCHEDULE_PER_USER_COUNT, endpointId); + numberOfYeardaySchedulesPerUser = APP_DEFAULT_YEARDAY_SCHEDULE_PER_USER_COUNT; + } + + uint8_t numberOfHolidaySchedules = 0; + if (!DoorLockServer::Instance().GetNumberOfHolidaySchedulesSupported(endpointId, numberOfHolidaySchedules)) + { + ChipLogError( + Zcl, + "Unable to get number of supported holiday schedules when initializing lock endpoint, defaulting to %d [endpointId=%d]", + APP_DEFAULT_HOLYDAY_SCHEDULE_PER_USER_COUNT, endpointId); + numberOfHolidaySchedules = APP_DEFAULT_HOLYDAY_SCHEDULE_PER_USER_COUNT; + } + + chip::DeviceLayer::PlatformMgr().UnlockChipStack(); + + CHIP_ERROR err = CHIP_NO_ERROR; + + err = LockMgr().Init(state, + ParamBuilder() + .SetNumberOfUsers(numberOfUsers) + .SetNumberOfCredentialsPerUser(numberOfCredentialsPerUser) + .SetNumberOfWeekdaySchedulesPerUser(numberOfWeekdaySchedulesPerUser) + .SetNumberOfYeardaySchedulesPerUser(numberOfYeardaySchedulesPerUser) + .SetNumberOfHolidaySchedules(numberOfHolidaySchedules) + .GetLockParam(), + LockStateChanged); + + if (err != CHIP_NO_ERROR) + { + LOG_ERR("LockMgr().Init() failed"); + return err; + } // Disable auto-relock time feature. DoorLockServer::Instance().SetAutoRelockTime(kExampleEndpointId, 0); @@ -53,86 +132,71 @@ CHIP_ERROR AppTask::Init(void) return CHIP_NO_ERROR; } +/* This is a button handler only */ void AppTask::LockActionEventHandler(AppEvent * aEvent) { - if (BoltLockMgr().IsLocked()) + switch (LockMgr().getLockState()) { - BoltLockMgr().Unlock(BoltLockManager::OperationSource::kButton); - } - else - { - BoltLockMgr().Lock(BoltLockManager::OperationSource::kButton); + case LockManager::kState_NotFulyLocked: + case LockManager::kState_LockCompleted: + LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::UNLOCK_ACTION, LockManager::OperationSource::kButton, + kExampleEndpointId); + break; + case LockManager::kState_UnlockCompleted: + LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION, LockManager::OperationSource::kButton, + kExampleEndpointId); + break; + default: + LOG_INF("Lock is in intermediate state, ignoring button"); + break; } } -void AppTask::LockStateChanged(BoltLockManager::State state, BoltLockManager::OperationSource source) +void AppTask::LockStateChanged(LockManager::State_t state) { switch (state) { - case BoltLockManager::State::kLockingInitiated: - LOG_INF("Lock action initiated"); + case LockManager::State_t::kState_LockInitiated: + LOG_INF("Callback: Lock action initiated"); #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED sLockLED.Blink(50, 50); #endif break; - case BoltLockManager::State::kLockingCompleted: - LOG_INF("Lock action completed"); + case LockManager::State_t::kState_LockCompleted: + LOG_INF("Callback: Lock action completed"); #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED sLockLED.Set(true); #endif break; - case BoltLockManager::State::kUnlockingInitiated: - LOG_INF("Unlock action initiated"); + case LockManager::State_t::kState_UnlockInitiated: + LOG_INF("Callback: Unlock action initiated"); #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED sLockLED.Blink(50, 50); #endif break; - case BoltLockManager::State::kUnlockingCompleted: - LOG_INF("Unlock action completed"); + case LockManager::State_t::kState_UnlockCompleted: + LOG_INF("Callback: Unlock action completed"); #if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED sLockLED.Set(false); #endif break; - } - - // Handle changing attribute state in the application - sAppTask.UpdateClusterState(state, source); -} - -void AppTask::UpdateClusterState(BoltLockManager::State state, BoltLockManager::OperationSource source) -{ - DlLockState newLockState; - - switch (state) - { - case BoltLockManager::State::kLockingCompleted: - newLockState = DlLockState::kLocked; + case LockManager::State_t::kState_UnlatchInitiated: + LOG_INF("Callback: Unbolt action initiated"); +#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED + sLockLED.Blink(75, 25); +#endif break; - case BoltLockManager::State::kUnlockingCompleted: - newLockState = DlLockState::kUnlocked; + case LockManager::State_t::kState_UnlatchCompleted: + LOG_INF("Callback: Unbolt action completed"); +#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED + sLockLED.Blink(25, 75); +#endif break; - default: - newLockState = DlLockState::kNotFullyLocked; + case LockManager::State_t::kState_NotFulyLocked: + LOG_INF("Callback: Lock not fully locked. Unexpected state"); +#if CONFIG_CHIP_ENABLE_APPLICATION_STATUS_LED + sLockLED.Blink(10, 90); +#endif break; } - - SystemLayer().ScheduleLambda([newLockState, source] { - chip::app::DataModel::Nullable currentLockState; - chip::app::Clusters::DoorLock::Attributes::LockState::Get(kExampleEndpointId, currentLockState); - - if (currentLockState.IsNull()) - { - // Initialize lock state with start value, but not invoke lock/unlock. - chip::app::Clusters::DoorLock::Attributes::LockState::Set(kExampleEndpointId, newLockState); - } - else - { - LOG_INF("Updating LockState attribute"); - - if (!DoorLockServer::Instance().SetLockState(kExampleEndpointId, newLockState, source)) - { - LOG_ERR("Failed to update LockState attribute"); - } - } - }); } diff --git a/examples/lock-app/telink/src/BoltLockManager.cpp b/examples/lock-app/telink/src/BoltLockManager.cpp deleted file mode 100644 index 721fb11e427d72..00000000000000 --- a/examples/lock-app/telink/src/BoltLockManager.cpp +++ /dev/null @@ -1,260 +0,0 @@ -/* - * - * Copyright (c) 2023 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "BoltLockManager.h" - -#include "AppConfig.h" -#include "AppEventCommon.h" -#include "AppTask.h" -#include - -using namespace chip; -using chip::to_underlying; - -BoltLockManager BoltLockManager::sLock; - -void BoltLockManager::Init(StateChangeCallback callback) -{ - mStateChangeCallback = callback; - - k_timer_init(&mActuatorTimer, &BoltLockManager::ActuatorTimerEventHandler, nullptr); - k_timer_user_data_set(&mActuatorTimer, this); -} - -bool BoltLockManager::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) const -{ - // userIndex is guaranteed by the caller to be between 1 and CONFIG_LOCK_NUM_USERS - user = mUsers[userIndex - 1]; - - ChipLogProgress(Zcl, "Getting lock user %u: %s", static_cast(userIndex), - user.userStatus == UserStatusEnum::kAvailable ? "available" : "occupied"); - - return true; -} - -bool BoltLockManager::SetUser(uint16_t userIndex, FabricIndex creator, FabricIndex modifier, const CharSpan & userName, - uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum userType, - CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials) -{ - // userIndex is guaranteed by the caller to be between 1 and CONFIG_LOCK_NUM_USERS - UserData & userData = mUserData[userIndex - 1]; - auto & user = mUsers[userIndex - 1]; - - VerifyOrReturnError(userName.size() <= DOOR_LOCK_MAX_USER_NAME_SIZE, false); - VerifyOrReturnError(totalCredentials <= CONFIG_LOCK_NUM_CREDENTIALS_PER_USER, false); - - Platform::CopyString(userData.mName, userName); - memcpy(userData.mCredentials, credentials, totalCredentials * sizeof(CredentialStruct)); - - user.userName = CharSpan(userData.mName, userName.size()); - user.credentials = Span(userData.mCredentials, totalCredentials); - user.userUniqueId = uniqueId; - user.userStatus = userStatus; - user.userType = userType; - user.credentialRule = credentialRule; - user.creationSource = DlAssetSource::kMatterIM; - user.createdBy = creator; - user.modificationSource = DlAssetSource::kMatterIM; - user.lastModifiedBy = modifier; - - ChipLogProgress(Zcl, "Setting lock user %u: %s", static_cast(userIndex), - userStatus == UserStatusEnum::kAvailable ? "available" : "occupied"); - - return true; -} - -bool BoltLockManager::GetCredential(uint16_t credentialIndex, CredentialTypeEnum credentialType, - EmberAfPluginDoorLockCredentialInfo & credential) const -{ - ChipLogProgress(Zcl, "Lock App: LockEndpoint::GetCredential [credentialIndex=%u,credentialType=%u]", credentialIndex, - to_underlying(credentialType)); - - if (to_underlying(credentialType) >= mCredentials.size()) - { - ChipLogError(Zcl, "Cannot get the credential - index out of range [index=%d]", credentialIndex); - return false; - } - - if (credentialIndex >= mCredentials.at(to_underlying(credentialType)).size() || - (0 == credentialIndex && CredentialTypeEnum::kProgrammingPIN != credentialType)) - { - ChipLogError(Zcl, "Cannot get the credential - index out of range [index=%d]", credentialIndex); - return false; - } - - const auto & credentialInStorage = mCredentials[to_underlying(credentialType)][credentialIndex]; - - credential.status = credentialInStorage.status; - if (DlCredentialStatus::kAvailable == credential.status) - { - ChipLogDetail(Zcl, "Found unoccupied credential [index=%u]", credentialIndex); - return true; - } - credential.credentialType = credentialInStorage.credentialType; - credential.credentialData = chip::ByteSpan(credentialInStorage.credentialData, credentialInStorage.credentialDataSize); - // So far there's no way to actually create the credential outside the matter, so here we always set the creation/modification - // source to Matter - credential.creationSource = DlAssetSource::kMatterIM; - credential.createdBy = credentialInStorage.createdBy; - credential.modificationSource = DlAssetSource::kMatterIM; - credential.lastModifiedBy = credentialInStorage.modifiedBy; - - ChipLogDetail(Zcl, "Found occupied credential [index=%u,type=%u,dataSize=%u,createdBy=%u,modifiedBy=%u]", credentialIndex, - to_underlying(credential.credentialType), static_cast(credential.credentialData.size()), - credential.createdBy, credential.lastModifiedBy); - - return true; -} - -bool BoltLockManager::SetCredential(uint16_t credentialIndex, FabricIndex creator, FabricIndex modifier, - DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, - const ByteSpan & credentialData) -{ - ChipLogProgress(Zcl, - "Lock App: LockEndpoint::SetCredential " - "[credentialIndex=%u,credentialStatus=%u,credentialType=%u,credentialDataSize=%u,creator=%u,modifier=%u]", - credentialIndex, to_underlying(credentialStatus), to_underlying(credentialType), - static_cast(credentialData.size()), creator, modifier); - - if (to_underlying(credentialType) >= mCredentials.capacity()) - { - ChipLogError(Zcl, "Cannot set the credential - type out of range [type=%d]", to_underlying(credentialType)); - return false; - } - - if (credentialIndex >= mCredentials.at(to_underlying(credentialType)).size() || - (0 == credentialIndex && CredentialTypeEnum::kProgrammingPIN != credentialType)) - { - ChipLogError(Zcl, "Cannot set the credential - index out of range [index=%d]", credentialIndex); - return false; - } - - auto & credentialInStorage = mCredentials[to_underlying(credentialType)][credentialIndex]; - if (credentialData.size() > CONFIG_LOCK_CREDENTIAL_INFO_MAX_DATA_SIZE) - { - ChipLogError(Zcl, - "Cannot get the credential - data size exceeds limit " - "index=%d,dataSize=%u,maxDataSize=%u]", - credentialIndex, static_cast(credentialData.size()), - static_cast(CONFIG_LOCK_CREDENTIAL_INFO_MAX_DATA_SIZE)); - return false; - } - credentialInStorage.status = credentialStatus; - credentialInStorage.credentialType = credentialType; - credentialInStorage.createdBy = creator; - credentialInStorage.modifiedBy = modifier; - std::memcpy(credentialInStorage.credentialData, credentialData.data(), credentialData.size()); - credentialInStorage.credentialDataSize = credentialData.size(); - - ChipLogProgress(Zcl, "Successfully set the credential [index=%d,credentialType=%u,creator=%u,modifier=%u]", credentialIndex, - to_underlying(credentialType), credentialInStorage.createdBy, credentialInStorage.modifiedBy); - - return true; -} - -bool BoltLockManager::ValidatePIN(const Optional & pinCode, OperationErrorEnum & err) const -{ - // Optionality of the PIN code is validated by the caller, so assume it is OK not to provide the PIN code. - if (!pinCode.HasValue()) - { - return true; - } - - // Find the credential so we can make sure it is not absent right away - auto & pinCredentials = mCredentials[to_underlying(CredentialTypeEnum::kPin)]; - auto credential = std::find_if(pinCredentials.begin(), pinCredentials.end(), [&pinCode](const LockCredentialInfo & c) { - return (c.status != DlCredentialStatus::kAvailable) && - chip::ByteSpan{ c.credentialData, c.credentialDataSize }.data_equal(pinCode.Value()); - }); - - if (credential == pinCredentials.end()) - { - ChipLogDetail(Zcl, "Lock App: specified PIN code was not found in the database"); - - err = OperationErrorEnum::kInvalidCredential; - return false; - } - - ChipLogDetail(Zcl, "Invalid lock PIN code provided"); - err = OperationErrorEnum::kInvalidCredential; - - return false; -} - -void BoltLockManager::Lock(OperationSource source) -{ - VerifyOrReturn(mState != State::kLockingCompleted); - SetState(State::kLockingInitiated, source); - - mActuatorOperationSource = source; - k_timer_start(&mActuatorTimer, K_MSEC(kActuatorMovementTimeMs), K_NO_WAIT); -} - -void BoltLockManager::Unlock(OperationSource source) -{ - VerifyOrReturn(mState != State::kUnlockingCompleted); - SetState(State::kUnlockingInitiated, source); - - mActuatorOperationSource = source; - k_timer_start(&mActuatorTimer, K_MSEC(kActuatorMovementTimeMs), K_NO_WAIT); -} - -void BoltLockManager::ActuatorTimerEventHandler(k_timer * timer) -{ - // The timer event handler is called in the context of the system clock ISR. - // Post an event to the application task queue to process the event in the - // context of the application thread. - - AppEvent event; - event.Type = AppEvent::kEventType_Timer; - event.TimerEvent.Context = static_cast(k_timer_user_data_get(timer)); - event.Handler = (EventHandler) BoltLockManager::ActuatorAppEventHandler; - GetAppTask().PostEvent(&event); -} - -void BoltLockManager::ActuatorAppEventHandler(const AppEvent & event) -{ - BoltLockManager * lock = static_cast(event.TimerEvent.Context); - - if (!lock) - { - return; - } - - switch (lock->mState) - { - case State::kLockingInitiated: - lock->SetState(State::kLockingCompleted, lock->mActuatorOperationSource); - break; - case State::kUnlockingInitiated: - lock->SetState(State::kUnlockingCompleted, lock->mActuatorOperationSource); - break; - default: - break; - } -} - -void BoltLockManager::SetState(State state, OperationSource source) -{ - mState = state; - - if (mStateChangeCallback != nullptr) - { - mStateChangeCallback(state, source); - } -} diff --git a/examples/lock-app/telink/src/LockManager.cpp b/examples/lock-app/telink/src/LockManager.cpp new file mode 100644 index 00000000000000..4a7ee03c1a6bb6 --- /dev/null +++ b/examples/lock-app/telink/src/LockManager.cpp @@ -0,0 +1,979 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include +#include +#include +#include +#include + +LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); + +LockManager LockManager::sLock; + +using namespace ::chip::DeviceLayer::Internal; +using namespace TelinkDoorLock::LockInitParams; + +CHIP_ERROR LockManager::Init(chip::app::DataModel::Nullable state, LockParam lockParam, + StateChangeCallback callback) +{ + LockParams = lockParam; + mStateChangeCallback = callback; + + if (LockParams.numberOfUsers > kMaxUsers) + { + ChipLogError(Zcl, + "Max number of users %d is greater than %d, the maximum amount of users currently supported on this platform", + LockParams.numberOfUsers, kMaxUsers); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfCredentialsPerUser > kMaxCredentialsPerUser) + { + ChipLogError( + Zcl, + "Max number of credentials per user %d is greater than %d, the maximum amount of users currently supported on this " + "platform", + LockParams.numberOfCredentialsPerUser, kMaxCredentialsPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfWeekdaySchedulesPerUser > kMaxWeekdaySchedulesPerUser) + { + ChipLogError( + Zcl, + "Max number of schedules %d is greater than %d, the maximum amount of schedules currently supported on this platform", + LockParams.numberOfWeekdaySchedulesPerUser, kMaxWeekdaySchedulesPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfYeardaySchedulesPerUser > kMaxYeardaySchedulesPerUser) + { + ChipLogError( + Zcl, + "Max number of schedules %d is greater than %d, the maximum amount of schedules currently supported on this platform", + LockParams.numberOfYeardaySchedulesPerUser, kMaxYeardaySchedulesPerUser); + return APP_ERROR_ALLOCATION_FAILED; + } + + if (LockParams.numberOfHolidaySchedules > kMaxHolidaySchedules) + { + ChipLogError( + Zcl, + "Max number of schedules %d is greater than %d, the maximum amount of schedules currently supported on this platform", + LockParams.numberOfHolidaySchedules, kMaxHolidaySchedules); + return APP_ERROR_ALLOCATION_FAILED; + } + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + ReadConfigValues(); +#endif + + k_timer_init(&mActuatorTimer, &LockManager::ActuatorTimerEventHandler, nullptr); + k_timer_user_data_set(&mActuatorTimer, this); + + return CHIP_NO_ERROR; +} + +/* Action related to mechanical operation. Called from button */ +bool LockManager::LockAction(int32_t appSource, Action_t aAction, OperationSource source, chip::EndpointId endpointId) +{ + bool status = false; + switch (aAction) + { + case LOCK_ACTION: + if (mState != kState_LockCompleted) + { + mState = kState_LockInitiated; + status = DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kLocked, source, NullNullable, NullNullable, + NullNullable, NullNullable); + if (status) + { + LOG_INF("Lock Action: Lock action initiated successfully. Waiting for actuator"); + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Lock Action: Lock action failed to initiate. No action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + LOG_INF("Lock Action: Lock is already locked. No action performed"); + } + break; + case UNLOCK_ACTION: + if (mState != kState_UnlockCompleted) + { + if (DoorLockServer::Instance().SupportsUnbolt(kExampleEndpointId)) + { + status = DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kUnlatched, source, NullNullable, + NullNullable, NullNullable, NullNullable); + if (status) + { + LOG_INF("Unlock Action: Step 1: Unbolt completed"); + mState = kState_UnlatchInitiated; + if (mStateChangeCallback) + mStateChangeCallback(mState); + status = DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kUnlocked, source, NullNullable, + NullNullable, NullNullable, NullNullable); + if (status) + { + LOG_INF("Unlock Action: Step 2: Unlock completed"); + mState = kState_UnlockInitiated; + if (mStateChangeCallback) + mStateChangeCallback(mState); + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unlock Action: Step 2: Unlock failed. no action performed"); + mState = kState_NotFulyLocked; + } + } + else + { + LOG_INF("Unlock Action: Step 1: Unbolt failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + status = DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kUnlocked, source, NullNullable, + NullNullable, NullNullable, NullNullable); + if (status) + { + LOG_INF("Unlock Action: Unlock initiated"); + mState = kState_UnlockInitiated; + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unlock Action: Unlock failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + } + else + { + LOG_INF("Unlock Action: Lock is already unlocked. no action performed"); + } + break; + case UNBOLT_ACTION: + if (mState != kState_UnlatchCompleted) + { + status = DoorLockServer::Instance().SetLockState(endpointId, DlLockState::kUnlatched, source, NullNullable, + NullNullable, NullNullable, NullNullable); + if (status) + { + LOG_INF("Unbolt Action: Unbolt initiated"); + mState = kState_UnlatchInitiated; + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unbolt Action: Unbolt failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + LOG_INF("Unbolt Action: Lock is already in unbolt state. no action performed"); + } + break; + default: + LOG_INF("Unknown lock state. no action performed"); + mState = kState_NotFulyLocked; + break; + } + return status; +} + +/* Action related to mechanical operation. Called from ZCL */ +bool LockManager::LockAction(int32_t appSource, Action_t aAction, OperationSource source, chip::EndpointId endpointId, + OperationErrorEnum & err, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode) +{ + bool status = false; + switch (aAction) + { + case LOCK_ACTION: + if (mState != kState_LockCompleted) + { + mState = kState_LockInitiated; + status = setLockState(kExampleEndpointId, DlLockState::kLocked, source, err, fabricIdx, nodeId, pinCode); + if (status) + { + LOG_INF("Lock Action: Lock action initiated successfully. Waiting for actuator"); + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Lock Action: Lock action failed to initiate. No action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + LOG_INF("Lock Action: Lock is already locked. No action performed"); + } + break; + case UNLOCK_ACTION: + if (mState != kState_UnlockCompleted) + { + if (DoorLockServer::Instance().SupportsUnbolt(kExampleEndpointId)) + { + status = setLockState(kExampleEndpointId, DlLockState::kUnlatched, source, err, fabricIdx, nodeId, pinCode); + if (status) + { + LOG_INF("Unlock Action: Step 1: Unbolt completed"); + mState = kState_UnlatchInitiated; + if (mStateChangeCallback) + mStateChangeCallback(mState); + status = setLockState(kExampleEndpointId, DlLockState::kUnlocked, source, err, fabricIdx, nodeId, pinCode); + if (status) + { + LOG_INF("Unlock Action: Step 2: Unlock completed"); + mState = kState_UnlockInitiated; + if (mStateChangeCallback) + mStateChangeCallback(mState); + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unlock Action: Step 2: Unlock failed. no action performed"); + mState = kState_NotFulyLocked; + } + } + else + { + LOG_INF("Unlock Action: Step 1: Unbolt failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + status = setLockState(kExampleEndpointId, DlLockState::kUnlocked, source, err, fabricIdx, nodeId, pinCode); + if (status) + { + LOG_INF("Unlock Action: Unlock initiated"); + mState = kState_UnlockInitiated; + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unlock Action: Unlock failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + } + else + { + LOG_INF("Unlock Action: Lock is already unlocked. no action performed"); + } + break; + case UNBOLT_ACTION: + if (mState != kState_UnlatchCompleted) + { + status = setLockState(kExampleEndpointId, DlLockState::kUnlatched, source, err, fabricIdx, nodeId, pinCode); + if (status) + { + LOG_INF("Unbolt Action: Unbolt initiated"); + mState = kState_UnlatchInitiated; + k_timer_start(&mActuatorTimer, K_MSEC(LOCK_MANAGER_ACTUATOR_MOVEMENT_TIME_MS), K_NO_WAIT); + } + else + { + LOG_INF("Unbolt Action: Unbolt failed. no action performed"); + mState = kState_NotFulyLocked; + } + if (mStateChangeCallback) + mStateChangeCallback(mState); + } + else + { + LOG_INF("Unbolt Action: Lock is already in unbolt state. no action performed"); + } + break; + default: + LOG_INF("Unknown lock state. no action performed"); + mState = kState_NotFulyLocked; + break; + } + return status; +} + +void LockManager::ActuatorTimerEventHandler(k_timer * timer) +{ + // The timer event handler is called in the context of the system clock ISR. + // Post an event to the application task queue to process the event in the + // context of the application thread. + + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = static_cast(k_timer_user_data_get(timer)); + event.Handler = (EventHandler) LockManager::ActuatorAppEventHandler; + GetAppTask().PostEvent(&event); +} + +void LockManager::ActuatorAppEventHandler(const AppEvent & event) +{ + LockManager * lock = static_cast(event.TimerEvent.Context); + + if (!lock) + { + return; + } + + switch (lock->mState) + { + case kState_LockInitiated: + LOG_INF("Lock action completed"); + lock->mState = kState_LockCompleted; + if (lock->mStateChangeCallback) + lock->mStateChangeCallback(lock->mState); + break; + case kState_UnlockInitiated: + LOG_INF("Unlock action completed"); + lock->mState = kState_UnlockCompleted; + if (lock->mStateChangeCallback) + lock->mStateChangeCallback(lock->mState); + break; + case kState_UnlatchInitiated: + LOG_INF("Unbolt action completed"); + lock->mState = kState_UnlatchCompleted; + if (lock->mStateChangeCallback) + lock->mStateChangeCallback(lock->mState); + break; + + default: + LOG_INF("Unexpected action occures"); + break; + } +} + +bool LockManager::IsValidUserIndex(uint16_t userIndex) +{ + return (userIndex < kMaxUsers); +} + +bool LockManager::IsValidCredentialIndex(uint16_t credentialIndex, CredentialTypeEnum type) +{ + if (CredentialTypeEnum::kProgrammingPIN == type) + { + return (0 == credentialIndex); // 0 is required index for Programming PIN + } + return (credentialIndex < kMaxCredentialsPerUser); +} + +bool LockManager::IsValidCredentialType(CredentialTypeEnum type) +{ + return (to_underlying(type) < kNumCredentialTypes); +} + +bool LockManager::IsValidWeekdayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxWeekdaySchedulesPerUser); +} + +bool LockManager::IsValidYeardayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxYeardaySchedulesPerUser); +} + +bool LockManager::IsValidHolidayScheduleIndex(uint8_t scheduleIndex) +{ + return (scheduleIndex < kMaxHolidaySchedules); +} + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE +bool LockManager::ReadConfigValues() +{ + size_t outLen; + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), + sizeof(EmberAfPluginDoorLockUserInfo) * ArraySize(mLockUsers), outLen); + + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), + sizeof(EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes, outLen); + + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_LockUserName, reinterpret_cast(mUserNames), + sizeof(mUserNames), outLen); + + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_CredentialData, reinterpret_cast(mCredentialData), + sizeof(mCredentialData), outLen); + + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), + sizeof(CredentialStruct) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser, + outLen); + + ZephyrConfig::ReadConfigValueBin( + LockSettingsStorage::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), + sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * LockParams.numberOfUsers, + outLen); + + ZephyrConfig::ReadConfigValueBin( + LockSettingsStorage::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), + sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * LockParams.numberOfUsers, + outLen); + + ZephyrConfig::ReadConfigValueBin(LockSettingsStorage::kConfigKey_HolidaySchedules, + reinterpret_cast(&(mHolidaySchedule)), + sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules, outLen); + + return true; +} +#endif + +bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) +{ + VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed + + userIndex--; + + VerifyOrReturnValue(IsValidUserIndex(userIndex), false); + + ChipLogProgress(Zcl, "Door Lock App: LockManager::GetUser [endpoint=%d,userIndex=%hu]", endpointId, userIndex); + + const auto & userInDb = mLockUsers[userIndex]; + + user.userStatus = userInDb.userStatus; + if (UserStatusEnum::kAvailable == user.userStatus) + { + ChipLogProgress(Zcl, "Found unoccupied user [endpoint=%d]", endpointId); + return true; + } + + user.userName = chip::CharSpan(userInDb.userName.data(), userInDb.userName.size()); + user.credentials = chip::Span(mCredentials[userIndex], userInDb.credentials.size()); + user.userUniqueId = userInDb.userUniqueId; + user.userType = userInDb.userType; + user.credentialRule = userInDb.credentialRule; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + user.creationSource = DlAssetSource::kMatterIM; + user.createdBy = userInDb.createdBy; + user.modificationSource = DlAssetSource::kMatterIM; + user.lastModifiedBy = userInDb.lastModifiedBy; + + ChipLogProgress(Zcl, + "Found occupied user " + "[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u," + "createdBy=%d,lastModifiedBy=%d]", + endpointId, static_cast(user.userName.size()), user.userName.data(), user.credentials.size(), + user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, + user.lastModifiedBy); + + return true; +} + +bool LockManager::SetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, chip::FabricIndex modifier, + const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype, + CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials) +{ + ChipLogProgress(Zcl, + "Door Lock App: LockManager::SetUser " + "[endpoint=%d,userIndex=%d,creator=%d,modifier=%d,userName=%s,uniqueId=%u " + "userStatus=%u,userType=%u,credentialRule=%u,credentials=%p,totalCredentials=%u]", + endpointId, userIndex, creator, modifier, userName.data(), uniqueId, to_underlying(userStatus), + to_underlying(usertype), to_underlying(credentialRule), credentials, totalCredentials); + + VerifyOrReturnValue(userIndex > 0, false); // indices are one-indexed + + userIndex--; + + VerifyOrReturnValue(IsValidUserIndex(userIndex), false); + + auto & userInStorage = mLockUsers[userIndex]; + + if (userName.size() > DOOR_LOCK_MAX_USER_NAME_SIZE) + { + ChipLogError(Zcl, "Cannot set user - user name is too long [endpoint=%d,index=%d]", endpointId, userIndex); + return false; + } + + if (totalCredentials > LockParams.numberOfCredentialsPerUser) + { + ChipLogError(Zcl, "Cannot set user - total number of credentials is too big [endpoint=%d,index=%d,totalCredentials=%u]", + endpointId, userIndex, totalCredentials); + return false; + } + + chip::Platform::CopyString(mUserNames[userIndex], userName); + userInStorage.userName = chip::CharSpan(mUserNames[userIndex], userName.size()); + userInStorage.userUniqueId = uniqueId; + userInStorage.userStatus = userStatus; + userInStorage.userType = usertype; + userInStorage.credentialRule = credentialRule; + userInStorage.lastModifiedBy = modifier; + userInStorage.createdBy = creator; + + for (size_t i = 0; i < totalCredentials; ++i) + { + mCredentials[userIndex][i] = credentials[i]; + } + + userInStorage.credentials = chip::Span(mCredentials[userIndex], totalCredentials); + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + // Save user information in NVM flash + CHIP_ERROR err = + ZephyrConfig::WriteConfigValueBin(LockSettingsStorage::kConfigKey_LockUser, reinterpret_cast(&mLockUsers), + sizeof(EmberAfPluginDoorLockUserInfo) * LockParams.numberOfUsers); + if (err != CHIP_NO_ERROR) + ChipLogError(Zcl, + "Failed to write kConfigKey_LockUser. User data will be resetted during reboot. Not enough storage space \n"); + + err = ZephyrConfig::WriteConfigValueBin( + LockSettingsStorage::kConfigKey_UserCredentials, reinterpret_cast(mCredentials), + sizeof(CredentialStruct) * LockParams.numberOfUsers * LockParams.numberOfCredentialsPerUser); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, + "Failed to write kConfigKey_UserCredentials. User data will be resetted during reboot. Not enough storage space \n"); + + ZephyrConfig::WriteConfigValueBin(LockSettingsStorage::kConfigKey_LockUserName, reinterpret_cast(mUserNames), + sizeof(mUserNames)); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, "Failed to write kConfigKey_LockUserName. User data will be resetted during reboot. Not enough storage space \n"); +#endif + + ChipLogProgress(Zcl, "Successfully set the user [mEndpointId=%d,index=%d]", endpointId, userIndex); + + return true; +} + +bool LockManager::GetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, + EmberAfPluginDoorLockCredentialInfo & credential) +{ + + VerifyOrReturnValue(IsValidCredentialType(credentialType), false); + + if (CredentialTypeEnum::kProgrammingPIN == credentialType) + { + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), + false); // programming pin index is only index allowed to contain 0 + } + else + { + VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed + } + + ChipLogProgress(Zcl, "Lock App: LockManager::GetCredential [credentialType=%u], credentialIndex=%d", + to_underlying(credentialType), credentialIndex); + + const auto & credentialInStorage = mLockCredentials[to_underlying(credentialType)][credentialIndex]; + + credential.status = credentialInStorage.status; + ChipLogProgress(Zcl, "CredentialStatus: %d, CredentialIndex: %d ", (int) credential.status, credentialIndex); + + if (DlCredentialStatus::kAvailable == credential.status) + { + ChipLogProgress(Zcl, "Found unoccupied credential "); + return true; + } + credential.credentialType = credentialInStorage.credentialType; + credential.credentialData = credentialInStorage.credentialData; + credential.createdBy = credentialInStorage.createdBy; + credential.lastModifiedBy = credentialInStorage.lastModifiedBy; + // So far there's no way to actually create the credential outside Matter, so here we always set the creation/modification + // source to Matter + credential.creationSource = DlAssetSource::kMatterIM; + credential.modificationSource = DlAssetSource::kMatterIM; + + ChipLogProgress(Zcl, "Found occupied credential [type=%u,dataSize=%u]", to_underlying(credential.credentialType), + credential.credentialData.size()); + + return true; +} + +bool LockManager::SetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, + const chip::ByteSpan & credentialData) +{ + + VerifyOrReturnValue(IsValidCredentialType(credentialType), false); + + if (CredentialTypeEnum::kProgrammingPIN == credentialType) + { + VerifyOrReturnValue(IsValidCredentialIndex(credentialIndex, credentialType), + false); // programming pin index is only index allowed to contain 0 + } + else + { + VerifyOrReturnValue(IsValidCredentialIndex(--credentialIndex, credentialType), false); // otherwise, indices are one-indexed + } + + ChipLogProgress(Zcl, + "Door Lock App: LockManager::SetCredential " + "[credentialStatus=%u,credentialType=%u,credentialDataSize=%u,creator=%d,modifier=%d]", + to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size(), creator, modifier); + + auto & credentialInStorage = mLockCredentials[to_underlying(credentialType)][credentialIndex]; + + credentialInStorage.status = credentialStatus; + credentialInStorage.credentialType = credentialType; + credentialInStorage.createdBy = creator; + credentialInStorage.lastModifiedBy = modifier; + + memcpy(mCredentialData[to_underlying(credentialType)][credentialIndex], credentialData.data(), credentialData.size()); + credentialInStorage.credentialData = + chip::ByteSpan{ mCredentialData[to_underlying(credentialType)][credentialIndex], credentialData.size() }; + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + // Save credential information in NVM flash + CHIP_ERROR err = ZephyrConfig::WriteConfigValueBin( + LockSettingsStorage::kConfigKey_Credential, reinterpret_cast(&mLockCredentials), + sizeof(EmberAfPluginDoorLockCredentialInfo) * kMaxCredentials * kNumCredentialTypes); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, "Failed to write kConfigKey_Credential. User data will be resetted during reboot. Not enough storage space \n"); + + err = ZephyrConfig::WriteConfigValueBin(LockSettingsStorage::kConfigKey_CredentialData, + reinterpret_cast(&mCredentialData), sizeof(mCredentialData)); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, + "Failed to write kConfigKey_CredentialData. User data will be resetted during reboot. Not enough storage space \n"); +#endif + + ChipLogProgress(Zcl, "Successfully set the credential [credentialType=%u]", to_underlying(credentialType)); + + return true; +} + +DlStatus LockManager::GetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule) +{ + + VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + weekdayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + const auto & scheduleInStorage = mWeekdaySchedule[userIndex][weekdayIndex]; + if (DlScheduleStatus::kAvailable == scheduleInStorage.status) + { + return DlStatus::kNotFound; + } + + schedule = scheduleInStorage.schedule; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetWeekdaySchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, + uint8_t endHour, uint8_t endMinute) +{ + + VerifyOrReturnValue(weekdayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + weekdayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidWeekdayScheduleIndex(weekdayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mWeekdaySchedule[userIndex][weekdayIndex]; + + scheduleInStorage.schedule.daysMask = daysMask; + scheduleInStorage.schedule.startHour = startHour; + scheduleInStorage.schedule.startMinute = startMinute; + scheduleInStorage.schedule.endHour = endHour; + scheduleInStorage.schedule.endMinute = endMinute; + scheduleInStorage.status = status; + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + // Save schedule information in NVM flash + CHIP_ERROR err = ZephyrConfig::WriteConfigValueBin( + LockSettingsStorage::kConfigKey_WeekDaySchedules, reinterpret_cast(mWeekdaySchedule), + sizeof(EmberAfPluginDoorLockWeekDaySchedule) * LockParams.numberOfWeekdaySchedulesPerUser * LockParams.numberOfUsers); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, + "Failed to write kConfigKey_WeekDaySchedules. User data will be resetted during reboot. Not enough storage space \n"); +#endif + + return DlStatus::kSuccess; +} + +DlStatus LockManager::GetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule) +{ + VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + yearDayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + const auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; + if (DlScheduleStatus::kAvailable == scheduleInStorage.status) + { + return DlStatus::kNotFound; + } + + schedule = scheduleInStorage.schedule; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetYeardaySchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) +{ + VerifyOrReturnValue(yearDayIndex > 0, DlStatus::kFailure); // indices are one-indexed + VerifyOrReturnValue(userIndex > 0, DlStatus::kFailure); // indices are one-indexed + + yearDayIndex--; + userIndex--; + + VerifyOrReturnValue(IsValidYeardayScheduleIndex(yearDayIndex), DlStatus::kFailure); + VerifyOrReturnValue(IsValidUserIndex(userIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mYeardaySchedule[userIndex][yearDayIndex]; + + scheduleInStorage.schedule.localStartTime = localStartTime; + scheduleInStorage.schedule.localEndTime = localEndTime; + scheduleInStorage.status = status; + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + // Save schedule information in NVM flash + CHIP_ERROR err = ZephyrConfig::WriteConfigValueBin( + LockSettingsStorage::kConfigKey_YearDaySchedules, reinterpret_cast(mYeardaySchedule), + sizeof(EmberAfPluginDoorLockYearDaySchedule) * LockParams.numberOfYeardaySchedulesPerUser * LockParams.numberOfUsers); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, + "Failed to write kConfigKey_YearDaySchedules. User data will be resetted during reboot. Not enough storage space \n"); +#endif + + return DlStatus::kSuccess; +} + +DlStatus LockManager::GetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed + + holidayIndex--; + + VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); + + const auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; + if (DlScheduleStatus::kAvailable == scheduleInStorage.status) + { + return DlStatus::kNotFound; + } + + schedule = scheduleInStorage.schedule; + + return DlStatus::kSuccess; +} + +DlStatus LockManager::SetHolidaySchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode) +{ + VerifyOrReturnValue(holidayIndex > 0, DlStatus::kFailure); // indices are one-indexed + + holidayIndex--; + + VerifyOrReturnValue(IsValidHolidayScheduleIndex(holidayIndex), DlStatus::kFailure); + + auto & scheduleInStorage = mHolidaySchedule[holidayIndex]; + + scheduleInStorage.schedule.localStartTime = localStartTime; + scheduleInStorage.schedule.localEndTime = localEndTime; + scheduleInStorage.schedule.operatingMode = operatingMode; + scheduleInStorage.status = status; + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + // Save schedule information in NVM flash + CHIP_ERROR err = ZephyrConfig::WriteConfigValueBin( + LockSettingsStorage::kConfigKey_HolidaySchedules, reinterpret_cast(&(mHolidaySchedule)), + sizeof(EmberAfPluginDoorLockHolidaySchedule) * LockParams.numberOfHolidaySchedules); + if (err != CHIP_NO_ERROR) + ChipLogError( + Zcl, + "Failed to write kConfigKey_YearDaySchedules. User data will be resetted during reboot. Not enough storage space \n"); +#endif + + return DlStatus::kSuccess; +} + +const char * LockManager::lockStateToString(DlLockState lockState) const +{ + switch (lockState) + { + case DlLockState::kNotFullyLocked: + return "Not Fully Locked"; + case DlLockState::kLocked: + return "Locked"; + case DlLockState::kUnlocked: + return "Unlocked"; + case DlLockState::kUnlatched: + return "Unlatched"; + case DlLockState::kUnknownEnumValue: + break; + } + + return "Unknown"; +} + +bool LockManager::setLockState(chip::EndpointId endpointId, DlLockState lockState, OperationSource source, OperationErrorEnum & err, + const Nullable & fabricIdx, const Nullable & nodeId, + const Optional & pin) +{ + // Assume pin is required until told otherwise + bool requirePin = true; + uint16_t userIndex = 0; + uint16_t credentialIndex = 0; + chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Get(endpointId, &requirePin); + + // If a pin code is not given + if (!pin.HasValue()) + { + ChipLogProgress(Zcl, "Door Lock App: PIN code is not specified [endpointId=%d]", endpointId); + + // If a pin code is not required + if (!requirePin) + { + ChipLogProgress(Zcl, "Door Lock App: setting door lock state to \"%s\" [endpointId=%d]", lockStateToString(lockState), + endpointId); + + DoorLockServer::Instance().SetLockState(endpointId, lockState, source, NullNullable, NullNullable, fabricIdx, nodeId); + + return true; + } + + ChipLogError(Zcl, "Door Lock App: PIN code is not specified, but it is required [endpointId=%d]", endpointId); + err = OperationErrorEnum::kRestricted; + return false; + } + // Check the PIN code + for (const auto & currentCredential : mLockCredentials[to_underlying(CredentialTypeEnum::kPin)]) + { + if (currentCredential.status == DlCredentialStatus::kAvailable) + { + continue; + } + + if (currentCredential.credentialData.data_equal(pin.Value())) + { + + for (uint16_t i = 1; i <= kMaxUsers; ++i) + { + EmberAfPluginDoorLockUserInfo user; + if (!emberAfPluginDoorLockGetUser(endpointId, i, user)) + { + ChipLogError(Zcl, "[setLockState] Unable to get user: app error [userIndex=%d]", i); + err = OperationErrorEnum::kInvalidCredential; + return false; + } + + // Go through occupied users only + if (UserStatusEnum::kAvailable == user.userStatus) + { + continue; + } + + for (const auto & credential : user.credentials) + { + if (credential.credentialType != CredentialTypeEnum::kPin) + { + continue; + } + + EmberAfPluginDoorLockCredentialInfo credentialInfo; + if (!emberAfPluginDoorLockGetCredential(endpointId, credential.credentialIndex, CredentialTypeEnum::kPin, + credentialInfo)) + { + ChipLogError(Zcl, + "[setLockState] Unable to get credential: app error " + "[userIndex=%d,credentialIndex=%d,credentialType=%u]", + i, credential.credentialIndex, to_underlying(CredentialTypeEnum::kPin)); + err = OperationErrorEnum::kInvalidCredential; + return false; + } + + if (credentialInfo.status != DlCredentialStatus::kOccupied) + { + ChipLogError(Zcl, + "[setLockState] Users/Credentials database error: credential index attached to user is " + "not occupied " + "[userIndex=%d,credentialIndex=%d,credentialType=%u]", + i, credential.credentialIndex, to_underlying(CredentialTypeEnum::kPin)); + err = OperationErrorEnum::kInvalidCredential; + return false; + } + + if (credentialInfo.credentialData.data_equal(currentCredential.credentialData)) + { + userIndex = i; + credentialIndex = credential.credentialIndex; + ChipLogProgress( + Zcl, + "Lock App: specified PIN code was found in the database, setting lock state to \"%s\" [endpointId=%d]", + lockStateToString(lockState), endpointId); + + LockOpCredentials userCredential[] = { { CredentialTypeEnum::kPin, credentialIndex } }; + auto userCredentials = chip::app::DataModel::MakeNullable>(userCredential); + + DoorLockServer::Instance().SetLockState( + endpointId, lockState, source, chip::app::DataModel::MakeNullable(static_cast(userIndex)), + userCredentials, fabricIdx, nodeId); + return true; + } + } + } + } + } + + ChipLogProgress(Zcl, + "Door Lock App: specified PIN code was not found in the database, ignoring command to set lock state to \"%s\" " + "[endpointId=%d]", + lockStateToString(lockState), endpointId); + + err = OperationErrorEnum::kInvalidCredential; + return false; +} diff --git a/examples/lock-app/telink/src/LockSettingsStorage.cpp b/examples/lock-app/telink/src/LockSettingsStorage.cpp new file mode 100644 index 00000000000000..abe83ced65357e --- /dev/null +++ b/examples/lock-app/telink/src/LockSettingsStorage.cpp @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include +#include + +#include + +#if LOCK_MANAGER_CONFIG_USE_NVM_CREDENTIAL_STORAGE + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +#define CONFIG_KEY(key) \ + (key); \ + static_assert(sizeof(key) <= SETTINGS_MAX_NAME_LEN, "Config key too long: " key) + +#define NAMESPACE_CONFIG CHIP_DEVICE_CONFIG_SETTINGS_KEY "/cfg/" + +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_LockUser = CONFIG_KEY(NAMESPACE_CONFIG "lock-user"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_Credential = CONFIG_KEY(NAMESPACE_CONFIG "credential"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_LockUserName = CONFIG_KEY(NAMESPACE_CONFIG "lock-user-name"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_CredentialData = CONFIG_KEY(NAMESPACE_CONFIG "credential-data"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_UserCredentials = CONFIG_KEY(NAMESPACE_CONFIG "user-credentials"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_WeekDaySchedules = CONFIG_KEY(NAMESPACE_CONFIG "week-day-schedules"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_YearDaySchedules = CONFIG_KEY(NAMESPACE_CONFIG "year-day-schedules"); +const ZephyrConfig::Key LockSettingsStorage::kConfigKey_HolidaySchedules = CONFIG_KEY(NAMESPACE_CONFIG "holiday-schedules"); +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip +#endif diff --git a/examples/lock-app/telink/src/ZclCallbacks.cpp b/examples/lock-app/telink/src/ZclCallbacks.cpp index 327db43125a035..7eaf0b303fd697 100644 --- a/examples/lock-app/telink/src/ZclCallbacks.cpp +++ b/examples/lock-app/telink/src/ZclCallbacks.cpp @@ -16,119 +16,159 @@ * limitations under the License. */ -#include "AppTask.h" -#include "BoltLockManager.h" +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" +#include "LockManager.h" +#include -#include +#include #include #include -#include #include #include -#include +#include + +#ifdef DIC_ENABLE +#include "dic.h" +#endif // DIC_ENABLE -using namespace ::chip; using namespace ::chip::app::Clusters; -using namespace ::chip::app::Clusters::DoorLock; +using namespace ::chip::DeviceLayer::Internal; using ::chip::app::DataModel::Nullable; -LOG_MODULE_DECLARE(app, CONFIG_CHIP_APP_LOG_LEVEL); - void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) { - VerifyOrReturn(attributePath.mClusterId == DoorLock::Id && attributePath.mAttributeId == DoorLock::Attributes::LockState::Id); + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - switch (*value) + if (clusterId == DoorLock::Id && attributeId == DoorLock::Attributes::LockState::Id) { - case to_underlying(DlLockState::kLocked): - BoltLockMgr().Lock(BoltLockManager::OperationSource::kRemote); - break; - case to_underlying(DlLockState::kUnlocked): - BoltLockMgr().Unlock(BoltLockManager::OperationSource::kRemote); - break; - default: - break; + DoorLock::DlLockState lockState = *(reinterpret_cast(value)); + ChipLogProgress(Zcl, "Door lock cluster: " ChipLogFormatMEI " state %d", ChipLogValueMEI(clusterId), + to_underlying(lockState)); +#ifdef DIC_ENABLE + dic_sendmsg("lock/state", (const char *) (lockState == DoorLock::DlLockState::kLocked ? "lock" : "unlock")); +#endif // DIC_ENABLE } } -bool emberAfPluginDoorLockGetUser(EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) +/** @brief DoorLock Cluster Init + * + * This function is called when a specific cluster is initialized. It gives the + * application an opportunity to take care of cluster initialization procedures. + * It is called exactly once for each endpoint where cluster is present. + * + * @param endpoint Ver.: always + * + */ +void emberAfDoorLockClusterInitCallback(EndpointId endpoint) {} + +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { - return BoltLockMgr().GetUser(userIndex, user); + ChipLogProgress(Zcl, "Door Lock App: Lock Command endpoint=%d", endpointId); + + return LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION, LockManager::OperationSource::kRemote, + endpointId, err, fabricIdx, nodeId, pinCode); } -bool emberAfPluginDoorLockSetUser(EndpointId endpointId, uint16_t userIndex, FabricIndex creator, FabricIndex modifier, - const CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum userType, - CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials) +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + ChipLogProgress(Zcl, "Door Lock App: Unlock Command endpoint=%d", endpointId); + + return LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::UNLOCK_ACTION, LockManager::OperationSource::kRemote, + endpointId, err, fabricIdx, nodeId, pinCode); +} + +// TODO : Add helper function to call from the Unlock command if we establish Unbolt doesn't need a different behaviour than Unlock +bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) { - return BoltLockMgr().SetUser(userIndex, creator, modifier, userName, uniqueId, userStatus, userType, credentialRule, - credentials, totalCredentials); + ChipLogProgress(Zcl, "Door Lock App: Unbolt Command endpoint=%d", endpointId); + + return LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::UNBOLT_ACTION, LockManager::OperationSource::kRemote, + endpointId, err, fabricIdx, nodeId, pinCode); } -bool emberAfPluginDoorLockGetCredential(EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, +bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, EmberAfPluginDoorLockCredentialInfo & credential) { - return BoltLockMgr().GetCredential(credentialIndex, credentialType, credential); + return LockMgr().GetCredential(endpointId, credentialIndex, credentialType, credential); } -bool emberAfPluginDoorLockSetCredential(EndpointId endpointId, uint16_t credentialIndex, FabricIndex creator, FabricIndex modifier, - DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, - const ByteSpan & secret) +bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, + CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData) { - return BoltLockMgr().SetCredential(credentialIndex, creator, modifier, credentialStatus, credentialType, secret); + return LockMgr().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType, + credentialData); } -bool emberAfPluginDoorLockOnDoorLockCommand(EndpointId endpointId, const Nullable & fabricIdx, - const Nullable & nodeId, const Optional & pinCode, - OperationErrorEnum & err) +bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) { - bool result = BoltLockMgr().ValidatePIN(pinCode, err); + return LockMgr().GetUser(endpointId, userIndex, user); +} - /* Handle changing attribute state on command reception */ - if (result) - { - BoltLockMgr().Lock(BoltLockManager::OperationSource::kRemote); - } +bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId, + UserStatusEnum userStatus, UserTypeEnum usertype, CredentialRuleEnum credentialRule, + const CredentialStruct * credentials, size_t totalCredentials) +{ - return result; + return LockMgr().SetUser(endpointId, userIndex, creator, modifier, userName, uniqueId, userStatus, usertype, credentialRule, + credentials, totalCredentials); } -bool emberAfPluginDoorLockOnDoorUnlockCommand(EndpointId endpointId, const Nullable & fabricIdx, - const Nullable & nodeId, const Optional & pinCode, - OperationErrorEnum & err) +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule) { - bool result = BoltLockMgr().ValidatePIN(pinCode, err); + return LockMgr().GetWeekdaySchedule(endpointId, weekdayIndex, userIndex, schedule); +} - /* Handle changing attribute state on command reception */ - if (result) - { - BoltLockMgr().Unlock(BoltLockManager::OperationSource::kRemote); - } +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule) +{ + return LockMgr().GetYeardaySchedule(endpointId, yearDayIndex, userIndex, schedule); +} - return result; +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & holidaySchedule) +{ + return LockMgr().GetHolidaySchedule(endpointId, holidayIndex, holidaySchedule); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, + uint8_t endHour, uint8_t endMinute) +{ + return LockMgr().SetWeekdaySchedule(endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute, endHour, + endMinute); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) +{ + return LockMgr().SetYeardaySchedule(endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode) +{ + return LockMgr().SetHolidaySchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode); } -void emberAfDoorLockClusterInitCallback(EndpointId endpoint) +void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId) { - DoorLockServer::Instance().InitServer(endpoint); - - const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogError(Zcl, "Failed to set DoorLock %s: %x", attributeName, status); - } - }; - - logOnFailure(DoorLock::Attributes::LockType::Set(endpoint, DlLockType::kDeadBolt), "type"); - logOnFailure(DoorLock::Attributes::NumberOfTotalUsersSupported::Set(endpoint, CONFIG_LOCK_NUM_USERS), "number of users"); - logOnFailure(DoorLock::Attributes::NumberOfPINUsersSupported::Set(endpoint, CONFIG_LOCK_NUM_USERS), "number of PIN users"); - logOnFailure(DoorLock::Attributes::NumberOfRFIDUsersSupported::Set(endpoint, 0), "number of RFID users"); - logOnFailure(DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Set(endpoint, CONFIG_LOCK_NUM_CREDENTIALS_PER_USER), - "number of credentials per user"); - - // Set FeatureMap to (kUser|kPinCredential), default is: - // (kUser|kAccessSchedules|kRfidCredential|kPinCredential) 0x113 - logOnFailure(DoorLock::Attributes::FeatureMap::Set(endpoint, 0x101), "feature map"); - - GetAppTask().UpdateClusterState(BoltLockMgr().GetState(), BoltLockManager::OperationSource::kUnspecified); + // Apply the relock state in the application control + LockMgr().LockAction(AppEvent::kEventType_Lock, LockManager::LOCK_ACTION, LockManager::OperationSource::kRemote, endpointId); } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index fc003cb3e47cda..320fbef7972df9 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -112,13 +112,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { 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 5a55faf0acb564..694d7dfd23db47 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 @@ -258,6 +258,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -432,13 +434,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1043,8 +1045,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateProvider { diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index d445d8a2694769..7618bf4feab2f9 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -706,6 +706,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -732,7 +764,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 8b45d61e1bae74..327a987dd2df5e 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 - Setup build environment: 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 a82caa410e336d..a0016dd0adca29 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 @@ -364,6 +364,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -616,13 +618,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1224,8 +1226,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index f2eae5d5381cfc..ba49e2d5405cf7 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index 18fc33513d1348..e997d895b40030 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:25 + $ docker pull ghcr.io/project-chip/chip-build-ameba:26 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:25 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 - Setup build environment: diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 08244cbd5558ef..14be472f374cae 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -191,13 +191,18 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1018,7 +1023,7 @@ client cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute optional TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1042,7 +1047,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1348,12 +1353,12 @@ client cluster GeneralCommissioning = 48 { response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } @@ -1415,13 +1420,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -5824,7 +5829,7 @@ client cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ client cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -5933,7 +5938,7 @@ client cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -5946,7 +5951,7 @@ client cluster KeypadInput = 1289 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -7435,17 +7440,13 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index e8aa35532dc7ac..0dbe7077a0b98e 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -8760,7 +8760,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8776,7 +8776,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8792,7 +8792,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ScheduleProgrammingVisibilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11909,70 +11909,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -12006,16 +11942,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12079,7 +12015,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 6a256de13a3c46..12c47d5ad6f951 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -191,13 +191,18 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1001,7 +1006,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1307,12 +1312,12 @@ client cluster GeneralCommissioning = 48 { response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } @@ -1374,13 +1379,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -5783,7 +5788,7 @@ client cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ client cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -5892,7 +5897,7 @@ client cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -5905,7 +5910,7 @@ client cluster KeypadInput = 1289 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -7399,17 +7404,13 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index cc205cd4014202..725e63e1c64cdc 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -8834,7 +8834,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8850,7 +8850,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8866,7 +8866,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ScheduleProgrammingVisibilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -11991,70 +11991,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -12088,16 +12024,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12161,7 +12097,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp b/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp index 2326ff96bbec4d..32cf15e2ea7cb3 100644 --- a/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp +++ b/examples/platform/bouffalolab/common/iot_sdk/platform_port.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include diff --git a/examples/platform/telink/common/include/AppEventCommon.h b/examples/platform/telink/common/include/AppEventCommon.h index 0110cd3c840e63..b9fa40ece20bc5 100644 --- a/examples/platform/telink/common/include/AppEventCommon.h +++ b/examples/platform/telink/common/include/AppEventCommon.h @@ -39,6 +39,7 @@ struct AppEvent kEventType_Install, kEventType_Contact, kEventType_Start, + kEventType_Lock }; uint16_t Type; diff --git a/examples/platform/tizen/OptionsProxy.cpp b/examples/platform/tizen/OptionsProxy.cpp index f970887ba140b1..c00ac172e6627d 100644 --- a/examples/platform/tizen/OptionsProxy.cpp +++ b/examples/platform/tizen/OptionsProxy.cpp @@ -22,8 +22,8 @@ #include -#include -#include +#include +#include namespace { diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 9fe08dabc85948..d14a2b76939d31 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -387,6 +387,8 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -584,13 +586,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1476,11 +1478,13 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 375e3d3153b19f..8b75e480002c3c 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -680,6 +680,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -754,7 +786,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 64387316daa2d6..09c985bdd451d5 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -387,6 +387,8 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -584,13 +586,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1476,11 +1478,13 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index 65f9b199e2dad7..495fff6f0fbb6d 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -680,6 +680,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -754,7 +786,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 64387316daa2d6..09c985bdd451d5 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -387,6 +387,8 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -584,13 +586,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1476,11 +1478,13 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index 65f9b199e2dad7..495fff6f0fbb6d 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -680,6 +680,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -754,7 +786,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 73dfe6669f45fa..fce972f5248c2d 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 @@ -312,6 +312,8 @@ server cluster BasicInformation = 40 { readonly attribute char_string<64> productLabel = 14; readonly attribute char_string<32> serialNumber = 15; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -509,13 +511,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1362,11 +1364,13 @@ endpoint 0 { callback attribute productLabel; callback attribute serialNumber; 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 = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 3e2892f5f6980a..b49eda85d62b1c 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -680,6 +680,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -754,7 +786,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index b5fed44e3a7d4b..4352e13bf71d13 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -187,6 +187,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -263,7 +265,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -312,13 +314,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -986,11 +988,13 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList default = 0; callback attribute acceptedCommandList default = 0; callback attribute attributeList default = 0; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap index d395dcaf657f41..1b693aa645ec51 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.zap @@ -728,6 +728,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -802,7 +834,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter index 1e397640853ebe..b5f769892d1dbe 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -552,13 +554,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1735,8 +1737,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap index 4d7e0be291c3ec..76c0e5ae655023 100644 --- a/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap +++ b/examples/resource-monitoring-app/resource-monitoring-common/resource-monitoring-app.zap @@ -772,6 +772,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -798,7 +830,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 724da67819aa69..224a8462ea9e7e 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -231,6 +231,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -279,13 +281,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1052,8 +1054,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster GeneralCommissioning { diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index e5f9e297ad0b19..a8453c00f44c68 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/shell/shell_common/cmd_server.cpp b/examples/shell/shell_common/cmd_server.cpp index d18eb88cf7a1b0..cb6b5e558627ce 100644 --- a/examples/shell/shell_common/cmd_server.cpp +++ b/examples/shell/shell_common/cmd_server.cpp @@ -119,17 +119,18 @@ static bool PrintServerSession(void * context, SessionHandle & session) case Session::SessionType::kSecure: { SecureSession * secureSession = session->AsSecureSession(); SecureSession::Type secureSessionType = secureSession->GetSecureSessionType(); - streamer_printf( - streamer_get(), "session type=SECURE %s id=0x%04x peerSessionId=0x%04x peerNodeId=0x%016" PRIx64 " fabricIdx=%d\r\n", - secureSessionType == SecureSession::Type::kCASE ? "CASE" : "PASE", secureSession->GetLocalSessionId(), - secureSession->AsSecureSession()->GetPeerSessionId(), secureSession->GetPeerNodeId(), secureSession->GetFabricIndex()); + streamer_printf(streamer_get(), + "session type=SECURE %s id=0x%04x peerSessionId=0x%04x peerNodeId=0x" ChipLogFormatX64 " fabricIdx=%d\r\n", + secureSessionType == SecureSession::Type::kCASE ? "CASE" : "PASE", secureSession->GetLocalSessionId(), + secureSession->AsSecureSession()->GetPeerSessionId(), ChipLogValueX64(secureSession->GetPeerNodeId()), + secureSession->GetFabricIndex()); break; } case Session::SessionType::kUnauthenticated: { UnauthenticatedSession * unsecuredSession = session->AsUnauthenticatedSession(); - streamer_printf(streamer_get(), "session type=UNSECURED id=0x0000 peerNodeId=0x%016" PRIx64 "\r\n", - unsecuredSession->GetPeerNodeId()); + streamer_printf(streamer_get(), "session type=UNSECURED id=0x0000 peerNodeId=0x" ChipLogFormatX64 "\r\n", + ChipLogValueX64(unsecuredSession->GetPeerNodeId())); break; } 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 6e3fcceebd5938..38f42d6178b908 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 @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -784,13 +786,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1641,7 +1643,7 @@ server cluster IcdManagement = 70 { fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */ @@ -1798,8 +1800,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 4c14f07879f16f..e5caa73950857c 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -616,6 +616,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -642,7 +674,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 0cac71676f13d7..74c4af426c3abc 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -185,6 +185,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -412,7 +414,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -461,13 +463,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1253,8 +1255,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index 66282eabffd0bd..61eac32389a438 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -632,6 +632,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -658,7 +690,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 0a26d44715f2c1..0120c82d54af9d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -185,13 +185,18 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -488,6 +493,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -715,7 +722,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -994,13 +1001,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1872,8 +1879,10 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -2124,14 +2133,10 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute sceneTableSize; - callback attribute remainingCapacity; - ram attribute featureMap default = 0; + callback attribute fabricSceneInfo; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 4; handle command AddScene; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 56dd1a3407ac3f..cd687ebbd28424 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -732,6 +732,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -758,7 +790,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -3852,70 +3884,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -3949,13 +3917,13 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3974,7 +3942,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 9bc75ba88c8253..c97af9e72e22da 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -185,13 +185,18 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -488,6 +493,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -715,7 +722,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -994,13 +1001,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1781,8 +1788,10 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { @@ -1978,14 +1987,10 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute sceneTableSize; - callback attribute remainingCapacity; - ram attribute featureMap default = 0; + callback attribute fabricSceneInfo; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 4; handle command AddScene; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 053dbd5850ddf5..c5a2a9ce6af5b0 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -732,6 +732,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -758,7 +790,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -2994,70 +3026,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -3091,13 +3059,13 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3116,7 +3084,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/thermostat/silabs/src/AppTask.cpp b/examples/thermostat/silabs/src/AppTask.cpp index 22d0bb3010b9ab..b58ad0a288a99e 100644 --- a/examples/thermostat/silabs/src/AppTask.cpp +++ b/examples/thermostat/silabs/src/AppTask.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index c555296bdff957..82dff269065247 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -367,6 +367,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -594,7 +596,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -643,13 +645,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1735,8 +1737,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 0814a6f2d070de..fef78b92cbb186 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -758,6 +758,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -784,7 +816,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4932,7 +4964,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4948,7 +4980,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index a68c60a05ce6d0..657d7e92c0299a 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -22,7 +22,6 @@ #pragma once -#include #include #include #include diff --git a/examples/tv-app/android/java/KeypadInputManager.cpp b/examples/tv-app/android/java/KeypadInputManager.cpp index a25a3bdbbc7975..5267f1ec70c9db 100644 --- a/examples/tv-app/android/java/KeypadInputManager.cpp +++ b/examples/tv-app/android/java/KeypadInputManager.cpp @@ -41,7 +41,7 @@ void KeypadInputManager::NewManager(jint endpoint, jobject manager) chip::app::Clusters::KeypadInput::SetDefaultDelegate(static_cast(endpoint), mgr); } -void KeypadInputManager::HandleSendKey(CommandResponseHelper & helper, const CecKeyCode & keyCode) +void KeypadInputManager::HandleSendKey(CommandResponseHelper & helper, const CECKeyCodeEnum & keyCode) { Commands::SendKeyResponse::Type response; diff --git a/examples/tv-app/android/java/KeypadInputManager.h b/examples/tv-app/android/java/KeypadInputManager.h index 8c43cc043d67ec..77d58a8255830b 100644 --- a/examples/tv-app/android/java/KeypadInputManager.h +++ b/examples/tv-app/android/java/KeypadInputManager.h @@ -32,7 +32,7 @@ class KeypadInputManager : public KeypadInputDelegate void InitializeWithObjects(jobject managerObject); void HandleSendKey(CommandResponseHelper & helper, - const chip::app::Clusters::KeypadInput::CecKeyCode & keyCode) override; + const chip::app::Clusters::KeypadInput::CECKeyCodeEnum & keyCode) override; uint32_t GetFeatureMap(chip::EndpointId endpoint) override; diff --git a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h index 79a83b3e65017f..66d43ed7ec8c6f 100644 --- a/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h +++ b/examples/tv-app/tv-common/clusters/keypad-input/KeypadInputManager.h @@ -23,7 +23,7 @@ using chip::app::CommandResponseHelper; using KeypadInputDelegate = chip::app::Clusters::KeypadInput::Delegate; using SendKeyResponseType = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Type; -using CecKeyCodeType = chip::app::Clusters::KeypadInput::CecKeyCode; +using CecKeyCodeType = chip::app::Clusters::KeypadInput::CECKeyCodeEnum; class KeypadInputManager : public KeypadInputDelegate { diff --git a/examples/tv-app/tv-common/include/AppTv.h b/examples/tv-app/tv-common/include/AppTv.h index e81a9e02568465..5f02536b3b86d0 100644 --- a/examples/tv-app/tv-common/include/AppTv.h +++ b/examples/tv-app/tv-common/include/AppTv.h @@ -22,7 +22,6 @@ #pragma once -#include #include #include #include diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 686be9cfbedaeb..6fdb3513292735 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -377,6 +377,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -526,7 +528,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -575,12 +577,12 @@ client cluster GeneralCommissioning = 48 { response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } @@ -642,13 +644,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2105,7 +2107,7 @@ server cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ server cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -2214,7 +2216,7 @@ server cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -2543,8 +2545,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateProvider { diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 04bf74e8470481..0dbf91850f33cc 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -716,6 +716,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -742,7 +774,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index 08b6fc194eee3d..b4d9b37a422028 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -1663,7 +1663,7 @@ JNI_METHOD(jboolean, keypadInput_1sendKey) ChipLogError(AppServer, "MatterCallbackHandlerJNI.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); err = CastingServer::GetInstance()->KeypadInput_SendKey( - &endpoint, static_cast(keyCode), + &endpoint, static_cast(keyCode), [](CHIP_ERROR err) { TvCastingAppJNIMgr().getMediaCommandResponseHandler(KeypadInput_SendKey).Handle(err); }); VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "CastingServer.KeypadInput_SendKey failed %" CHIP_ERROR_FORMAT, err.Format())); diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index e2227134d0ee8c..b19d72097f7ecc 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -2154,7 +2154,7 @@ - (void)keypadInput_sendKey:(ContentApp * _Nonnull)contentApp [ConversionUtils convertToCppTargetEndpointInfoFrom:contentApp outTargetEndpointInfo:endpoint]; return castingServer->KeypadInput_SendKey(&endpoint, - static_cast(keyCode), responseFunction); + static_cast(keyCode), responseFunction); }]; } diff --git a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp index 7eb9894a106fd9..e86942e39ac2b0 100644 --- a/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp +++ b/examples/tv-casting-app/tv-casting-common/commands/common/CHIPCommand.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include #include #include diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index 90c986a0b330d4..349edaefb31a79 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -303,7 +303,7 @@ class CastingServer : public AppDelegate /** * @brief Keypad Input cluster */ - CHIP_ERROR KeypadInput_SendKey(TargetEndpointInfo * endpoint, const chip::app::Clusters::KeypadInput::CecKeyCode keyCode, + CHIP_ERROR KeypadInput_SendKey(TargetEndpointInfo * endpoint, const chip::app::Clusters::KeypadInput::CECKeyCodeEnum keyCode, std::function responseCallback); /** diff --git a/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h b/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h index a4e7a43338e9d6..0f4dce699b1a6f 100644 --- a/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h +++ b/examples/tv-casting-app/tv-casting-common/include/KeypadInput.h @@ -29,5 +29,6 @@ class SendKeyCommand : public MediaCommandBase responseCallback); + CHIP_ERROR Invoke(const chip::app::Clusters::KeypadInput::CECKeyCodeEnum keyCode, + std::function responseCallback); }; diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 6b64a1d18c3786..fbbb9d32d8f030 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -1100,7 +1100,7 @@ CHIP_ERROR CastingServer::TargetNavigator_SubscribeToCurrentTarget( * @brief Keypad Input cluster */ CHIP_ERROR CastingServer::KeypadInput_SendKey(TargetEndpointInfo * endpoint, - const chip::app::Clusters::KeypadInput::CecKeyCode keyCode, + const chip::app::Clusters::KeypadInput::CECKeyCodeEnum keyCode, std::function responseCallback) { ReturnErrorOnFailure(mSendKeyCommand.SetTarget(mActiveTargetVideoPlayerInfo, endpoint->GetEndpointId())); diff --git a/examples/tv-casting-app/tv-casting-common/src/KeypadInput.cpp b/examples/tv-casting-app/tv-casting-common/src/KeypadInput.cpp index d9469603b292a4..52a03390b70520 100644 --- a/examples/tv-casting-app/tv-casting-common/src/KeypadInput.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/KeypadInput.cpp @@ -21,7 +21,7 @@ using namespace chip; using namespace chip::app::Clusters; -CHIP_ERROR SendKeyCommand::Invoke(const chip::app::Clusters::KeypadInput::CecKeyCode keyCode, +CHIP_ERROR SendKeyCommand::Invoke(const chip::app::Clusters::KeypadInput::CECKeyCodeEnum keyCode, std::function responseCallback) { KeypadInput::Commands::SendKey::Type request; 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 f98df945fdeb26..dabf87dce4771a 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 @@ -550,6 +550,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -628,7 +630,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -677,13 +679,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1624,7 +1626,7 @@ client cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ client cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -1733,7 +1735,7 @@ client cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { @@ -2069,8 +2071,10 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster LocalizationConfiguration { diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index d55da66fab0eba..47b9613daf8d37 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -690,6 +690,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -716,7 +748,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, 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 f37d7c7d13713c..0ac18cb306965c 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 @@ -143,13 +143,18 @@ provisional server cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -510,6 +515,8 @@ server cluster BasicInformation = 40 { readonly attribute boolean reachable = 17; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -659,7 +666,7 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -938,13 +945,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -2585,8 +2592,10 @@ endpoint 0 { ram attribute reachable default = 1; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateProvider { @@ -2903,18 +2912,14 @@ endpoint 1 { } server cluster Scenes { - callback attribute sceneCount default = 0x00; - ram attribute currentScene default = 0x00; - ram attribute currentGroup default = 0x0000; - ram attribute sceneValid default = 0x00; ram attribute nameSupport; ram attribute sceneTableSize default = 16; - callback attribute remainingCapacity default = 8; + callback attribute fabricSceneInfo; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 7; + ram attribute featureMap default = 15; ram attribute clusterRevision default = 5; handle command AddScene; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap index 097ec6eccb6b40..35997c63e72573 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.zap @@ -706,6 +706,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -732,7 +764,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4456,70 +4488,6 @@ } ], "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "NameSupport", "code": 4, @@ -4553,16 +4521,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4642,7 +4610,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index a9b36634431a89..7d67b87aadcb3e 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -300,6 +300,8 @@ server cluster BasicInformation = 40 { attribute access(write: manage) boolean localConfigDisabled = 16; readonly attribute char_string<32> uniqueID = 18; readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + 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; @@ -810,13 +812,13 @@ server cluster GeneralCommissioning = 48 { request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } response struct SetRegulatoryConfigResponse = 3 { @@ -1878,12 +1880,14 @@ endpoint 0 { persist attribute localConfigDisabled default = 0; callback attribute uniqueID; callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; } server cluster OtaSoftwareUpdateRequestor { diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 5f68fc675bd72d..6864330578b014 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -752,6 +752,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "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": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -842,7 +874,7 @@ "storageOption": "RAM", "singleton": 1, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/window-app/silabs/include/LcdPainter.h b/examples/window-app/silabs/include/LcdPainter.h index d0740167bdd06c..adc5775afa7c43 100644 --- a/examples/window-app/silabs/include/LcdPainter.h +++ b/examples/window-app/silabs/include/LcdPainter.h @@ -18,10 +18,7 @@ #pragma once -// clang-format off -#include "app-common/zap-generated/enums.h" #include "app-common/zap-generated/cluster-enums.h" -// clang-format on #include diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 1524312420e11f..f412e5e447ba4f 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -6,7 +6,7 @@ steps: - "--init" - "--recursive" id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -21,7 +21,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -85,7 +85,7 @@ steps: --target k32w-shell build --create-archives /workspace/artifacts/ - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index be406882ad733f..89aed7276e411f 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 2700s - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -27,7 +27,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index b7f517c78bbc31..8619ae62bfd58f 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:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" git submodule update --init --recursive id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -22,7 +22,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -43,7 +43,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -64,7 +64,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -86,7 +86,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -139,7 +139,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:25" + - name: "ghcr.io/project-chip/chip-build-vscode:26" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index fd6132e9519dd8..d056281b6a539b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -733,6 +733,7 @@ def BuildTelinkTarget(): target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('factory-data', enable_factory_data=True) target.AppendModifier('4mb', enable_4mb_flash=True) + target.AppendModifier('mars', mars_board_config=True) return target diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index 1dc75cfacc9c42..72ba965c69b1f5 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -144,7 +144,8 @@ def __init__(self, enable_shell: bool = False, enable_rpcs: bool = False, enable_factory_data: bool = False, - enable_4mb_flash: bool = False): + enable_4mb_flash: bool = False, + mars_board_config: bool = False): super(TelinkBuilder, self).__init__(root, runner) self.app = app self.board = board @@ -154,6 +155,7 @@ def __init__(self, self.enable_rpcs = enable_rpcs self.enable_factory_data = enable_factory_data self.enable_4mb_flash = enable_4mb_flash + self.mars_board_config = mars_board_config def get_cmd_prefixes(self): if not self._runner.dry_run: @@ -192,6 +194,9 @@ def generate(self): if self.enable_4mb_flash: flags.append("-DFLASH_SIZE=4m") + if self.mars_board_config: + flags.append("-DTLNK_MARS_BOARD=y") + if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index d8739213c5d24f..558c2c21191eab 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -22,5 +22,5 @@ nrf-native-posix-64-tests qpg-qpg6105-{lock,light,shell,persistent-storage}[-updateimage] stm32-stm32wb5mm-dk-light tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui] -telink-{tlsr9518adk80d,tlsr9528a,tlsr9528a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,resource-monitoring,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb] +telink-{tlsr9518adk80d,tlsr9528a,tlsr9528a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,resource-monitoring,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars] openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/scripts/configure b/scripts/configure index f974f415493ad8..16d78f789e284f 100755 --- a/scripts/configure +++ b/scripts/configure @@ -93,6 +93,10 @@ function main() { # ... [[ -n "$PROJECT_PATH" && -r "${PROJECT_PATH}/.gn" ]] || fail "Invalid project '${PROJECT}' - missing .gn at '${PROJECT_PATH}'" fi + if [[ -n "$PW_ROOT" ]]; then + info "WARNING: A Pigweed environment appears to be active, this is usually a misconfiguration." + fi + check_binary gn GN check_binary ninja NINJA @@ -149,7 +153,7 @@ function create_empty_pw_env() { info "Creating empty $gni in source tree" echo "# ${CONFIGURE_MARKER}" >"${CHIP_ROOT}/${gni}" else - info "Warning: Leaving existing $gni in place, this might affect the build configuration." + info "WARNING: Leaving existing $gni in place, this might affect the build configuration." fi fi } diff --git a/scripts/py_matter_idl/BUILD.gn b/scripts/py_matter_idl/BUILD.gn index 37b17477aabfbc..01983d0a890724 100644 --- a/scripts/py_matter_idl/BUILD.gn +++ b/scripts/py_matter_idl/BUILD.gn @@ -64,6 +64,7 @@ pw_python_package("matter_idl") { tests = [ "matter_idl/test_backwards_compatibility.py", + "matter_idl/test_data_model_xml.py", "matter_idl/test_matter_idl_parser.py", "matter_idl/test_generators.py", "matter_idl/test_idl_generator.py", diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/derivation.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/derivation.py index ff4bd9ddc664c8..79ddb29974b568 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/derivation.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/derivation.py @@ -13,10 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # +import dataclasses import logging from typing import Iterable, Optional, Protocol, TypeVar -from matter_idl.matter_idl_types import Attribute, Bitmap, Cluster, Command, Enum, Event, Idl, Struct +from matter_idl.matter_idl_types import Attribute, AttributeQuality, Bitmap, Cluster, Command, Enum, Event, Idl, Struct from .context import Context, IdlPostProcessor from .parsing import NormalizeName @@ -81,6 +82,9 @@ def merge_event_into(e: Event, cluster: Cluster): def merge_attribute_into(a: Attribute, cluster: Cluster): + """Pushes an attribute from a base cluster into an already + parsed cluster. + """ existing: Optional[Attribute] = None for existing_a in cluster.attributes: if existing_a.definition.name == a.definition.name: @@ -88,13 +92,24 @@ def merge_attribute_into(a: Attribute, cluster: Cluster): break if existing: - # Do not provide merging as it seems only conformance is changed from - # the base cluster - # - # This should fix the correct types - # - # LOGGER.error("TODO: Do not know how to merge attribute for %s::%s", cluster.name, existing.definition.name) - cluster.attributes.remove(existing) + # Merge examples: + # UserLabelCluster::LabelList changes qualities (access, mandatory) + # ModeDishwasher: + # - changes the type of a list from sint32 to list[ModeOptionStruct] + # - Sets the field as read-only + + # Carry over data type and definitions, except quality and maturity + existing.definition = dataclasses.replace( + a.definition, + qualities=existing.definition.qualities, + api_maturity=existing.definition.api_maturity, + ) + + # Inherit attribute quality + if existing.qualities == AttributeQuality.NONE: + existing.qualities = a.qualities + + return cluster.attributes.append(a) diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py index 9fe7a58e5ce9f3..624bcb56b9dc01 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py @@ -92,10 +92,13 @@ def NormalizeDataType(t: str) -> str: # Handle oddities in current data model XML schema for nicer diffs _REF_NAME_MAPPING = { - "<>": "char_string", + "<>": "endpoint_no", + "<>": "epoch_us", + "<>": "node_id", "<>": "octet_string", + "<>": "char_string", "<>": "vendor_id", - "<>": "endpoint_no", + "<>": "fabric_idx", } diff --git a/scripts/py_matter_idl/matter_idl/test_data_model_xml.py b/scripts/py_matter_idl/matter_idl/test_data_model_xml.py index 6117f35e9f1ad2..06418f894ffcd6 100755 --- a/scripts/py_matter_idl/matter_idl/test_data_model_xml.py +++ b/scripts/py_matter_idl/matter_idl/test_data_model_xml.py @@ -214,15 +214,13 @@ def testClusterDerivation(self): ModeTagStruct modeTags[] = 2; } + readonly attribute ModeOptionStruct supportedModes[] = 0; readonly attribute attrib_id attributeList[] = 65531; readonly attribute event_id eventList[] = 65530; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - - // baseline inserted after, so to pass the test add this at the end - readonly attribute ModeOptionStruct supportedModes[] = 0; } ''') diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter index 9886eb91264dfc..6c1204d2f42b13 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter @@ -3250,7 +3250,7 @@ server cluster LowPower = 1288 { } server cluster KeypadInput = 1289 { - enum CecKeyCode : ENUM8 { + enum CECKeyCodeEnum : ENUM8 { kSelect = 0; kUp = 1; kDown = 2; @@ -3355,7 +3355,7 @@ server cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index a1fb66ca8adf8f..cc21c740b964a6 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -55,6 +55,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml"; diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index 1b3a767aa1c242..d0b2635bcf3398 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -16,6 +16,7 @@ import glob import os +import re import subprocess import click @@ -24,6 +25,11 @@ DEFAULT_OUTPUT_DIR = os.path.abspath(os.path.join(DEFAULT_CHIP_ROOT, 'data_model')) +def get_xml_path(filename, output_dir): + xml = os.path.basename(filename).replace('.adoc', '.xml') + return os.path.abspath(os.path.join(output_dir, xml)) + + @click.command() @click.option( '--scraper', @@ -45,8 +51,14 @@ is_flag=True, help='Flag for dry run') def main(scraper, spec_root, output_dir, dry_run): - # TODO: Add scrapers for device types + # Clusters need to be scraped first because the cluster directory is passed to the device type directory + scrape_clusters(scraper, spec_root, output_dir, dry_run) + scrape_device_types(scraper, spec_root, output_dir, dry_run) + if not dry_run: + dump_versions(scraper, spec_root, output_dir) + +def scrape_clusters(scraper, spec_root, output_dir, dry_run): src_dir = os.path.abspath(os.path.join(spec_root, 'src')) sdm_clusters_dir = os.path.abspath(os.path.join(src_dir, 'service_device_management')) app_clusters_dir = os.path.abspath(os.path.join(src_dir, 'app_clusters')) @@ -65,8 +77,7 @@ def main(scraper, spec_root, output_dir, dry_run): os.makedirs(clusters_output_dir) def scrape_cluster(filename: str) -> None: - xml = os.path.basename(filename).replace('.adoc', '.xml') - xml_path = os.path.abspath(os.path.join(clusters_output_dir, xml)) + xml_path = get_xml_path(filename, clusters_output_dir) cmd = [scraper, 'cluster', filename, xml_path, '-nd'] if dry_run: print(cmd) @@ -86,13 +97,44 @@ def scrape_all_clusters(dir: str, exclude_list: list[str] = []) -> None: filename = f'{dm_clusters_dir}/{f}' scrape_cluster(filename) - # Put the current spec sha into the cluster dir + +def scrape_device_types(scraper, spec_root, output_dir, dry_run): + device_type_dir = os.path.abspath(os.path.join(spec_root, 'src', 'device_types')) + device_types_output_dir = os.path.abspath(os.path.join(output_dir, 'device_types')) + clusters_output_dir = os.path.abspath(os.path.join(output_dir, 'clusters')) + + if not os.path.exists(device_types_output_dir): + os.makedirs(device_types_output_dir) + + def scrape_device_type(filename: str) -> None: + xml_path = get_xml_path(filename, device_types_output_dir) + cmd = [scraper, 'devicetype', '-c', clusters_output_dir, '-nd', filename, xml_path] + if dry_run: + print(cmd) + else: + print(' '.join(cmd)) + subprocess.run(cmd) + + exclude_list = [r"section_*"] + for filename in glob.glob(f'{device_type_dir}/*.adoc'): + for exclude in exclude_list: + if not re.match(exclude, os.path.basename(filename)): + scrape_device_type(filename) + + +def dump_versions(scraper, spec_root, output_dir): sha_file = os.path.abspath(os.path.join(output_dir, 'spec_sha')) out = subprocess.run(['git', 'rev-parse', 'HEAD'], capture_output=True, encoding="utf8", cwd=spec_root) sha = out.stdout with open(sha_file, 'wt', encoding='utf8') as output: output.write(sha) + scraper_file = os.path.abspath(os.path.join(output_dir, 'scraper_version')) + out = subprocess.run([scraper, '--version'], capture_output=True, encoding="utf8") + version = out.stdout + with open(scraper_file, "wt", encoding='utf8') as output: + output.write(version) + if __name__ == '__main__': main() diff --git a/scripts/tools/zap/run_zaptool.sh b/scripts/tools/zap/run_zaptool.sh index 8885cddea10669..72c596270c7c95 100755 --- a/scripts/tools/zap/run_zaptool.sh +++ b/scripts/tools/zap/run_zaptool.sh @@ -31,6 +31,10 @@ SCRIPT_PATH="$(_get_fullpath "$0")" CHIP_ROOT="${SCRIPT_PATH%/scripts/tools/zap/run_zaptool.sh}" [[ -n "$1" ]] && ZAP_ARGS="-i \"$(_get_fullpath "$1")\"" || ZAP_ARGS="" +if [[ -z "$ZAP_INSTALL_PATH" && -n "$PW_ZAP_CIPD_INSTALL_DIR" ]]; then + ZAP_INSTALL_PATH="$PW_ZAP_CIPD_INSTALL_DIR" +fi + if [ ! -z "$ZAP_DEVELOPMENT_PATH" ]; then WORKING_DIR=$ZAP_DEVELOPMENT_PATH ZAP_CMD="node src-script/zap-start.js" diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index dec068948ba752..fbff9c8e36435b 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -6184,16 +6184,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -6273,7 +6273,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10346,7 +10346,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "TemperatureDisplayModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10362,7 +10362,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "KeypadLockoutEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10378,7 +10378,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ScheduleProgrammingVisibilityEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -15431,16 +15431,16 @@ "reportableChange": 0 }, { - "name": "RemainingCapacity", + "name": "FabricSceneInfo", "code": 7, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "8", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -15520,7 +15520,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "7", + "defaultValue": "15", "reportable": 1, "minInterval": 1, "maxInterval": 65534, 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 5403f99d2c747e..c1e762de1b2526 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 @@ -234,6 +234,7 @@ 0x0000002B, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \ 0x0000002C, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \ 0x0000002C, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \ + 0x0000002D, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \ 0x00000030, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 0x00000031, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 0x0000003F, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ @@ -292,6 +293,7 @@ 0x00000000, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \ 0x00000000, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \ 0x00000001, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \ + 0x00000000, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \ 0x00000000, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ 0x00000004, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ 0x00000000, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ @@ -350,6 +352,7 @@ kMatterAccessPrivilegeManage, /* Cluster: Localization Configuration, Attribute: ActiveLocale, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Time Format Localization, Attribute: HourFormat, Privilege: manage */ \ kMatterAccessPrivilegeManage, /* Cluster: Time Format Localization, Attribute: ActiveCalendarType, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Unit Localization, Attribute: TemperatureUnit, Privilege: manage */ \ kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ kMatterAccessPrivilegeManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index dd8fd1525e0d67..5c987480bc96ac 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -759,8 +759,8 @@ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000007, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RemainingCapacity */ \ - { ZAP_SIMPLE_DEFAULT(7), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ + { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -1426,8 +1426,8 @@ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(BOOLEAN), 0 }, /* SceneValid */ \ { ZAP_EMPTY_DEFAULT(), 0x00000004, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ { ZAP_SIMPLE_DEFAULT(16), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* SceneTableSize */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000007, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* RemainingCapacity */ \ - { ZAP_SIMPLE_DEFAULT(7), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000007, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FabricSceneInfo */ \ + { ZAP_SIMPLE_DEFAULT(15), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: On/Off (server) */ \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h index fc0a4d3df39f84..11f7d888fcbbd8 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h @@ -107,11 +107,11 @@ // Scenes FeatureMap Attribute Toggle Scenes Name feature // App cluster specs 1.4.4 #define MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK 0x0001 -#define MATTER_CLUSTER_SCENE_NAME_SUPPORT (0x0007 & MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK) +#define MATTER_CLUSTER_SCENE_NAME_SUPPORT (0x000F & MATTER_CLUSTER_SCENE_NAME_SUPPORT_MASK) // Scenes FeatureMap Table Size feature used for the MATTER_SCENES_TABLE_SIZE define // App cluster specs 1.4.4.2 #define MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK 0x0001 -#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT (0x0007 & MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK) +#define MATTER_CLUSTER_TABLE_SIZE_SUPPORT (0x000F & MATTER_CLUSTER_TABLE_SIZE_SUPPORT_MASK) // Use this macro to check if the server side of the On/Off cluster is included #define ZCL_USING_ON_OFF_CLUSTER_SERVER diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index fd97a9c083f414..ff1de58cbe91b0 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index a7a9baddf55cd8..987bfdcaf2521f 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -62,12 +62,22 @@ buildconfig_header("app_buildconfig") { "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_report_on_active_mode}", "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", ] + + visibility = [ ":app_config" ] +} + +source_set("revision_info") { + sources = [ + "DataModelRevision.h", + "InteractionModelRevision.h", + "SpecificationVersion.h", + ] } source_set("app_config") { sources = [ "AppConfig.h" ] - public_deps = [ ":app_buildconfig" ] + deps = [ ":app_buildconfig" ] } static_library("app") { @@ -101,7 +111,6 @@ static_library("app") { "FailSafeContext.h", "GlobalAttributes.h", "InteractionModelEngine.cpp", - "InteractionModelRevision.h", "InteractionModelTimeout.h", "MessageDef/ArrayBuilder.cpp", "MessageDef/ArrayParser.cpp", @@ -237,6 +246,7 @@ static_library("app") { public_deps = [ ":app_config", + ":revision_info", "${chip_root}/src/access", "${chip_root}/src/app/icd:notifier", "${chip_root}/src/app/icd:observer", diff --git a/src/app/BufferedReadCallback.h b/src/app/BufferedReadCallback.h index f8faaaa1a0fd74..b24257884e1a77 100644 --- a/src/app/BufferedReadCallback.h +++ b/src/app/BufferedReadCallback.h @@ -21,7 +21,7 @@ #include "lib/core/TLV.h" #include "system/SystemPacketBuffer.h" #include "system/TLVPacketBufferBackingStore.h" -#include +#include #include #include #include diff --git a/src/app/ClusterStateCache.h b/src/app/ClusterStateCache.h index 9955dee0104edc..4c663a2a5fc2f9 100644 --- a/src/app/ClusterStateCache.h +++ b/src/app/ClusterStateCache.h @@ -21,7 +21,7 @@ #include "lib/core/CHIPError.h" #include "system/SystemPacketBuffer.h" #include "system/TLVPacketBufferBackingStore.h" -#include +#include #include #include #include diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index a447597cc97cea..8fd13bab7247f0 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -251,6 +251,8 @@ Status CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommandElem ConcreteCommandPath concretePath(0, 0, 0); TLV::TLVReader commandDataReader; + SetGroupRequest(false); + // NOTE: errors may occur before the concrete command path is even fully decoded. err = aCommandElement.GetPath(&commandPath); @@ -352,6 +354,7 @@ Status CommandHandler::ProcessGroupCommandDataIB(CommandDataIB::Parser & aComman Credentials::GroupDataProvider::GroupEndpoint mapping; Credentials::GroupDataProvider * groupDataProvider = Credentials::GetGroupDataProvider(); Credentials::GroupDataProvider::EndpointIterator * iterator; + SetGroupRequest(true); err = aCommandElement.GetPath(&commandPath); VerifyOrReturnError(err == CHIP_NO_ERROR, Status::InvalidAction); @@ -462,7 +465,8 @@ CHIP_ERROR CommandHandler::AddStatusInternal(const ConcreteCommandPath & aComman void CommandHandler::AddStatus(const ConcreteCommandPath & aCommandPath, const Protocols::InteractionModel::Status aStatus, const char * context) { - + // Return prematurely in case of requests targeted to a group that should not add the status for response purposes. + VerifyOrReturn(!IsGroupRequest()); VerifyOrDie(FallibleAddStatus(aCommandPath, aStatus, context) == CHIP_NO_ERROR); } diff --git a/src/app/CommandHandler.h b/src/app/CommandHandler.h index 3c9a86c97b6052..65542ef0587f55 100644 --- a/src/app/CommandHandler.h +++ b/src/app/CommandHandler.h @@ -406,6 +406,16 @@ class CommandHandler : public Messaging::ExchangeDelegate return FinishCommand(/* aEndDataStruct = */ false); } + /** + * Check whether the InvokeRequest we are handling is targeted to a group. + */ + bool IsGroupRequest() { return mGroupRequest; } + + /** + * Sets the state flag to keep the information that request we are handling is targeted to a group. + */ + void SetGroupRequest(bool isGroupRequest) { mGroupRequest = isGroupRequest; } + Messaging::ExchangeHolder mExchangeCtx; Callback * mpCallback = nullptr; InvokeResponseMessage::Builder mInvokeResponseBuilder; @@ -416,7 +426,8 @@ class CommandHandler : public Messaging::ExchangeDelegate bool mSentStatusResponse = false; - State mState = State::Idle; + State mState = State::Idle; + bool mGroupRequest = false; chip::System::PacketBufferTLVWriter mCommandMessageWriter; TLV::TLVWriter mBackupWriter; bool mBufferAllocated = false; diff --git a/src/app/CompatEnumNames.h b/src/app/CompatEnumNames.h index 5e4efd735be26c..f370132e86b16e 100644 --- a/src/app/CompatEnumNames.h +++ b/src/app/CompatEnumNames.h @@ -19,7 +19,6 @@ * is meant to be included at the end of cluster-enums.h, after all the normal * enum definitions are available. */ - #pragma once namespace chip { @@ -61,6 +60,8 @@ using ApplicationLauncherStatusEnum = StatusEnum; namespace KeypadInput { // https://github.com/project-chip/connectedhomeip/pull/30316 renamed this using KeypadInputStatusEnum = StatusEnum; +// https://github.com/project-chip/connectedhomeip/pull/30497 renamed this +using CecKeyCode = CECKeyCodeEnum; } // namespace KeypadInput namespace Channel { diff --git a/src/app/ConcreteAttributePath.h b/src/app/ConcreteAttributePath.h index 312311f848a900..b06a4b8a3b3acf 100644 --- a/src/app/ConcreteAttributePath.h +++ b/src/app/ConcreteAttributePath.h @@ -48,6 +48,8 @@ struct ConcreteAttributePath : public ConcreteClusterPath mExpanded = false; } + bool IsValid() const { return ConcreteClusterPath::HasValidIds() && IsValidAttributeId(mAttributeId); } + bool operator==(const ConcreteAttributePath & aOther) const { return ConcreteClusterPath::operator==(aOther) && (mAttributeId == aOther.mAttributeId); diff --git a/src/app/ConcreteClusterPath.h b/src/app/ConcreteClusterPath.h index 6865fdb29a14c6..58b2f5b477f139 100644 --- a/src/app/ConcreteClusterPath.h +++ b/src/app/ConcreteClusterPath.h @@ -38,6 +38,8 @@ struct ConcreteClusterPath bool IsValidConcreteClusterPath() const { return !(mEndpointId == kInvalidEndpointId || mClusterId == kInvalidClusterId); } + bool HasValidIds() const { return IsValidEndpointId(mEndpointId) && IsValidClusterId(mClusterId); } + bool operator==(const ConcreteClusterPath & aOther) const { return mEndpointId == aOther.mEndpointId && mClusterId == aOther.mClusterId; diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 541b0902ce90c9..d202dc7d07c062 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -29,7 +29,7 @@ #include "access/RequestPath.h" #include "access/SubjectDescriptor.h" -#include +#include #include #include #include diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 0ecf3f6c6b1ec0..ca1fa92f240c58 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -26,7 +26,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeDataIB.h b/src/app/MessageDef/AttributeDataIB.h index 9095616df2c2e2..abcff0b5b3c48d 100644 --- a/src/app/MessageDef/AttributeDataIB.h +++ b/src/app/MessageDef/AttributeDataIB.h @@ -22,7 +22,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeDataIBs.h b/src/app/MessageDef/AttributeDataIBs.h index 16d606efd0bacd..b6c211edffca3f 100644 --- a/src/app/MessageDef/AttributeDataIBs.h +++ b/src/app/MessageDef/AttributeDataIBs.h @@ -27,7 +27,7 @@ #include "ArrayParser.h" #include "AttributeDataIB.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributePathIB.cpp b/src/app/MessageDef/AttributePathIB.cpp index 635d9122ecc303..52e7c6b78660ec 100644 --- a/src/app/MessageDef/AttributePathIB.cpp +++ b/src/app/MessageDef/AttributePathIB.cpp @@ -66,7 +66,7 @@ CHIP_ERROR AttributePathIB::Parser::PrettyPrint() const { NodeId node; reader.Get(node); - PRETTY_PRINT("\tNode = 0x%" PRIx64 ",", node); + PRETTY_PRINT("\tNode = 0x" ChipLogFormatX64 ",", ChipLogValueX64(node)); } #endif // CHIP_DETAIL_LOGGING break; @@ -171,13 +171,17 @@ CHIP_ERROR AttributePathIB::Parser::GetListIndex(DataModel::Nullable return GetNullableUnsignedInteger(to_underlying(Tag::kListIndex), apListIndex); } -CHIP_ERROR AttributePathIB::Parser::GetGroupAttributePath(ConcreteDataAttributePath & aAttributePath) const +CHIP_ERROR AttributePathIB::Parser::GetGroupAttributePath(ConcreteDataAttributePath & aAttributePath, + ValidateIdRanges aValidateRanges) const { ReturnErrorOnFailure(GetCluster(&aAttributePath.mClusterId)); - VerifyOrReturnError(IsValidClusterId(aAttributePath.mClusterId), CHIP_IM_GLOBAL_STATUS(InvalidAction)); - ReturnErrorOnFailure(GetAttribute(&aAttributePath.mAttributeId)); - VerifyOrReturnError(IsValidAttributeId(aAttributePath.mAttributeId), CHIP_IM_GLOBAL_STATUS(InvalidAction)); + + if (aValidateRanges == ValidateIdRanges::kYes) + { + VerifyOrReturnError(IsValidClusterId(aAttributePath.mClusterId), CHIP_IM_GLOBAL_STATUS(InvalidAction)); + VerifyOrReturnError(IsValidAttributeId(aAttributePath.mAttributeId), CHIP_IM_GLOBAL_STATUS(InvalidAction)); + } CHIP_ERROR err = CHIP_NO_ERROR; DataModel::Nullable listIndex; @@ -204,9 +208,10 @@ CHIP_ERROR AttributePathIB::Parser::GetGroupAttributePath(ConcreteDataAttributeP return err; } -CHIP_ERROR AttributePathIB::Parser::GetConcreteAttributePath(ConcreteDataAttributePath & aAttributePath) const +CHIP_ERROR AttributePathIB::Parser::GetConcreteAttributePath(ConcreteDataAttributePath & aAttributePath, + ValidateIdRanges aValidateRanges) const { - ReturnErrorOnFailure(GetGroupAttributePath(aAttributePath)); + ReturnErrorOnFailure(GetGroupAttributePath(aAttributePath, aValidateRanges)); // And now read our endpoint. return GetEndpoint(&aAttributePath.mEndpointId); diff --git a/src/app/MessageDef/AttributePathIB.h b/src/app/MessageDef/AttributePathIB.h index 6441b18ec59eb9..e1740d305d5578 100644 --- a/src/app/MessageDef/AttributePathIB.h +++ b/src/app/MessageDef/AttributePathIB.h @@ -21,7 +21,7 @@ #include "ListBuilder.h" #include "ListParser.h" -#include +#include #include #include #include @@ -45,6 +45,12 @@ enum class Tag : uint8_t kListIndex = 5, }; +enum class ValidateIdRanges : uint8_t +{ + kYes, + kNo, +}; + class Parser : public ListParser { public: @@ -136,10 +142,13 @@ class Parser : public ListParser * as ReplaceAll if that's appropriate to their context. * * @param [in] aAttributePath The attribute path object to write to. + * @param [in] aValidateRanges Whether to validate that the cluster/attribute + * IDs in the path are in the right ranges. * * @return #CHIP_NO_ERROR on success */ - CHIP_ERROR GetConcreteAttributePath(ConcreteDataAttributePath & aAttributePath) const; + CHIP_ERROR GetConcreteAttributePath(ConcreteDataAttributePath & aAttributePath, + ValidateIdRanges aValidateRanges = ValidateIdRanges::kYes) const; /** * @brief Get a group attribute path. This will set the ListOp to @@ -148,10 +157,13 @@ class Parser : public ListParser * endpoint id of the resulting path might have any value. * * @param [in] aAttributePath The attribute path object to write to. + * @param [in] aValidateRanges Whether to validate that the cluster/attribute + * IDs in the path are in the right ranges. * * @return #CHIP_NO_ERROR on success */ - CHIP_ERROR GetGroupAttributePath(ConcreteDataAttributePath & aAttributePath) const; + CHIP_ERROR GetGroupAttributePath(ConcreteDataAttributePath & aAttributePath, + ValidateIdRanges aValidateRanges = ValidateIdRanges::kYes) const; // TODO(#14934) Add a function to get ConcreteDataAttributePath from AttributePathIB::Parser directly. diff --git a/src/app/MessageDef/AttributePathIBs.h b/src/app/MessageDef/AttributePathIBs.h index 7845e7d21e3ea6..c817825f719316 100644 --- a/src/app/MessageDef/AttributePathIBs.h +++ b/src/app/MessageDef/AttributePathIBs.h @@ -22,7 +22,7 @@ #include "ArrayParser.h" #include "AttributePathIB.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeReportIB.h b/src/app/MessageDef/AttributeReportIB.h index f5f8335bd4f4cf..7a9c56f85d4d67 100644 --- a/src/app/MessageDef/AttributeReportIB.h +++ b/src/app/MessageDef/AttributeReportIB.h @@ -22,7 +22,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeReportIBs.h b/src/app/MessageDef/AttributeReportIBs.h index 422a639cce459b..0256f256954b0f 100644 --- a/src/app/MessageDef/AttributeReportIBs.h +++ b/src/app/MessageDef/AttributeReportIBs.h @@ -27,7 +27,7 @@ #include "ArrayParser.h" #include "AttributeReportIB.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeStatusIB.h b/src/app/MessageDef/AttributeStatusIB.h index cf959041b6c977..10f4851cd91a85 100644 --- a/src/app/MessageDef/AttributeStatusIB.h +++ b/src/app/MessageDef/AttributeStatusIB.h @@ -22,7 +22,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/AttributeStatusIBs.h b/src/app/MessageDef/AttributeStatusIBs.h index 03b1d00653463d..edfeec41b2c8bf 100644 --- a/src/app/MessageDef/AttributeStatusIBs.h +++ b/src/app/MessageDef/AttributeStatusIBs.h @@ -22,7 +22,7 @@ #include "ArrayParser.h" #include "AttributeStatusIB.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/ClusterPathIB.cpp b/src/app/MessageDef/ClusterPathIB.cpp index 5f9ec4695b0b19..39b932b32ebb50 100644 --- a/src/app/MessageDef/ClusterPathIB.cpp +++ b/src/app/MessageDef/ClusterPathIB.cpp @@ -53,7 +53,7 @@ CHIP_ERROR ClusterPathIB::Parser::PrettyPrint() const { NodeId node; reader.Get(node); - PRETTY_PRINT("\tNode = 0x%" PRIx64 ",", node); + PRETTY_PRINT("\tNode = 0x" ChipLogFormatX64 ",", ChipLogValueX64(node)); } #endif // CHIP_DETAIL_LOGGING break; diff --git a/src/app/MessageDef/ClusterPathIB.h b/src/app/MessageDef/ClusterPathIB.h index 8e78408e9d9c87..65969a0fd78c88 100644 --- a/src/app/MessageDef/ClusterPathIB.h +++ b/src/app/MessageDef/ClusterPathIB.h @@ -20,7 +20,7 @@ #include "ListBuilder.h" #include "ListParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/CommandDataIB.cpp b/src/app/MessageDef/CommandDataIB.cpp index 4222c4d919719b..ea9bc3390b1f61 100644 --- a/src/app/MessageDef/CommandDataIB.cpp +++ b/src/app/MessageDef/CommandDataIB.cpp @@ -64,6 +64,14 @@ CHIP_ERROR CommandDataIB::Parser::PrettyPrint() const ReturnErrorOnFailure(CheckIMPayload(reader, 0, "CommandFields")); PRETTY_PRINT_DECDEPTH(); break; + case to_underlying(Tag::kRef): + VerifyOrReturnError(TLV::kTLVType_UnsignedInteger == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + { + uint16_t reference; + ReturnErrorOnFailure(reader.Get(reference)); + PRETTY_PRINT("\tRef = 0x%x,", reference); + } + break; default: PRETTY_PRINT("Unknown tag num %" PRIu32, tagNum); break; @@ -96,12 +104,22 @@ CHIP_ERROR CommandDataIB::Parser::GetFields(TLV::TLVReader * const apReader) con return CHIP_NO_ERROR; } +CHIP_ERROR CommandDataIB::Parser::GetRef(uint16_t * const apRef) const +{ + return GetUnsignedInteger(to_underlying(Tag::kRef), apRef); +} + CommandPathIB::Builder & CommandDataIB::Builder::CreatePath() { mError = mPath.Init(mpWriter, to_underlying(Tag::kPath)); return mPath; } +CHIP_ERROR CommandDataIB::Builder::Ref(const uint16_t aRef) +{ + return mpWriter->Put(TLV::ContextTag(Tag::kRef), aRef); +} + CHIP_ERROR CommandDataIB::Builder::EndOfCommandDataIB() { EndOfContainer(); diff --git a/src/app/MessageDef/CommandDataIB.h b/src/app/MessageDef/CommandDataIB.h index c3cce65f2e8511..b3bd2f4181d2c9 100644 --- a/src/app/MessageDef/CommandDataIB.h +++ b/src/app/MessageDef/CommandDataIB.h @@ -23,7 +23,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include @@ -37,6 +37,7 @@ enum class Tag : uint8_t { kPath = 0, kFields = 1, + kRef = 2, }; class Parser : public StructParser @@ -66,6 +67,17 @@ class Parser : public StructParser * #CHIP_END_OF_TLV if there is no such element */ CHIP_ERROR GetFields(TLV::TLVReader * const apReader) const; + + /** + * @brief Get the provided command reference associated with the CommandData + * + * @param [in] apRef A pointer to apRef + * + * @return #CHIP_NO_ERROR on success + * #CHIP_ERROR_WRONG_TLV_TYPE if there is such element but it's not any of the defined unsigned integer types + * #CHIP_END_OF_TLV if there is no such element + */ + CHIP_ERROR GetRef(uint16_t * const apRef) const; }; class Builder : public StructBuilder @@ -78,6 +90,16 @@ class Builder : public StructBuilder */ CommandPathIB::Builder & CreatePath(); + /** + * @brief Inject Command Ref into the TLV stream. + * + * @param [in] aRef refer to the CommandRef to set in CommandDataIB. + * + * TODO What are some more errors + * @return #CHIP_NO_ERROR on success + */ + CHIP_ERROR Ref(const uint16_t aRef); + /** * @brief Mark the end of this CommandDataIB * diff --git a/src/app/MessageDef/CommandPathIB.h b/src/app/MessageDef/CommandPathIB.h index 21aa1e521d2184..ac3ef9e63d23ac 100644 --- a/src/app/MessageDef/CommandPathIB.h +++ b/src/app/MessageDef/CommandPathIB.h @@ -21,7 +21,7 @@ #include "ListBuilder.h" #include "ListParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/CommandStatusIB.h b/src/app/MessageDef/CommandStatusIB.h index 8574937291375d..8614df28cab4b5 100644 --- a/src/app/MessageDef/CommandStatusIB.h +++ b/src/app/MessageDef/CommandStatusIB.h @@ -23,7 +23,7 @@ #include "StatusIB.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/DataVersionFilterIB.h b/src/app/MessageDef/DataVersionFilterIB.h index 33988384482020..ba9c0b19cdbe4f 100644 --- a/src/app/MessageDef/DataVersionFilterIB.h +++ b/src/app/MessageDef/DataVersionFilterIB.h @@ -20,7 +20,7 @@ #include "ClusterPathIB.h" #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/DataVersionFilterIBs.h b/src/app/MessageDef/DataVersionFilterIBs.h index 91be119d84452e..199a6686cb011f 100644 --- a/src/app/MessageDef/DataVersionFilterIBs.h +++ b/src/app/MessageDef/DataVersionFilterIBs.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventDataIB.cpp b/src/app/MessageDef/EventDataIB.cpp index 471ccfae07e54f..cb5a7458c9f19f 100644 --- a/src/app/MessageDef/EventDataIB.cpp +++ b/src/app/MessageDef/EventDataIB.cpp @@ -70,7 +70,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { EventNumber number; ReturnErrorOnFailure(reader.Get(number)); - PRETTY_PRINT("\tEventNumber = 0x%" PRIx64 ",", number); + PRETTY_PRINT("\tEventNumber = 0x" ChipLogFormatX64 ",", ChipLogValueX64(number)); } #endif // CHIP_DETAIL_LOGGING break; @@ -81,7 +81,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { uint64_t value; ReturnErrorOnFailure(reader.Get(value)); - PRETTY_PRINT("\tPriorityLevel = 0x%" PRIx64 ",", value); + PRETTY_PRINT("\tPriorityLevel = 0x" ChipLogFormatX64 ",", ChipLogValueX64(value)); } #endif // CHIP_DETAIL_LOGGING break; @@ -92,7 +92,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { uint64_t value; ReturnErrorOnFailure(reader.Get(value)); - PRETTY_PRINT("\tEpochTimestamp = 0x%" PRIx64 ",", value); + PRETTY_PRINT("\tEpochTimestamp = 0x" ChipLogFormatX64 ",", ChipLogValueX64(value)); } #endif // CHIP_DETAIL_LOGGING break; @@ -104,7 +104,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { uint64_t value; ReturnErrorOnFailure(reader.Get(value)); - PRETTY_PRINT("\tSystemTimestamp = 0x%" PRIx64 ",", value); + PRETTY_PRINT("\tSystemTimestamp = 0x" ChipLogFormatX64 ",", ChipLogValueX64(value)); } #endif // CHIP_DETAIL_LOGGING break; @@ -115,7 +115,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { uint64_t value; ReturnErrorOnFailure(reader.Get(value)); - PRETTY_PRINT("\tDeltaEpochTimestampstamp= 0x%" PRIx64 ",", value); + PRETTY_PRINT("\tDeltaEpochTimestampstamp= 0x" ChipLogFormatX64 ",", ChipLogValueX64(value)); } #endif // CHIP_DETAIL_LOGGING break; @@ -126,7 +126,7 @@ CHIP_ERROR EventDataIB::Parser::PrettyPrint() const { uint64_t value; ReturnErrorOnFailure(reader.Get(value)); - PRETTY_PRINT("\tDeltaSystemTimestamp = 0x%" PRIx64 ",", value); + PRETTY_PRINT("\tDeltaSystemTimestamp = 0x" ChipLogFormatX64 ",", ChipLogValueX64(value)); } #endif // CHIP_DETAIL_LOGGING break; diff --git a/src/app/MessageDef/EventDataIB.h b/src/app/MessageDef/EventDataIB.h index 1086a89634c45e..77dcfe77e214fe 100644 --- a/src/app/MessageDef/EventDataIB.h +++ b/src/app/MessageDef/EventDataIB.h @@ -26,7 +26,7 @@ #include "EventPathIB.h" #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventFilterIB.cpp b/src/app/MessageDef/EventFilterIB.cpp index b4ad035a2b48b1..651bcc7a2ba7e8 100644 --- a/src/app/MessageDef/EventFilterIB.cpp +++ b/src/app/MessageDef/EventFilterIB.cpp @@ -57,7 +57,7 @@ CHIP_ERROR EventFilterIB::Parser::PrettyPrint() const { NodeId node; ReturnErrorOnFailure(reader.Get(node)); - PRETTY_PRINT("\tNode = 0x%" PRIx64 ",", node); + PRETTY_PRINT("\tNode = 0x" ChipLogFormatX64 ",", ChipLogValueX64(node)); } #endif // CHIP_DETAIL_LOGGING break; @@ -66,7 +66,7 @@ CHIP_ERROR EventFilterIB::Parser::PrettyPrint() const { uint64_t eventMin; ReturnErrorOnFailure(reader.Get(eventMin)); - PRETTY_PRINT("\tEventMin = 0x%" PRIx64 ",", eventMin); + PRETTY_PRINT("\tEventMin = 0x" ChipLogFormatX64 ",", ChipLogValueX64(eventMin)); } #endif // CHIP_DETAIL_LOGGING break; diff --git a/src/app/MessageDef/EventFilterIB.h b/src/app/MessageDef/EventFilterIB.h index 914874684642a3..a2bd4d7f9a72cf 100644 --- a/src/app/MessageDef/EventFilterIB.h +++ b/src/app/MessageDef/EventFilterIB.h @@ -25,7 +25,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventFilterIBs.h b/src/app/MessageDef/EventFilterIBs.h index e3b216c126f483..7c2d7604ff9a2c 100644 --- a/src/app/MessageDef/EventFilterIBs.h +++ b/src/app/MessageDef/EventFilterIBs.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventPathIB.cpp b/src/app/MessageDef/EventPathIB.cpp index a9bbfc4cb6dafc..1c21f346889511 100644 --- a/src/app/MessageDef/EventPathIB.cpp +++ b/src/app/MessageDef/EventPathIB.cpp @@ -57,7 +57,7 @@ CHIP_ERROR EventPathIB::Parser::PrettyPrint() const { NodeId node; reader.Get(node); - PRETTY_PRINT("\tNode = 0x%" PRIx64 ",", node); + PRETTY_PRINT("\tNode = 0x" ChipLogFormatX64 ",", ChipLogValueX64(node)); } #endif // CHIP_DETAIL_LOGGING break; diff --git a/src/app/MessageDef/EventPathIB.h b/src/app/MessageDef/EventPathIB.h index 2a136631d831a4..f1ce1cb719a370 100644 --- a/src/app/MessageDef/EventPathIB.h +++ b/src/app/MessageDef/EventPathIB.h @@ -21,7 +21,7 @@ #include "ListBuilder.h" #include "ListParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventPathIBs.h b/src/app/MessageDef/EventPathIBs.h index 9ce2e308d0d5ee..5f5c85f85df083 100644 --- a/src/app/MessageDef/EventPathIBs.h +++ b/src/app/MessageDef/EventPathIBs.h @@ -23,7 +23,7 @@ #include "EventPathIB.h" #include "EventPathIBs.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventReportIB.h b/src/app/MessageDef/EventReportIB.h index efafdbef9bf065..3db9d782a6daa1 100644 --- a/src/app/MessageDef/EventReportIB.h +++ b/src/app/MessageDef/EventReportIB.h @@ -22,7 +22,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventReportIBs.h b/src/app/MessageDef/EventReportIBs.h index ebaa12f4647c28..a52001fb7d1f0e 100644 --- a/src/app/MessageDef/EventReportIBs.h +++ b/src/app/MessageDef/EventReportIBs.h @@ -27,7 +27,7 @@ #include "ArrayParser.h" #include "EventReportIB.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/EventStatusIB.h b/src/app/MessageDef/EventStatusIB.h index 8abce827ad6ca8..f0e57a2ba38bac 100644 --- a/src/app/MessageDef/EventStatusIB.h +++ b/src/app/MessageDef/EventStatusIB.h @@ -22,7 +22,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/InvokeRequestMessage.h b/src/app/MessageDef/InvokeRequestMessage.h index 36b32a4c15a5a7..0678e03ec10480 100644 --- a/src/app/MessageDef/InvokeRequestMessage.h +++ b/src/app/MessageDef/InvokeRequestMessage.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/InvokeRequests.h b/src/app/MessageDef/InvokeRequests.h index f82a8a8fa92625..71f9f74c328725 100644 --- a/src/app/MessageDef/InvokeRequests.h +++ b/src/app/MessageDef/InvokeRequests.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/InvokeResponseIB.h b/src/app/MessageDef/InvokeResponseIB.h index 14da578caa571f..17cc90ee6e3d3b 100644 --- a/src/app/MessageDef/InvokeResponseIB.h +++ b/src/app/MessageDef/InvokeResponseIB.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/InvokeResponseIBs.h b/src/app/MessageDef/InvokeResponseIBs.h index 1712c6fd22de8b..2531785fd6fa94 100644 --- a/src/app/MessageDef/InvokeResponseIBs.h +++ b/src/app/MessageDef/InvokeResponseIBs.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/InvokeResponseMessage.h b/src/app/MessageDef/InvokeResponseMessage.h index 1399f747a507b5..87cb7c14746646 100644 --- a/src/app/MessageDef/InvokeResponseMessage.h +++ b/src/app/MessageDef/InvokeResponseMessage.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/MessageDefHelper.cpp b/src/app/MessageDef/MessageDefHelper.cpp index cffadddff6aa5a..db24b2623dcc00 100644 --- a/src/app/MessageDef/MessageDefHelper.cpp +++ b/src/app/MessageDef/MessageDefHelper.cpp @@ -138,6 +138,8 @@ CHIP_ERROR CheckIMPayload(TLV::TLVReader & aReader, int aDepth, const char * aLa ReturnErrorOnFailure(aReader.Get(value_s64)); + // TODO: Figure out how to not use PRId64 here, since it's not supported + // on all libcs. PRETTY_PRINT_SAMELINE("%" PRId64 ", ", value_s64); break; } @@ -147,6 +149,8 @@ CHIP_ERROR CheckIMPayload(TLV::TLVReader & aReader, int aDepth, const char * aLa ReturnErrorOnFailure(aReader.Get(value_u64)); + // TODO: Figure out how to not use PRIu64 here, since it's not supported + // on all libcs. PRETTY_PRINT_SAMELINE("%" PRIu64 ", ", value_u64); break; } diff --git a/src/app/MessageDef/MessageDefHelper.h b/src/app/MessageDef/MessageDefHelper.h index b19b41ce9c8eaf..890c5d39b7824d 100644 --- a/src/app/MessageDef/MessageDefHelper.h +++ b/src/app/MessageDef/MessageDefHelper.h @@ -28,7 +28,7 @@ #include #include -#include +#include // We need CHIPLogging.h to get the right value for CHIP_DETAIL_LOGGING here. #include diff --git a/src/app/MessageDef/MessageParser.h b/src/app/MessageDef/MessageParser.h index 6a2c3469f467a4..e307d5b905d965 100644 --- a/src/app/MessageDef/MessageParser.h +++ b/src/app/MessageDef/MessageParser.h @@ -19,7 +19,7 @@ #pragma once #include "StructParser.h" -#include +#include #include #include diff --git a/src/app/MessageDef/ReadRequestMessage.h b/src/app/MessageDef/ReadRequestMessage.h index 880ad9d8bd4d52..2b9391bc4f61ef 100644 --- a/src/app/MessageDef/ReadRequestMessage.h +++ b/src/app/MessageDef/ReadRequestMessage.h @@ -23,7 +23,7 @@ #include "EventPathIBs.h" #include "MessageBuilder.h" #include "MessageParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/ReportDataMessage.h b/src/app/MessageDef/ReportDataMessage.h index a515635ae8500a..57d531258f82e2 100644 --- a/src/app/MessageDef/ReportDataMessage.h +++ b/src/app/MessageDef/ReportDataMessage.h @@ -23,7 +23,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/app/MessageDef/StatusIB.h b/src/app/MessageDef/StatusIB.h index 6e7a88229f415b..0dadccc58ee527 100644 --- a/src/app/MessageDef/StatusIB.h +++ b/src/app/MessageDef/StatusIB.h @@ -26,7 +26,7 @@ #include "StructBuilder.h" #include "StructParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/StatusResponseMessage.h b/src/app/MessageDef/StatusResponseMessage.h index c4e753eede0781..5440b49b22812f 100644 --- a/src/app/MessageDef/StatusResponseMessage.h +++ b/src/app/MessageDef/StatusResponseMessage.h @@ -18,7 +18,7 @@ #pragma once #include "MessageBuilder.h" #include "MessageParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/SubscribeRequestMessage.h b/src/app/MessageDef/SubscribeRequestMessage.h index 3eeb6686da7c8c..e09abf1bea75ba 100644 --- a/src/app/MessageDef/SubscribeRequestMessage.h +++ b/src/app/MessageDef/SubscribeRequestMessage.h @@ -23,7 +23,7 @@ #include "EventPathIBs.h" #include "MessageBuilder.h" #include "MessageParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/SubscribeResponseMessage.h b/src/app/MessageDef/SubscribeResponseMessage.h index 9d331f7d303020..fc1edc12ed22fd 100644 --- a/src/app/MessageDef/SubscribeResponseMessage.h +++ b/src/app/MessageDef/SubscribeResponseMessage.h @@ -19,7 +19,7 @@ #include "EventPathIBs.h" #include "MessageBuilder.h" #include "MessageParser.h" -#include +#include #include #include #include diff --git a/src/app/MessageDef/TimedRequestMessage.h b/src/app/MessageDef/TimedRequestMessage.h index 4a1d13f670e5f9..cc4b1c48a5628e 100644 --- a/src/app/MessageDef/TimedRequestMessage.h +++ b/src/app/MessageDef/TimedRequestMessage.h @@ -18,7 +18,7 @@ #pragma once #include "MessageBuilder.h" #include "MessageParser.h" -#include +#include #include #include #include diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 373d2051d3457f..bbc1c68a4b87b8 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -641,9 +641,12 @@ void ReadClient::OnResponseTimeout(Messaging::ExchangeContext * apExchangeContex CHIP_ERROR ReadClient::ProcessAttributePath(AttributePathIB::Parser & aAttributePathParser, ConcreteDataAttributePath & aAttributePath) { + // The ReportData must contain a concrete attribute path. Don't validate ID + // ranges here, so we can tell apart "malformed data" and "out of range + // IDs". CHIP_ERROR err = CHIP_NO_ERROR; // The ReportData must contain a concrete attribute path - err = aAttributePathParser.GetConcreteAttributePath(aAttributePath); + err = aAttributePathParser.GetConcreteAttributePath(aAttributePath, AttributePathIB::ValidateIdRanges::kNo); VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB); return CHIP_NO_ERROR; } @@ -679,6 +682,17 @@ CHIP_ERROR ReadClient::ProcessAttributeReportIBs(TLV::TLVReader & aAttributeRepo StatusIB::Parser errorStatus; ReturnErrorOnFailure(status.GetPath(&path)); ReturnErrorOnFailure(ProcessAttributePath(path, attributePath)); + if (!attributePath.IsValid()) + { + // Don't fail the entire read or subscription when there is an + // out-of-range ID. Just skip that one AttributeReportIB. + ChipLogError(DataManagement, + "Skipping AttributeStatusIB with out-of-range IDs: (%d, " ChipLogFormatMEI ", " ChipLogFormatMEI ") ", + attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), + ChipLogValueMEI(attributePath.mAttributeId)); + continue; + } + ReturnErrorOnFailure(status.GetErrorStatus(&errorStatus)); ReturnErrorOnFailure(errorStatus.DecodeStatusIB(statusIB)); NoteReportingData(); @@ -689,6 +703,17 @@ CHIP_ERROR ReadClient::ProcessAttributeReportIBs(TLV::TLVReader & aAttributeRepo ReturnErrorOnFailure(report.GetAttributeData(&data)); ReturnErrorOnFailure(data.GetPath(&path)); ReturnErrorOnFailure(ProcessAttributePath(path, attributePath)); + if (!attributePath.IsValid()) + { + // Don't fail the entire read or subscription when there is an + // out-of-range ID. Just skip that one AttributeReportIB. + ChipLogError(DataManagement, + "Skipping AttributeDataIB with out-of-range IDs: (%d, " ChipLogFormatMEI ", " ChipLogFormatMEI ") ", + attributePath.mEndpointId, ChipLogValueMEI(attributePath.mClusterId), + ChipLogValueMEI(attributePath.mAttributeId)); + continue; + } + DataVersion version = 0; ReturnErrorOnFailure(data.GetDataVersion(&version)); attributePath.mDataVersion.SetValue(version); diff --git a/src/app/ReadClient.h b/src/app/ReadClient.h index 2ecf84454f3e9d..3d66f5deab02cb 100644 --- a/src/app/ReadClient.h +++ b/src/app/ReadClient.h @@ -24,7 +24,7 @@ #pragma once #include "system/SystemClock.h" -#include +#include #include #include #include diff --git a/src/app/util/attribute-size-util.cpp b/src/app/SpecificationVersion.h similarity index 54% rename from src/app/util/attribute-size-util.cpp rename to src/app/SpecificationVersion.h index f8cf9507f11b53..b0570dad14c4ce 100644 --- a/src/app/util/attribute-size-util.cpp +++ b/src/app/SpecificationVersion.h @@ -1,6 +1,6 @@ -/** +/* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2023 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,25 +15,17 @@ * limitations under the License. */ -#include - -#include - -using namespace chip; - -static const uint8_t attributeSizes[] = { -#include -}; - -uint8_t emberAfGetDataSize(uint8_t dataType) -{ - for (unsigned i = 0; (i + 1) < sizeof(attributeSizes); i += 2) - { - if (attributeSizes[i] == dataType) - { - return attributeSizes[i + 1]; - } - } +#pragma once - return 0; -} +/** + * CHIP_DEVICE_SPECIFICATION_VERSION + * + * A number identifying the specification version against which the + * Node is certified. + * + * See section 11.1.5.22. "SpecificationVersion Attribute" in "Service and + * Device Management" chapter of the core Matter specification. + */ +#ifndef CHIP_DEVICE_SPECIFICATION_VERSION +#define CHIP_DEVICE_SPECIFICATION_VERSION 0x01030000 +#endif diff --git a/src/app/app-platform/ContentApp.h b/src/app/app-platform/ContentApp.h index bfb45f08b49942..e5eb99a5a701bd 100644 --- a/src/app/app-platform/ContentApp.h +++ b/src/app/app-platform/ContentApp.h @@ -23,7 +23,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/app/app-platform/ContentAppPlatform.h b/src/app/app-platform/ContentAppPlatform.h index 593ec0706a5a15..f05a94ceda7613 100644 --- a/src/app/app-platform/ContentAppPlatform.h +++ b/src/app/app-platform/ContentAppPlatform.h @@ -22,7 +22,6 @@ #pragma once -#include #include #include #include diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 89cbee6a4cca8c..069a41c8a5143b 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -135,7 +135,6 @@ function(chip_configure_data_model APP_TARGET) target_sources(${APP_TARGET} ${SCOPE} ${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp ${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp - ${CHIP_APP_BASE_DIR}/util/attribute-size-util.cpp ${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 85cc2025a586dd..67baca6fdf3dff 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -163,6 +163,7 @@ template("chip_data_model") { "${_app_root}/clusters/on-off-server/on-off-server.h", "${_app_root}/clusters/scenes-server/ExtensionFieldSets.h", "${_app_root}/clusters/scenes-server/ExtensionFieldSetsImpl.h", + "${_app_root}/clusters/scenes-server/SceneHandlerImpl.h", "${_app_root}/clusters/scenes-server/SceneTable.h", "${_app_root}/clusters/scenes-server/SceneTableImpl.h", "${_app_root}/clusters/scenes-server/scenes-server.h", @@ -177,7 +178,6 @@ template("chip_data_model") { if (!chip_build_controller_dynamic_server) { sources += [ "${_app_root}/util/DataModelHandler.cpp", - "${_app_root}/util/attribute-size-util.cpp", "${_app_root}/util/attribute-storage.cpp", "${_app_root}/util/attribute-table.cpp", "${_app_root}/util/ember-compatibility-functions.cpp", @@ -278,6 +278,7 @@ template("chip_data_model") { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp", "${_app_root}/clusters/scenes-server/ExtensionFieldSetsImpl.cpp", + "${_app_root}/clusters/scenes-server/SceneHandlerImpl.cpp", "${_app_root}/clusters/scenes-server/SceneTableImpl.cpp", ] } else if (cluster == "operational-state-server") { diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 81e3f5f1b92157..a5f49cb7c39aa1 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp index 6cd4998d8aba4a..8d1cedce012ec5 100644 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ b/src/app/clusters/barrier-control-server/barrier-control-server.cpp @@ -38,6 +38,33 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::BarrierControl; using chip::Protocols::InteractionModel::Status; +// this is NOT in any spec (CHIP spec does not currently have BarrierControl) +// and XMLs do not attach these enums to clusters. +// +// This directly defines some constants. These could be replaced with real +// constants if we ever have some BarrierControl in the matter specification. +namespace chip { +namespace app { +namespace Clusters { +namespace BarrierControl { + +namespace Position { +static constexpr uint8_t kClosed = 0; +static constexpr uint8_t kOpen = 100; +static constexpr uint8_t kUnknown = 255; +} // namespace Position + +namespace MovingState { +static constexpr uint8_t kStopped = 0; +static constexpr uint8_t kClosing = 1; +static constexpr uint8_t kOpening = 2; +} // namespace MovingState + +} // namespace BarrierControl +} // namespace Clusters +} // namespace app +} // namespace chip + typedef struct { uint8_t currentPosition; @@ -220,9 +247,8 @@ static uint8_t getCurrentPosition(EndpointId endpoint) // way of knowing the position of the barrier. Let's guess that the barrier is // open so that we don't leave the barrier open when it should be closed. uint8_t currentPositionFromAttribute = emAfPluginBarrierControlServerGetBarrierPosition(endpoint); - return ((currentPositionFromAttribute == EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_UNKNOWN) - ? static_cast(EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_OPEN) - : currentPositionFromAttribute); + return ((currentPositionFromAttribute == BarrierControl::Position::kUnknown) ? BarrierControl::Position::kOpen + : currentPositionFromAttribute); } static uint32_t calculateDelayMs(EndpointId endpoint, uint8_t targetPosition, bool * opening) @@ -249,7 +275,7 @@ void emberAfBarrierControlClusterServerTickCallback(EndpointId endpoint) if (state.currentPosition == state.targetPosition) { emAfPluginBarrierControlServerSetBarrierPosition(endpoint, state.currentPosition); - setMovingState(endpoint, EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_STOPPED); + setMovingState(endpoint, BarrierControl::MovingState::kStopped); cancelEndpointTimerCallback(endpoint); } else @@ -270,14 +296,13 @@ void emberAfBarrierControlClusterServerTickCallback(EndpointId endpoint) emAfPluginBarrierControlServerIncrementEvents(endpoint, false, false); } } - emAfPluginBarrierControlServerSetBarrierPosition( - endpoint, - (emAfPluginBarrierControlServerIsPartialBarrierSupported(endpoint) - ? state.currentPosition - : static_cast(EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_UNKNOWN))); - setMovingState( - endpoint, - (state.increasing ? EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_OPENING : EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_CLOSING)); + emAfPluginBarrierControlServerSetBarrierPosition(endpoint, + (emAfPluginBarrierControlServerIsPartialBarrierSupported(endpoint) + ? state.currentPosition + : BarrierControl::Position::kUnknown)); + setMovingState(endpoint, + (state.increasing ? BarrierControl::MovingState::kOpening : BarrierControl::MovingState::kClosing)); + scheduleTimerCallbackMs(endpoint, state.delayMs); } } @@ -307,8 +332,7 @@ bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( } else if (percentOpen > 100 // "100" means "100%", so greater than that is invalid || (!emAfPluginBarrierControlServerIsPartialBarrierSupported(endpoint) && - percentOpen != EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_CLOSED && - percentOpen != EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_OPEN)) + percentOpen != BarrierControl::Position::kClosed && percentOpen != BarrierControl::Position::kOpen)) { status = Status::ConstraintError; } @@ -342,7 +366,7 @@ bool emberAfBarrierControlClusterBarrierControlStopCallback(app::CommandHandler { EndpointId endpoint = commandPath.mEndpointId; cancelEndpointTimerCallback(endpoint); - setMovingState(endpoint, EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_STOPPED); + setMovingState(endpoint, BarrierControl::MovingState::kStopped); sendDefaultResponse(commandObj, commandPath, Status::Success); return true; } diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 1e0b1b0d9c0e91..510e4991b25bae 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -23,7 +23,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -59,6 +61,8 @@ class BasicAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadLocation(AttributeValueEncoder & aEncoder); CHIP_ERROR WriteLocation(AttributeValueDecoder & aDecoder); CHIP_ERROR ReadProductAppearance(AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadSpecificationVersion(AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadMaxPathsPerInvoke(AttributeValueEncoder & aEncoder); }; BasicAttrAccess gAttrAccess; @@ -287,6 +291,16 @@ CHIP_ERROR BasicAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attrib break; } + case SpecificationVersion::Id: { + status = ReadSpecificationVersion(aEncoder); + break; + } + + case MaxPathsPerInvoke::Id: { + status = ReadMaxPathsPerInvoke(aEncoder); + break; + } + default: // We did not find a processing path, the caller will delegate elsewhere. break; @@ -380,6 +394,18 @@ CHIP_ERROR BasicAttrAccess::ReadProductAppearance(AttributeValueEncoder & aEncod return aEncoder.Encode(productAppearance); } +CHIP_ERROR BasicAttrAccess::ReadSpecificationVersion(AttributeValueEncoder & aEncoder) +{ + uint32_t specification_version = CHIP_DEVICE_SPECIFICATION_VERSION; + return aEncoder.Encode(specification_version); +} + +CHIP_ERROR BasicAttrAccess::ReadMaxPathsPerInvoke(AttributeValueEncoder & aEncoder) +{ + uint16_t max_path_per_invoke = CHIP_CONFIG_MAX_PATHS_PER_INVOKE; + return aEncoder.Encode(max_path_per_invoke); +} + class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate { void OnStartUp(uint32_t softwareVersion) override diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 39fc5f9cdcc710..3dbba76be8491a 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -34,7 +34,32 @@ using namespace chip::app::Clusters; using namespace chip::app::Clusters::ColorControl; using chip::Protocols::InteractionModel::Status; -#ifdef EMBER_AF_PLUGIN_SCENES +// These constants are NOT currently spec compliant +// These should be changed once we have real specification enumeration +// names. +namespace chip { +namespace app { +namespace Clusters { +namespace ColorControl { + +namespace EnhancedColorMode { +constexpr uint8_t kCurrentHueAndCurrentSaturation = ColorControlServer::EnhancedColorMode::kCurrentHueAndCurrentSaturation; +constexpr uint8_t kCurrentXAndCurrentY = ColorControlServer::EnhancedColorMode::kCurrentXAndCurrentY; +constexpr uint8_t kColorTemperature = ColorControlServer::EnhancedColorMode::kColorTemperature; +constexpr uint8_t kEnhancedCurrentHueAndCurrentSaturation = + ColorControlServer::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation; +} // namespace EnhancedColorMode + +namespace Options { +constexpr uint8_t kExecuteIfOff = 1; +} // namespace Options + +} // namespace ColorControl +} // namespace Clusters +} // namespace app +} // namespace chip + +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl { public: @@ -151,7 +176,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl uint8_t modeValue; if (EMBER_ZCL_STATUS_SUCCESS != Attributes::EnhancedColorMode::Get(endpoint, &modeValue)) { - modeValue = ColorControlServer::ColorMode::COLOR_MODE_CIE_XY; // Default mode value according to spec + modeValue = ColorControl::EnhancedColorMode::kCurrentXAndCurrentY; // Default mode value according to spec } AddAttributeValuePair(pairs, Attributes::EnhancedColorMode::Id, modeValue, attributeCount); @@ -210,7 +235,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl switch (decodePair.attributeID) { case Attributes::CurrentX::Id: - if (SupportsColorMode(endpoint, EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y)) + if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY)) { if (decodePair.attributeValue) colorXTransitionState->finalValue = @@ -218,20 +243,20 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } break; case Attributes::CurrentY::Id: - if (SupportsColorMode(endpoint, EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y)) + if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY)) { colorYTransitionState->finalValue = std::min(static_cast(decodePair.attributeValue), colorYTransitionState->highLimit); } break; case Attributes::EnhancedCurrentHue::Id: - if (SupportsColorMode(endpoint, EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION)) + if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) { colorHueTransitionState->finalEnhancedHue = static_cast(decodePair.attributeValue); } break; case Attributes::CurrentSaturation::Id: - if (SupportsColorMode(endpoint, EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION)) + if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation)) { colorSaturationTransitionState->finalValue = std::min(static_cast(decodePair.attributeValue), colorSaturationTransitionState->highLimit); @@ -247,14 +272,15 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl loopTimeValue = static_cast(decodePair.attributeValue); break; case Attributes::ColorTemperatureMireds::Id: - if (SupportsColorMode(endpoint, EMBER_ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE)) + if (SupportsColorMode(endpoint, ColorControl::EnhancedColorMode::kColorTemperature)) { colorTempTransitionState->finalValue = std::min(static_cast(decodePair.attributeValue), colorTempTransitionState->highLimit); } break; case Attributes::EnhancedColorMode::Id: - if (decodePair.attributeValue <= static_cast(ColorControlServer::ColorMode::COLOR_MODE_EHSV)) + if (decodePair.attributeValue <= + static_cast(ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation)) { targetColorMode = static_cast(decodePair.attributeValue); } @@ -291,25 +317,25 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl // Execute movement to value depending on the mode in the saved scene switch (targetColorMode) { - case ColorControlServer::ColorMode::COLOR_MODE_HSV: + case ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation: #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorControlServer::Instance().moveToSaturation(static_cast(colorSaturationTransitionState->finalValue), transitionTime10th, endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV break; - case ColorControlServer::ColorMode::COLOR_MODE_CIE_XY: + case ColorControl::EnhancedColorMode::kCurrentXAndCurrentY: #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_XY ColorControlServer::Instance().moveToColor(colorXTransitionState->finalValue, colorYTransitionState->finalValue, transitionTime10th, endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_XY break; - case ColorControlServer::ColorMode::COLOR_MODE_TEMPERATURE: + case ColorControl::EnhancedColorMode::kColorTemperature: #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP ColorControlServer::Instance().moveToColorTemp( endpoint, static_cast(colorTempTransitionState->finalValue), transitionTime10th); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP break; - case ColorControlServer::ColorMode::COLOR_MODE_EHSV: + case ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV ColorControlServer::Instance().moveToHueAndSaturation( colorHueTransitionState->finalEnhancedHue, static_cast(colorSaturationTransitionState->finalValue), @@ -328,16 +354,16 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl { switch (mode) { - case EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION: + case ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kHueAndSaturation); break; - case EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y: + case ColorControl::EnhancedColorMode::kCurrentXAndCurrentY: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kXy); break; - case EMBER_ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE: + case ColorControl::EnhancedColorMode::kColorTemperature: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kColorTemperature); break; - case EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION: + case ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation: return ColorControlServer::Instance().HasFeature(endpoint, ColorControlServer::Feature::kEnhancedHue); break; default: @@ -354,7 +380,7 @@ class DefaultColorControlSceneHandler : public scenes::DefaultSceneHandlerImpl } }; static DefaultColorControlSceneHandler sColorControlSceneHandler; -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS /********************************************************** * Matter timer scheduling glue logic @@ -408,11 +434,11 @@ ColorControlServer & ColorControlServer::Instance() chip::scenes::SceneHandler * ColorControlServer::GetSceneHandler() { -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sColorControlSceneHandler; #else return nullptr; -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } bool ColorControlServer::HasFeature(chip::EndpointId endpoint, Feature feature) @@ -508,18 +534,18 @@ bool ColorControlServer::shouldExecuteIfOff(EndpointId endpoint, uint8_t optionM // 0xFF are the default values passed to the command handler when // the payload is not present - in that case there is use of option // attribute to decide execution of the command - return READBITS(options, EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF); + return READBITS(options, ColorControl::Options::kExecuteIfOff); } // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + if (READBITS(optionMask, ColorControl::Options::kExecuteIfOff)) { // Mask is present and set in the command payload, this indicates // use the override as temporary option - return READBITS(optionOverride, EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF); + return READBITS(optionOverride, ColorControl::Options::kExecuteIfOff); } // if we are here - use the option attribute bits - return (READBITS(options, EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF)); + return (READBITS(options, ColorControl::Options::kExecuteIfOff)); } /** @@ -546,10 +572,11 @@ void ColorControlServer::handleModeSwitch(EndpointId endpoint, uint8_t newColorM } Attributes::EnhancedColorMode::Set(endpoint, newColorMode); - if (newColorMode == ColorControlServer::ColorMode::COLOR_MODE_EHSV) + if (newColorMode == ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation) { - // Transpose COLOR_MODE_EHSV to COLOR_MODE_HSV after setting EnhancedColorMode - newColorMode = ColorControlServer::ColorMode::COLOR_MODE_HSV; + // Transpose COLOR_MODE_EHSV to ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation after setting + // EnhancedColorMode + newColorMode = ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation; } Attributes::ColorMode::Set(endpoint, newColorMode); @@ -1204,7 +1231,7 @@ Status ColorControlServer::moveToSaturation(uint8_t saturation, uint16_t transit stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); @@ -1255,11 +1282,11 @@ Status ColorControlServer::moveToHueAndSaturation(uint16_t hue, uint8_t saturati // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorMode::COLOR_MODE_EHSV); + handleModeSwitch(endpoint, EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorMode::COLOR_MODE_HSV); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentHueAndCurrentSaturation); } // now, kick off the state machine. @@ -1363,11 +1390,11 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_EHSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); } if (moveMode == HueMoveMode::kUp) @@ -1510,11 +1537,11 @@ bool ColorControlServer::moveToHueCommand(app::CommandHandler * commandObj, cons // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_EHSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); } // now, kick off the state machine. @@ -1581,7 +1608,7 @@ bool ColorControlServer::moveToHueAndSaturationCommand(app::CommandHandler * com } Status status = moveToHueAndSaturation(hue, saturation, transitionTime, isEnhanced, commandPath.mEndpointId); #ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalid(commandPath.mEndpointId); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); #endif // EMBER_AF_PLUGIN_SCENES commandObj->AddStatus(commandPath, status); return true; @@ -1631,11 +1658,11 @@ bool ColorControlServer::stepHueCommand(app::CommandHandler * commandObj, const // Handle color mode transition, if necessary. if (isEnhanced) { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_EHSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kEnhancedCurrentHueAndCurrentSaturation); } else { - handleModeSwitch(endpoint, ColorControlServer::ColorMode::COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); } // now, kick off the state machine. @@ -1729,7 +1756,7 @@ bool ColorControlServer::moveSaturationCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); if (moveMode == SaturationMoveMode::kUp) { @@ -1786,7 +1813,7 @@ bool ColorControlServer::moveToSaturationCommand(app::CommandHandler * commandOb } Status status = moveToSaturation(commandData.saturation, commandData.transitionTime, commandPath.mEndpointId); #ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalid(commandPath.mEndpointId); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); #endif // EMBER_AF_PLUGIN_SCENES commandObj->AddStatus(commandPath, status); return true; @@ -1824,7 +1851,7 @@ bool ColorControlServer::stepSaturationCommand(app::CommandHandler * commandObj, stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_HSV); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentHueAndCurrentSaturation); // now, kick off the state machine. initSaturationTransitionState(endpoint, colorSaturationTransitionState); @@ -1970,7 +1997,7 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons exit: #ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalid(endpoint); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); #endif // EMBER_AF_PLUGIN_SCENES commandObj->AddStatus(commandPath, status); return true; @@ -2137,7 +2164,7 @@ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_ stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, ColorMode::COLOR_MODE_CIE_XY); + handleModeSwitch(endpoint, EnhancedColorMode::kCurrentXAndCurrentY); // now, kick off the state machine. Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->initialValue)); @@ -2179,7 +2206,7 @@ bool ColorControlServer::moveToColorCommand(app::CommandHandler * commandObj, co Status status = moveToColor(commandData.colorX, commandData.colorY, commandData.transitionTime, commandPath.mEndpointId); #ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalid(commandPath.mEndpointId); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); #endif // EMBER_AF_PLUGIN_SCENES commandObj->AddStatus(commandPath, status); return true; @@ -2220,7 +2247,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_CIE_XY); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY); // now, kick off the state machine. Attributes::CurrentX::Get(endpoint, &(colorXTransitionState->initialValue)); @@ -2318,7 +2345,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_CIE_XY); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kCurrentXAndCurrentY); // now, kick off the state machine. colorXTransitionState->initialValue = currentColorX; @@ -2434,7 +2461,7 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT stopAllColorTransitions(endpoint); // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_TEMPERATURE); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); if (colorTemperature < temperatureMin) { @@ -2542,10 +2569,10 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) if (status == EMBER_ZCL_STATUS_SUCCESS) { // Set ColorMode attributes to reflect ColorTemperature. - uint8_t updateColorMode = EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE; + uint8_t updateColorMode = ColorControl::EnhancedColorMode::kColorTemperature; Attributes::ColorMode::Set(endpoint, updateColorMode); - updateColorMode = EMBER_ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE; + updateColorMode = ColorControl::EnhancedColorMode::kColorTemperature; Attributes::EnhancedColorMode::Set(endpoint, updateColorMode); } } @@ -2648,7 +2675,7 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_TEMPERATURE); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); // now, kick off the state machine. colorTempTransitionState->initialValue = 0; @@ -2706,7 +2733,7 @@ bool ColorControlServer::moveToColorTempCommand(app::CommandHandler * commandObj Status status = moveToColorTemp(commandPath.mEndpointId, commandData.colorTemperatureMireds, commandData.transitionTime); #ifdef EMBER_AF_PLUGIN_SCENES - Scenes::ScenesServer::Instance().MakeSceneInvalid(commandPath.mEndpointId); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(commandPath.mEndpointId); #endif // EMBER_AF_PLUGIN_SCENES commandObj->AddStatus(commandPath, status); return true; @@ -2759,7 +2786,7 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, } // Handle color mode transition, if necessary. - handleModeSwitch(endpoint, COLOR_MODE_TEMPERATURE); + handleModeSwitch(endpoint, ColorControl::EnhancedColorMode::kColorTemperature); // now, kick off the state machine. colorTempTransitionState->initialValue = 0; @@ -2848,7 +2875,7 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint) uint8_t colorMode = 0; Attributes::ColorMode::Get(endpoint, &colorMode); - if (colorMode == COLOR_MODE_TEMPERATURE) + if (colorMode == ColorControl::EnhancedColorMode::kColorTemperature) { app::DataModel::Nullable currentLevel; EmberAfStatus status = LevelControl::Attributes::CurrentLevel::Get(endpoint, currentLevel); @@ -3057,11 +3084,11 @@ void emberAfColorControlClusterServerInitCallback(EndpointId endpoint) #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP ColorControlServer::Instance().startUpColorTempCommand(endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the color control cluster on the server app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, ColorControlServer::Instance().GetSceneHandler()); -#endif +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } void MatterColorControlClusterServerShutdownCallback(EndpointId endpoint) diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 2ec0f5e63b4a3f..56110a33373f8d 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -71,12 +71,12 @@ class ColorControlServer using HueDirection = chip::app::Clusters::ColorControl::HueDirection; using Feature = chip::app::Clusters::ColorControl::Feature; - enum ColorMode + enum EnhancedColorMode : uint8_t { - COLOR_MODE_HSV = 0x00, - COLOR_MODE_CIE_XY = 0x01, - COLOR_MODE_TEMPERATURE = 0x02, - COLOR_MODE_EHSV = 0x03 + kCurrentHueAndCurrentSaturation = 0, + kCurrentXAndCurrentY = 1, + kColorTemperature = 2, + kEnhancedCurrentHueAndCurrentSaturation = 3, }; enum Conversion diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index d44797ed9d6afe..2e825934187738 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -3144,8 +3144,10 @@ bool DoorLockServer::sendRemoteLockUserChange(chip::EndpointId endpointId, LockD } ChipLogProgress(Zcl, "[RemoteLockUserChange] Sent lock user change event " - "[endpointId=%d,eventNumber=%" PRIu64 ",dataType=%u,operation=%u,nodeId=%" PRIu64 ",fabricIndex=%d]", - endpointId, eventNumber, to_underlying(dataType), to_underlying(operation), nodeId, fabricIndex); + "[endpointId=%d,eventNumber=0x" ChipLogFormatX64 ",dataType=%u,operation=%u,nodeId=0x" ChipLogFormatX64 + ",fabricIndex=%d]", + endpointId, ChipLogValueX64(eventNumber), to_underlying(dataType), to_underlying(operation), + ChipLogValueX64(nodeId), fabricIndex); return true; } diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index c978a56704397e..5d73f36ca12b8c 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -74,12 +74,13 @@ CHIP_ERROR EthernetDiagosticsAttrAccess::ReadIfSupported(CHIP_ERROR (DiagnosticD CHIP_ERROR EthernetDiagosticsAttrAccess::ReadPHYRate(AttributeValueEncoder & aEncoder) { Attributes::PHYRate::TypeInfo::Type pHYRate; - auto value = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M; + auto value = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M; if (DeviceLayer::GetDiagnosticDataProvider().GetEthPHYRate(value) == CHIP_NO_ERROR) { pHYRate.SetNonNull(value); - ChipLogProgress(Zcl, "The current nominal, usable speed at the top of the physical layer of the Node: %d", value); + ChipLogProgress(Zcl, "The current nominal, usable speed at the top of the physical layer of the Node: %d", + chip::to_underlying(value)); } else { diff --git a/src/app/clusters/fan-control-server/fan-control-server.h b/src/app/clusters/fan-control-server/fan-control-server.h index ff5fcb549d4086..5721e34b4eba90 100644 --- a/src/app/clusters/fan-control-server/fan-control-server.h +++ b/src/app/clusters/fan-control-server/fan-control-server.h @@ -19,7 +19,6 @@ #include "fan-control-delegate.h" #include -#include #include namespace chip { diff --git a/src/app/clusters/keypad-input-server/keypad-input-delegate.h b/src/app/clusters/keypad-input-server/keypad-input-delegate.h index 608b45f0b896e4..24c0a3fd7f4ac9 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-delegate.h +++ b/src/app/clusters/keypad-input-server/keypad-input-delegate.h @@ -34,7 +34,7 @@ namespace KeypadInput { class Delegate { public: - virtual void HandleSendKey(CommandResponseHelper & helper, const CecKeyCode & keyCode) = 0; + virtual void HandleSendKey(CommandResponseHelper & helper, const CECKeyCodeEnum & keyCode) = 0; bool HasFeature(chip::EndpointId endpoint, Feature feature); diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index 156d181a15931e..a22e86ffe2e108 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index a89d9686824770..f12b20684f7b6d 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -120,7 +120,7 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, chip::Optional> optionsMask, chip::Optional> optionsOverride); -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl { public: @@ -256,7 +256,7 @@ class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl }; static DefaultLevelControlSceneHandler sLevelControlSceneHandler; -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS #if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); @@ -610,11 +610,11 @@ Status MoveToLevel(EndpointId endpointId, const Commands::MoveToLevel::Decodable chip::scenes::SceneHandler * GetSceneHandler() { -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sLevelControlSceneHandler; #else return nullptr; -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } } // namespace LevelControlServer @@ -910,7 +910,7 @@ static Status moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8 // The level has changed, the scene is no longer valid. if (emberAfContainsServer(endpoint, Scenes::Id)) { - Scenes::ScenesServer::Instance().MakeSceneInvalid(endpoint); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); } #endif // EMBER_AF_PLUGIN_SCENES @@ -1446,10 +1446,10 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } } -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the level control cluster on the server app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, LevelControlServer::GetSceneHandler()); -#endif +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 1026105160ffbb..68dfed344e0da6 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -23,32 +23,44 @@ #include #include #include +#include #include #include +#include +#include #include #include #include +#include #include #include #include #include -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::NetworkCommissioning; +#include +#include namespace chip { namespace app { namespace Clusters { namespace NetworkCommissioning { +using namespace Credentials; +using namespace DataModel; using namespace DeviceLayer::NetworkCommissioning; namespace { -// For WiFi and Thread scan results, each item will cose ~60 bytes in TLV, thus 15 is a safe upper bound of scan results. + +// For WiFi and Thread scan results, each item will cost ~60 bytes in TLV, thus 15 is a safe upper bound of scan results. constexpr size_t kMaxNetworksInScanResponse = 15; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +constexpr size_t kPossessionNonceSize = 32; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + +// Note: CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE can be 0, this disables debug text +using DebugTextStorage = std::array; + enum ValidWiFiCredentialLength { kOpen = 0, @@ -58,11 +70,53 @@ enum ValidWiFiCredentialLength kWPAPSKHex = 64, }; +template +static void EnumerateAndRelease(Iterator * iterator, Func func) +{ + if (iterator != nullptr) + { + T element; + while (iterator->Next(element) && func(element) == Loop::Continue) + { + /* continue */ + } + iterator->Release(); + } +} + +BitFlags WiFiFeatures(WiFiDriver * driver) +{ + BitFlags features = Feature::kWiFiNetworkInterface; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + features.Set(Feature::kPerDeviceCredentials, driver->SupportsPerDeviceCredentials()); +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + return features; +} + } // namespace +Instance::Instance(EndpointId aEndpointId, WiFiDriver * apDelegate) : + CommandHandlerInterface(Optional(aEndpointId), Id), AttributeAccessInterface(Optional(aEndpointId), Id), + mFeatureFlags(WiFiFeatures(apDelegate)), mpWirelessDriver(apDelegate), mpBaseDriver(apDelegate) +{ + mpDriver.Set(apDelegate); +} + +Instance::Instance(EndpointId aEndpointId, ThreadDriver * apDelegate) : + CommandHandlerInterface(Optional(aEndpointId), Id), AttributeAccessInterface(Optional(aEndpointId), Id), + mFeatureFlags(Feature::kThreadNetworkInterface), mpWirelessDriver(apDelegate), mpBaseDriver(apDelegate) +{ + mpDriver.Set(apDelegate); +} + +Instance::Instance(EndpointId aEndpointId, EthernetDriver * apDelegate) : + CommandHandlerInterface(Optional(aEndpointId), Id), AttributeAccessInterface(Optional(aEndpointId), Id), + mFeatureFlags(Feature::kEthernetNetworkInterface), mpWirelessDriver(nullptr), mpBaseDriver(apDelegate) +{} + CHIP_ERROR Instance::Init() { - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); + ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(OnPlatformEventHandler, reinterpret_cast(this))); ReturnErrorOnFailure(mpBaseDriver->Init(this)); @@ -128,6 +182,13 @@ void Instance::InvokeCommand(HandlerContext & ctxt) HandleCommand( ctxt, [this](HandlerContext & ctx, const auto & req) { HandleReorderNetwork(ctx, req); }); return; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + case Commands::QueryIdentity::Id: + VerifyOrReturn(mFeatureFlags.Has(Feature::kPerDeviceCredentials)); + HandleCommand( + ctxt, [this](HandlerContext & ctx, const auto & req) { HandleQueryIdentity(ctx, req); }); + return; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC } } @@ -140,22 +201,25 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu case Attributes::Networks::Id: return aEncoder.EncodeList([this](const auto & encoder) { - auto networks = mpBaseDriver->GetNetworks(); CHIP_ERROR err = CHIP_NO_ERROR; Structs::NetworkInfoStruct::Type networkForEncode; - NetworkCommissioning::Network network; - for (; networks != nullptr && networks->Next(network);) - { + EnumerateAndRelease(mpBaseDriver->GetNetworks(), [&](const Network & network) { networkForEncode.networkID = ByteSpan(network.networkID, network.networkIDLen); networkForEncode.connected = network.connected; - SuccessOrExit(err = encoder.Encode(networkForEncode)); - } - exit: - if (networks != nullptr) - { - networks->Release(); - } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + // These fields are both optional and nullable in NetworkInfoStruct. + // If PDC is supported, the fields are always present but may be null. + if (mFeatureFlags.Has(Feature::kPerDeviceCredentials)) + { + networkForEncode.networkIdentifier = MakeOptional(Nullable(network.networkIdentifier)); + networkForEncode.clientIdentifier = MakeOptional(Nullable(network.clientIdentifier)); + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + + err = encoder.Encode(networkForEncode); + return (err == CHIP_NO_ERROR) ? Loop::Continue : Loop::Break; + }); return err; }); @@ -213,8 +277,7 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeVal } } -void Instance::OnNetworkingStatusChange(NetworkCommissioning::Status aCommissioningError, Optional aNetworkId, - Optional aConnectStatus) +void Instance::OnNetworkingStatusChange(Status aCommissioningError, Optional aNetworkId, Optional aConnectStatus) { if (aNetworkId.HasValue() && aNetworkId.Value().size() > kMaxNetworkIDLen) { @@ -285,14 +348,13 @@ void Instance::HandleScanNetworks(HandlerContext & ctx, const Commands::ScanNetw } namespace { - void FillDebugTextAndNetworkIndex(Commands::NetworkConfigResponse::Type & response, MutableCharSpan debugText, uint8_t networkIndex) { if (!debugText.empty()) { - response.debugText.SetValue(CharSpan(debugText.data(), debugText.size())); + response.debugText.SetValue(debugText); } - if (response.networkingStatus == NetworkCommissioningStatusEnum::kSuccess) + if (response.networkingStatus == Status::kSuccess) { response.networkIndex.SetValue(networkIndex); } @@ -319,6 +381,26 @@ void Instance::HandleAddOrUpdateWiFiNetwork(HandlerContext & ctx, const Commands VerifyOrReturn(CheckFailSafeArmed(ctx)); + if (req.ssid.empty() || req.ssid.size() > DeviceLayer::Internal::kMaxWiFiSSIDLength) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "ssid"); + return; + } + + // Presence of a Network Identity indicates we're configuring for Per-Device Credentials + if (req.networkIdentity.HasValue()) + { +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + if (mFeatureFlags.Has(Feature::kWiFiNetworkInterface)) + { + HandleAddOrUpdateWiFiNetworkWithPDC(ctx, req); + return; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand); + return; + } + // Spec 11.8.8.4 // Valid Credentials length are: // - 0 bytes: Unsecured (open) connection @@ -355,22 +437,124 @@ void Instance::HandleAddOrUpdateWiFiNetwork(HandlerContext & ctx, const Commands } Commands::NetworkConfigResponse::Type response; - MutableCharSpan debugText; -#if CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE - char debugTextBuffer[CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE]; - debugText = MutableCharSpan(debugTextBuffer); -#endif + DebugTextStorage debugTextBuffer; + MutableCharSpan debugText(debugTextBuffer); uint8_t outNetworkIndex = 0; response.networkingStatus = mpDriver.Get()->AddOrUpdateNetwork(req.ssid, req.credentials, debugText, outNetworkIndex); FillDebugTextAndNetworkIndex(response, debugText, outNetworkIndex); ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - if (response.networkingStatus == NetworkCommissioningStatusEnum::kSuccess) + if (response.networkingStatus == Status::kSuccess) { UpdateBreadcrumb(req.breadcrumb); } } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +void Instance::HandleAddOrUpdateWiFiNetworkWithPDC(HandlerContext & ctx, + const Commands::AddOrUpdateWiFiNetwork::DecodableType & req) +{ + // Credentials must be empty when configuring for PDC, it's only present to keep the command shape compatible. + if (!req.credentials.empty()) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "credentials"); + return; + } + + auto && networkIdentity = req.networkIdentity.Value(); // presence checked by caller + if (networkIdentity.size() > kMaxCHIPCompactNetworkIdentityLength || + Credentials::ValidateChipNetworkIdentity(networkIdentity) != CHIP_NO_ERROR) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "networkIdentity"); + return; + } + + if (req.clientIdentifier.HasValue() && req.clientIdentifier.Value().size() != CertificateKeyId::size()) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "clientIdentifier"); + return; + } + + bool provePossession = req.possessionNonce.HasValue(); + if (provePossession && req.possessionNonce.Value().size() != kPossessionNonceSize) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "possessionNonce"); + return; + } + + auto err = CHIP_NO_ERROR; + { + auto driver = mpDriver.Get(); + + // If the client is requesting re-use of a Client Identity, find the existing network it belongs to + Optional clientIdentityNetworkIndex; + if (req.clientIdentifier.HasValue()) + { + CertificateKeyId clientIdentifier(req.clientIdentifier.Value().data()); + uint8_t networkIndex = 0; + EnumerateAndRelease(driver->GetNetworks(), [&](const Network & network) { + if (network.clientIdentifier.HasValue() && clientIdentifier.data_equal(network.clientIdentifier.Value())) + { + clientIdentityNetworkIndex.SetValue(networkIndex); + return Loop::Break; + } + networkIndex++; + return Loop::Continue; + }); + if (!clientIdentityNetworkIndex.HasValue()) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::NotFound, "clientIdentifier"); + return; + } + } + + // Allocate a buffer to hold the client identity, and leave enough room to append the possession nonce if needed. + chip::Platform::ScopedMemoryBuffer identityBuffer; + size_t identityBufferSize = kMaxCHIPCompactNetworkIdentityLength + (provePossession ? kPossessionNonceSize : 0); + VerifyOrExit(identityBuffer.Alloc(identityBufferSize), /**/); + + // Add/Update the network at the driver level + MutableByteSpan clientIdentity(identityBuffer.Get(), kMaxCHIPCompactNetworkIdentityLength); + Optional possessionSignature; + Status status = Status::kUnknownError; + DebugTextStorage debugTextBuffer; + MutableCharSpan debugText(debugTextBuffer); + uint8_t networkIndex; + SuccessOrExit(err = driver->AddOrUpdateNetworkWithPDC(req.ssid, networkIdentity, clientIdentityNetworkIndex, status, + debugText, clientIdentity, networkIndex)); + + Commands::NetworkConfigResponse::Type response; + response.networkingStatus = status; + FillDebugTextAndNetworkIndex(response, debugText, networkIndex); + + if (status == Status::kSuccess) + { + response.clientIdentity.SetValue(clientIdentity); + + if (provePossession) + { + // PossessionSignature TBS message = (NetworkClientIdentity || PossessionNonce) + memcpy(clientIdentity.end(), req.possessionNonce.Value().data(), kPossessionNonceSize); + ByteSpan tbsMessage(clientIdentity.data(), clientIdentity.size() + kPossessionNonceSize); + SuccessOrExit(err = driver->SignWithClientIdentity(networkIndex, tbsMessage, possessionSignature.Emplace())); + response.possessionSignature.SetValue(possessionSignature.Value().Span()); + } + + UpdateBreadcrumb(req.breadcrumb); + } + + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "AddOrUpdateWiFiNetwork with PDC failed: %" CHIP_ERROR_FORMAT, err.Format()); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Failure); + } +} +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + void Instance::HandleAddOrUpdateThreadNetwork(HandlerContext & ctx, const Commands::AddOrUpdateThreadNetwork::DecodableType & req) { MATTER_TRACE_SCOPE("HandleAddOrUpdateThreadNetwork", "NetworkCommissioning"); @@ -378,17 +562,14 @@ void Instance::HandleAddOrUpdateThreadNetwork(HandlerContext & ctx, const Comman VerifyOrReturn(CheckFailSafeArmed(ctx)); Commands::NetworkConfigResponse::Type response; - MutableCharSpan debugText; -#if CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE - char debugTextBuffer[CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE]; - debugText = MutableCharSpan(debugTextBuffer); -#endif + DebugTextStorage debugTextBuffer; + MutableCharSpan debugText(debugTextBuffer); uint8_t outNetworkIndex = 0; response.networkingStatus = mpDriver.Get()->AddOrUpdateNetwork(req.operationalDataset, debugText, outNetworkIndex); FillDebugTextAndNetworkIndex(response, debugText, outNetworkIndex); ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - if (response.networkingStatus == NetworkCommissioningStatusEnum::kSuccess) + if (response.networkingStatus == Status::kSuccess) { UpdateBreadcrumb(req.breadcrumb); } @@ -415,16 +596,13 @@ void Instance::HandleRemoveNetwork(HandlerContext & ctx, const Commands::RemoveN VerifyOrReturn(CheckFailSafeArmed(ctx)); Commands::NetworkConfigResponse::Type response; - MutableCharSpan debugText; -#if CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE - char debugTextBuffer[CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE]; - debugText = MutableCharSpan(debugTextBuffer); -#endif + DebugTextStorage debugTextBuffer; + MutableCharSpan debugText(debugTextBuffer); uint8_t outNetworkIndex = 0; response.networkingStatus = mpWirelessDriver->RemoveNetwork(req.networkID, debugText, outNetworkIndex); FillDebugTextAndNetworkIndex(response, debugText, outNetworkIndex); ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - if (response.networkingStatus == NetworkCommissioningStatusEnum::kSuccess) + if (response.networkingStatus == Status::kSuccess) { UpdateBreadcrumb(req.breadcrumb); } @@ -433,7 +611,7 @@ void Instance::HandleRemoveNetwork(HandlerContext & ctx, const Commands::RemoveN void Instance::HandleConnectNetwork(HandlerContext & ctx, const Commands::ConnectNetwork::DecodableType & req) { MATTER_TRACE_SCOPE("HandleConnectNetwork", "NetworkCommissioning"); - if (req.networkID.size() > DeviceLayer::NetworkCommissioning::kMaxNetworkIDLen) + if (req.networkID.size() > kMaxNetworkIDLen) { ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidValue); return; @@ -452,20 +630,102 @@ void Instance::HandleReorderNetwork(HandlerContext & ctx, const Commands::Reorde { MATTER_TRACE_SCOPE("HandleReorderNetwork", "NetworkCommissioning"); Commands::NetworkConfigResponse::Type response; - MutableCharSpan debugText; -#if CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE - char debugTextBuffer[CHIP_CONFIG_NETWORK_COMMISSIONING_DEBUG_TEXT_BUFFER_SIZE]; - debugText = MutableCharSpan(debugTextBuffer); -#endif + DebugTextStorage debugTextBuffer; + MutableCharSpan debugText(debugTextBuffer); response.networkingStatus = mpWirelessDriver->ReorderNetwork(req.networkID, req.networkIndex, debugText); FillDebugTextAndNetworkIndex(response, debugText, req.networkIndex); ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); - if (response.networkingStatus == NetworkCommissioningStatusEnum::kSuccess) + if (response.networkingStatus == Status::kSuccess) { UpdateBreadcrumb(req.breadcrumb); } } +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +void Instance::HandleQueryIdentity(HandlerContext & ctx, const Commands::QueryIdentity::DecodableType & req) +{ + MATTER_TRACE_SCOPE("HandleQueryIdentity", "NetworkCommissioning"); + + if (req.keyIdentifier.size() != CertificateKeyId::size()) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "keyIdentifier"); + return; + } + CertificateKeyId keyIdentifier(req.keyIdentifier.data()); + + bool provePossession = req.possessionNonce.HasValue(); + if (provePossession && req.possessionNonce.Value().size() != kPossessionNonceSize) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidCommand, "possessionNonce"); + return; + } + + auto err = CHIP_NO_ERROR; + auto status = Protocols::InteractionModel::Status::Success; + auto driver = mpDriver.Get(); + auto networks = driver->GetNetworks(); + VerifyOrExit(networks != nullptr && networks->Count() > 0, status = Protocols::InteractionModel::Status::NotFound); + + { + // Allocate a buffer to hold the identity, and leave enough room to append the possession nonce if needed. + chip::Platform::ScopedMemoryBuffer identityBuffer; + size_t identityBufferSize = kMaxCHIPCompactNetworkIdentityLength + (provePossession ? kPossessionNonceSize : 0); + VerifyOrExit(identityBuffer.Alloc(identityBufferSize), /**/); + + MutableByteSpan identity(identityBuffer.Get(), kMaxCHIPCompactNetworkIdentityLength); + Optional possessionSignature; + + Network network; + for (uint8_t networkIndex = 0;; networkIndex++) + { + VerifyOrExit(networks->Next(network), status = Protocols::InteractionModel::Status::NotFound); + + if (network.clientIdentifier.HasValue() && keyIdentifier.data_equal(network.clientIdentifier.Value())) + { + SuccessOrExit(err = driver->GetClientIdentity(networkIndex, identity)); + if (provePossession) + { + // PossessionSignature TBS message = (NetworkClientIdentity || PossessionNonce) + memcpy(identity.end(), req.possessionNonce.Value().data(), kPossessionNonceSize); + ByteSpan tbsMessage(identity.data(), identity.size() + kPossessionNonceSize); + SuccessOrExit(err = driver->SignWithClientIdentity(networkIndex, tbsMessage, possessionSignature.Emplace())); + } + break; + } + if (!provePossession && // Proof-of-possession is not possible for network identities + network.networkIdentifier.HasValue() && keyIdentifier.data_equal(network.networkIdentifier.Value())) + { + SuccessOrExit(err = driver->GetNetworkIdentity(networkIndex, identity)); + break; + } + } + + Commands::QueryIdentityResponse::Type response; + response.identity = identity; + if (possessionSignature.HasValue()) + { + response.possessionSignature.SetValue(possessionSignature.Value().Span()); + } + ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); + } + +exit: + if (networks != nullptr) + { + networks->Release(); + } + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "QueryIdentity failed: %" CHIP_ERROR_FORMAT, err.Format()); + status = Protocols::InteractionModel::Status::Failure; + } + if (status != Protocols::InteractionModel::Status::Success) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + } +} +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + void Instance::OnResult(Status commissioningError, CharSpan debugText, int32_t interfaceStatus) { auto commandHandleRef = std::move(mAsyncCommandHandle); @@ -500,7 +760,7 @@ void Instance::OnResult(Status commissioningError, CharSpan debugText, int32_t i mLastNetworkingStatusValue.SetNonNull(commissioningError); commandHandle->AddResponse(mPath, response); - if (commissioningError == NetworkCommissioningStatusEnum::kSuccess) + if (commissioningError == Status::kSuccess) { CommitSavedBreadcrumb(); } @@ -525,7 +785,7 @@ void Instance::OnFinished(Status status, CharSpan debugText, ThreadScanResponseI TLV::TLVWriter * writer; TLV::TLVType listContainerType; ThreadScanResponse scanResponse; - chip::Platform::ScopedMemoryBuffer scanResponseArray; + Platform::ScopedMemoryBuffer scanResponseArray; size_t scanResponseArrayLength = 0; uint8_t extendedAddressBuffer[Thread::kSizeExtendedPanId]; @@ -611,9 +871,9 @@ void Instance::OnFinished(Status status, CharSpan debugText, ThreadScanResponseI exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Failed to encode response: %s", err.AsString()); + ChipLogError(Zcl, "Failed to encode response: %" CHIP_ERROR_FORMAT, err.Format()); } - if (status == NetworkCommissioningStatusEnum::kSuccess) + if (status == Status::kSuccess) { CommitSavedBreadcrumb(); } @@ -672,9 +932,9 @@ void Instance::OnFinished(Status status, CharSpan debugText, WiFiScanResponseIte exit: if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Failed to encode response: %s", err.AsString()); + ChipLogError(Zcl, "Failed to encode response: %" CHIP_ERROR_FORMAT, err.Format()); } - if (status == NetworkCommissioningStatusEnum::kSuccess) + if (status == Status::kSuccess) { CommitSavedBreadcrumb(); } @@ -719,39 +979,39 @@ CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & clust { using namespace Clusters::NetworkCommissioning::Commands; - constexpr CommandId acceptedCommandsListWiFi[] = { - ScanNetworks::Id, AddOrUpdateWiFiNetwork::Id, RemoveNetwork::Id, ConnectNetwork::Id, ReorderNetwork::Id, - }; - constexpr CommandId acceptedCommandsListThread[] = { - ScanNetworks::Id, AddOrUpdateThreadNetwork::Id, RemoveNetwork::Id, ConnectNetwork::Id, ReorderNetwork::Id, - }; - if (mFeatureFlags.Has(Feature::kThreadNetworkInterface)) { - for (const auto & cmd : acceptedCommandsListThread) + for (auto && cmd : { + ScanNetworks::Id, + AddOrUpdateThreadNetwork::Id, + RemoveNetwork::Id, + ConnectNetwork::Id, + ReorderNetwork::Id, + }) { - if (callback(cmd, context) != Loop::Continue) - { - break; - } + VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); } - - return CHIP_NO_ERROR; } - - if (mFeatureFlags.Has(Feature::kWiFiNetworkInterface)) + else if (mFeatureFlags.Has(Feature::kWiFiNetworkInterface)) { - for (const auto & cmd : acceptedCommandsListWiFi) + for (auto && cmd : { + ScanNetworks::Id, + AddOrUpdateWiFiNetwork::Id, + RemoveNetwork::Id, + ConnectNetwork::Id, + ReorderNetwork::Id, + }) { - if (callback(cmd, context) != Loop::Continue) - { - break; - } + VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); } + } - return CHIP_NO_ERROR; + if (mFeatureFlags.Has(Feature::kPerDeviceCredentials)) + { + VerifyOrExit(callback(QueryIdentity::Id, context) == Loop::Continue, /**/); } +exit: return CHIP_NO_ERROR; } @@ -759,20 +1019,20 @@ CHIP_ERROR Instance::EnumerateGeneratedCommands(const ConcreteClusterPath & clus { using namespace Clusters::NetworkCommissioning::Commands; - constexpr CommandId generatedCommandsListWireless[] = { ScanNetworksResponse::Id, NetworkConfigResponse::Id, - ConnectNetworkResponse::Id }; - if (mFeatureFlags.HasAny(Feature::kWiFiNetworkInterface, Feature::kThreadNetworkInterface)) { - for (const auto & cmd : generatedCommandsListWireless) + for (auto && cmd : { ScanNetworksResponse::Id, NetworkConfigResponse::Id, ConnectNetworkResponse::Id }) { - if (callback(cmd, context) != Loop::Continue) - { - break; - } + VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); } } + if (mFeatureFlags.Has(Feature::kPerDeviceCredentials)) + { + VerifyOrExit(callback(QueryIdentityResponse::Id, context) == Loop::Continue, /**/); + } + +exit: return CHIP_NO_ERROR; } @@ -788,7 +1048,7 @@ uint8_t NullNetworkDriver::GetMaxNetworks() return 1; } -DeviceLayer::NetworkCommissioning::NetworkIterator * NullNetworkDriver::GetNetworks() +NetworkIterator * NullNetworkDriver::GetNetworks() { // Instance::Read accepts nullptr as an empty NetworkIterator. return nullptr; diff --git a/src/app/clusters/network-commissioning/network-commissioning.h b/src/app/clusters/network-commissioning/network-commissioning.h index c822a3f88881b1..d11b118a5be854 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.h +++ b/src/app/clusters/network-commissioning/network-commissioning.h @@ -112,34 +112,17 @@ class Instance : public CommandHandlerInterface, // Actual handlers of the commands void HandleScanNetworks(HandlerContext & ctx, const Commands::ScanNetworks::DecodableType & req); void HandleAddOrUpdateWiFiNetwork(HandlerContext & ctx, const Commands::AddOrUpdateWiFiNetwork::DecodableType & req); + void HandleAddOrUpdateWiFiNetworkWithPDC(HandlerContext & ctx, const Commands::AddOrUpdateWiFiNetwork::DecodableType & req); void HandleAddOrUpdateThreadNetwork(HandlerContext & ctx, const Commands::AddOrUpdateThreadNetwork::DecodableType & req); void HandleRemoveNetwork(HandlerContext & ctx, const Commands::RemoveNetwork::DecodableType & req); void HandleConnectNetwork(HandlerContext & ctx, const Commands::ConnectNetwork::DecodableType & req); void HandleReorderNetwork(HandlerContext & ctx, const Commands::ReorderNetwork::DecodableType & req); + void HandleQueryIdentity(HandlerContext & ctx, const Commands::QueryIdentity::DecodableType & req); public: - Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::WiFiDriver * apDelegate) : - CommandHandlerInterface(Optional(aEndpointId), Id), - AttributeAccessInterface(Optional(aEndpointId), Id), mFeatureFlags(Feature::kWiFiNetworkInterface), - mpWirelessDriver(apDelegate), mpBaseDriver(apDelegate) - { - mpDriver.Set(apDelegate); - } - - Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::ThreadDriver * apDelegate) : - CommandHandlerInterface(Optional(aEndpointId), Id), - AttributeAccessInterface(Optional(aEndpointId), Id), mFeatureFlags(Feature::kThreadNetworkInterface), - mpWirelessDriver(apDelegate), mpBaseDriver(apDelegate) - { - mpDriver.Set(apDelegate); - } - - Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::EthernetDriver * apDelegate) : - CommandHandlerInterface(Optional(aEndpointId), Id), - AttributeAccessInterface(Optional(aEndpointId), Id), mFeatureFlags(Feature::kEthernetNetworkInterface), - mpWirelessDriver(nullptr), mpBaseDriver(apDelegate) - {} - + Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::WiFiDriver * apDelegate); + Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::ThreadDriver * apDelegate); + Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::EthernetDriver * apDelegate); virtual ~Instance() = default; }; 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 a64c749ae3070b..51cc04b0f4ec24 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -20,7 +20,6 @@ #include #include -#include #include "occupancy-hal.h" diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index bbd35235e99555..0350c61c5b07d2 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -103,102 +103,16 @@ static bool LevelControlWithOnOffFeaturePresent(EndpointId endpoint) static constexpr size_t kOnOffMaxEnpointCount = EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; -#ifdef EMBER_AF_PLUGIN_SCENES -static EmberEventControl sceneHandlerEventControls[kOnOffMaxEnpointCount]; +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS static void sceneOnOffCallback(EndpointId endpoint); +using OnOffEndPointPair = scenes::DefaultSceneHandlerImpl::EndpointStatePair; +using OnOffTransitionTimeInterface = + scenes::DefaultSceneHandlerImpl::TransitionTimeInterface; class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl { public: - /// @brief Struct to keep track of the desired state of the OnOff attribute between ApplyScene and - /// transition time expiration - struct EndpointStatePair - { - EndpointStatePair(EndpointId endpoint = kInvalidEndpointId, bool status = false) : mEndpoint(endpoint), mState(status) {} - EndpointId mEndpoint; - bool mState; - }; - - /// @brief Struct holding an array of EndpointStatePair. Handles insertion, get and removal by EndpointID. - /// TODO: Implement generic object to handle this boilerplate array manipulation - struct StatePairBuffer - { - bool IsEmpty() const { return (mPairCount == 0); } - - CHIP_ERROR FindPair(const EndpointId endpoint, uint16_t & found_index) const - { - VerifyOrReturnError(!IsEmpty(), CHIP_ERROR_NOT_FOUND); - for (found_index = 0; found_index < mPairCount; found_index++) - { - if (endpoint == mStatePairBuffer[found_index].mEndpoint) - { - return CHIP_NO_ERROR; - } - } - - return CHIP_ERROR_NOT_FOUND; - } - - CHIP_ERROR InsertPair(const EndpointStatePair & status) - { - uint16_t idx; - CHIP_ERROR err = FindPair(status.mEndpoint, idx); - - if (CHIP_NO_ERROR == err) - { - mStatePairBuffer[idx] = status; - } - else if (mPairCount < MAX_ENDPOINT_COUNT) - { - // if not found, insert at the end - mStatePairBuffer[mPairCount] = status; - mPairCount++; - } - else - { - return CHIP_ERROR_NO_MEMORY; - } - - return CHIP_NO_ERROR; - } - - CHIP_ERROR GetPair(const EndpointId endpoint, EndpointStatePair & status) const - { - uint16_t idx; - ReturnErrorOnFailure(FindPair(endpoint, idx)); - - status = mStatePairBuffer[idx]; - return CHIP_NO_ERROR; - } - - /// @brief Removes Pair and decrements Pair count if the endpoint existed in the array - /// @param endpoint : endpoint id of the pair - CHIP_ERROR RemovePair(const EndpointId endpoint) - { - uint16_t position; - VerifyOrReturnValue(CHIP_NO_ERROR == FindPair(endpoint, position), CHIP_NO_ERROR); - - uint16_t nextPos = static_cast(position + 1); - uint16_t moveNum = static_cast(mPairCount - nextPos); - - // Compress array after removal, if the removed position is not the last - if (moveNum) - { - memmove(&mStatePairBuffer[position], &mStatePairBuffer[nextPos], sizeof(EndpointStatePair) * moveNum); - } - - mPairCount--; - // Clear last occupied position - mStatePairBuffer[mPairCount].mEndpoint = kInvalidEndpointId; - - return CHIP_NO_ERROR; - } - - uint16_t mPairCount; - EndpointStatePair mStatePairBuffer[kOnOffMaxEnpointCount]; - }; - - StatePairBuffer mSceneEndpointStatePairs; + DefaultSceneHandlerImpl::StatePairBuffer mSceneEndpointStatePairs; // As per spec, 1 attribute is scenable in the on off cluster static constexpr uint8_t scenableAttributeCount = 1; @@ -279,7 +193,7 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl auto & decodePair = pair_iterator.GetValue(); VerifyOrReturnError(decodePair.attributeID == Attributes::OnOff::Id, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure( - mSceneEndpointStatePairs.InsertPair(EndpointStatePair(endpoint, static_cast(decodePair.attributeValue)))); + mSceneEndpointStatePairs.InsertPair(OnOffEndPointPair(endpoint, static_cast(decodePair.attributeValue)))); } // Verify that the EFS was completely read CHIP_ERROR err = pair_iterator.GetStatus(); @@ -299,42 +213,26 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl Scenes::ScenesServer::Instance().IsHandlerRegistered(endpoint, LevelControlServer::GetSceneHandler()))) #endif { - OnOffServer::Instance().scheduleTimerCallbackMs(sceneEventControl(endpoint), timeMs); + OnOffServer::Instance().scheduleTimerCallbackMs(mTransitionTimeInterface.sceneEventControl(endpoint), timeMs); } return CHIP_NO_ERROR; } private: - /** - * @brief Configures EventControl callback when setting On Off through scenes callback - * - * @param[in] endpoint endpoint to start timer for - * @return EmberEventControl* configured event control - */ - EmberEventControl * sceneEventControl(EndpointId endpoint) - { - EmberEventControl * controller = - OnOffServer::Instance().getEventControl(endpoint, Span(sceneHandlerEventControls)); - VerifyOrReturnValue(controller != nullptr, nullptr); - - controller->endpoint = endpoint; - controller->callback = &sceneOnOffCallback; - - return controller; - } + OnOffTransitionTimeInterface mTransitionTimeInterface = OnOffTransitionTimeInterface(Attributes::OnOff::Id, sceneOnOffCallback); }; static DefaultOnOffSceneHandler sOnOffSceneHandler; static void sceneOnOffCallback(EndpointId endpoint) { - DefaultOnOffSceneHandler::EndpointStatePair savedState; + OnOffEndPointPair savedState; ReturnOnFailure(sOnOffSceneHandler.mSceneEndpointStatePairs.GetPair(endpoint, savedState)); - chip::CommandId command = (savedState.mState) ? Commands::On::Id : Commands::Off::Id; + CommandId command = (savedState.mValue) ? Commands::On::Id : Commands::Off::Id; OnOffServer::Instance().setOnOffValue(endpoint, command, false); ReturnOnFailure(sOnOffSceneHandler.mSceneEndpointStatePairs.RemovePair(endpoint)); } -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS /********************************************************** * Attributes Definition @@ -402,11 +300,11 @@ OnOffServer & OnOffServer::Instance() chip::scenes::SceneHandler * OnOffServer::GetSceneHandler() { -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS return &sOnOffSceneHandler; #else return nullptr; -#endif // EMBER_AF_PLUGIN_SCENES +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS } bool OnOffServer::HasFeature(chip::EndpointId endpoint, Feature feature) @@ -562,7 +460,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, chip::Comman // the current scene as described in the attribute table is invalid, // so mark it as invalid (just writes the valid/invalid attribute) - Scenes::ScenesServer::Instance().MakeSceneInvalid(endpoint); + Scenes::ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpoint); #endif // EMBER_AF_PLUGIN_SCENES // The returned status is based solely on the On/Off cluster. Errors in the @@ -601,10 +499,10 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) status = setOnOffValue(endpoint, onOffValueForStartUp, true); } -#ifdef EMBER_AF_PLUGIN_SCENES +#if defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS // Registers Scene handlers for the On/Off cluster on the server app::Clusters::Scenes::ScenesServer::Instance().RegisterSceneHandler(endpoint, OnOffServer::Instance().GetSceneHandler()); -#endif +#endif // defined(EMBER_AF_PLUGIN_SCENES) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS #ifdef EMBER_AF_PLUGIN_MODE_SELECT // If OnMode is not a null value, then change the current mode to it. diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 04a01371af92f3..4ed4f681d211d4 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/ota-provider/ota-provider-delegate.h b/src/app/clusters/ota-provider/ota-provider-delegate.h index 3d7426ea4fd14e..3da8668908064c 100644 --- a/src/app/clusters/ota-provider/ota-provider-delegate.h +++ b/src/app/clusters/ota-provider/ota-provider-delegate.h @@ -19,7 +19,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/app/clusters/scenes-server/BUILD.gn b/src/app/clusters/scenes-server/BUILD.gn index 0e34919d8307b8..c92f3ce501535c 100644 --- a/src/app/clusters/scenes-server/BUILD.gn +++ b/src/app/clusters/scenes-server/BUILD.gn @@ -20,6 +20,8 @@ static_library("scenes") { "ExtensionFieldSets.h", "ExtensionFieldSetsImpl.cpp", "ExtensionFieldSetsImpl.h", + "SceneHandlerImpl.cpp", + "SceneHandlerImpl.h", "SceneTable.h", "SceneTableImpl.cpp", "SceneTableImpl.h", diff --git a/src/app/clusters/scenes-server/SceneHandlerImpl.cpp b/src/app/clusters/scenes-server/SceneHandlerImpl.cpp new file mode 100644 index 00000000000000..c29d1bbd5d27e8 --- /dev/null +++ b/src/app/clusters/scenes-server/SceneHandlerImpl.cpp @@ -0,0 +1,99 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +namespace chip { +namespace scenes { + +CHIP_ERROR +DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) +{ + TLV::TLVWriter writer; + writer.Init(serializedBytes); + ReturnErrorOnFailure(app::DataModel::Encode(writer, TLV::AnonymousTag(), aVlist)); + serializedBytes.reduce_size(writer.GetLengthWritten()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist) +{ + TLV::TLVReader reader; + + reader.Init(serializedBytes); + ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Array, TLV::AnonymousTag())); + ReturnErrorOnFailure(aVlist.Decode(reader)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, + MutableByteSpan & serializedBytes) +{ + AttributeValuePairType aVPairs[kMaxAvPair]; + + size_t pairTotal = 0; + // Verify size of list + ReturnErrorOnFailure(extensionFieldSet.attributeValueList.ComputeSize(&pairTotal)); + VerifyOrReturnError(pairTotal <= ArraySize(aVPairs), CHIP_ERROR_BUFFER_TOO_SMALL); + + uint8_t pairCount = 0; + auto pair_iterator = extensionFieldSet.attributeValueList.begin(); + while (pair_iterator.Next()) + { + aVPairs[pairCount] = pair_iterator.GetValue(); + pairCount++; + } + ReturnErrorOnFailure(pair_iterator.GetStatus()); + List attributeValueList(aVPairs, pairCount); + + return EncodeAttributeValueList(attributeValueList, serializedBytes); +} + +CHIP_ERROR DefaultSceneHandlerImpl::Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, + ExtensionFieldSetType & extensionFieldSet) +{ + DecodableList attributeValueList; + + ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); + + // Verify size of list + size_t pairTotal = 0; + ReturnErrorOnFailure(attributeValueList.ComputeSize(&pairTotal)); + VerifyOrReturnError(pairTotal <= ArraySize(mAVPairs), CHIP_ERROR_BUFFER_TOO_SMALL); + + uint8_t pairCount = 0; + auto pair_iterator = attributeValueList.begin(); + while (pair_iterator.Next()) + { + mAVPairs[pairCount] = pair_iterator.GetValue(); + pairCount++; + }; + ReturnErrorOnFailure(pair_iterator.GetStatus()); + + extensionFieldSet.clusterID = cluster; + extensionFieldSet.attributeValueList = mAVPairs; + extensionFieldSet.attributeValueList.reduce_size(pairCount); + + return CHIP_NO_ERROR; +} + +} // namespace scenes +} // namespace chip diff --git a/src/app/clusters/scenes-server/SceneHandlerImpl.h b/src/app/clusters/scenes-server/SceneHandlerImpl.h new file mode 100644 index 00000000000000..19eef3975ebbc3 --- /dev/null +++ b/src/app/clusters/scenes-server/SceneHandlerImpl.h @@ -0,0 +1,230 @@ +/** + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include + +namespace chip { +namespace scenes { + +/// @brief Default implementation of handler, handle EFS from add scene and view scene commands for any cluster +/// The implementation of SerializeSave and ApplyScene were omitted and must be implemented in a way that +/// is compatible with the SerializeAdd output in order to function with the Default Scene Handler. +/// It is worth noting that this implementation is very memory consuming. In the current worst case, +/// (Color control cluster), the Extension Field Set's value pair list TLV occupies 99 bytes of memory +class DefaultSceneHandlerImpl : public scenes::SceneHandler +{ + template + using List = app::DataModel::List; + + template + using DecodableList = app::DataModel::DecodableList; + + using AttributeValuePairType = app::Clusters::Scenes::Structs::AttributeValuePair::Type; + using AttributeValuePairDecodableType = app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; + using ExtensionFieldSetDecodableType = app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; + using ExtensionFieldSetType = app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; + +public: + /// @brief Struct meant to map the state of a cluster to a specific endpoint. Meant to be used to apply scenes using a timer for + /// transitioning + /// @tparam ValueType type of the value to map to the endpoint, must implement operator= and operator== for complex types + template + struct EndpointStatePair + { + EndpointStatePair(EndpointId endpoint = kInvalidEndpointId, ValueType value = ValueType{}) : + mEndpoint(endpoint), mValue(value) + {} + EndpointId mEndpoint; + ValueType mValue; + }; + + template + struct StatePairBuffer + { + static_assert(std::is_trivial::value, "ValueType must be trivial"); + static_assert(MaxEndpointCount < std::numeric_limits::max(), "MaxEndpointCount must be less than 65535"); + + bool IsEmpty() const { return (mPairCount == 0); } + + CHIP_ERROR FindPair(const EndpointId endpoint, uint16_t & found_index) const + { + VerifyOrReturnError(!IsEmpty(), CHIP_ERROR_NOT_FOUND); + for (found_index = 0; found_index < mPairCount; found_index++) + { + if (endpoint == mStatePairBuffer[found_index].mEndpoint) + { + return CHIP_NO_ERROR; + } + } + + return CHIP_ERROR_NOT_FOUND; + } + + CHIP_ERROR InsertPair(const EndpointStatePair & status) + { + uint16_t idx; + CHIP_ERROR err = FindPair(status.mEndpoint, idx); + + if (CHIP_NO_ERROR == err) + { + mStatePairBuffer[idx] = status; + } + else if (mPairCount < MaxEndpointCount) + { + // If not found, insert at the end + mStatePairBuffer[mPairCount] = status; + mPairCount++; + } + else + { + return CHIP_ERROR_NO_MEMORY; + } + + return CHIP_NO_ERROR; + } + + CHIP_ERROR GetPair(const EndpointId endpoint, EndpointStatePair & status) const + { + uint16_t idx; + ReturnErrorOnFailure(FindPair(endpoint, idx)); + + status = mStatePairBuffer[idx]; + return CHIP_NO_ERROR; + } + + /// @brief Removes Pair and decrements Pair count if the endpoint existed in the array + /// @param endpoint : endpoint id of the pair + CHIP_ERROR RemovePair(const EndpointId endpoint) + { + uint16_t position; + VerifyOrReturnValue(CHIP_NO_ERROR == FindPair(endpoint, position), CHIP_NO_ERROR); + + uint16_t nextPos = static_cast(position + 1); + uint16_t moveNum = static_cast(mPairCount - nextPos); + + // Compress array after removal, if the removed position is not the last + if (moveNum) + { + memmove(&mStatePairBuffer[position], &mStatePairBuffer[nextPos], sizeof(EndpointStatePair) * moveNum); + } + + mPairCount--; + // Clear the last occupied position + mStatePairBuffer[mPairCount].mEndpoint = kInvalidEndpointId; + + return CHIP_NO_ERROR; + } + + uint16_t mPairCount = 0; + EndpointStatePair mStatePairBuffer[MaxEndpointCount]; + }; + + /// @brief Helper struct that allows clusters that do not have an existing mechanism for doing + // asynchronous work to perform scene transitions over some period of time. + /// @tparam MaxEndpointCount + template + struct TransitionTimeInterface + { + EmberEventControl sceneHandlerEventControls[MaxEndpointCount]; + + TransitionTimeInterface(ClusterId clusterId, void (*callback)(EndpointId)) : mClusterId(clusterId), mCallback(callback) {} + + /** + * @brief Configures EventControl callback + * + * @param[in] endpoint endpoint to start timer for + * @return EmberEventControl* configured event control + */ + EmberEventControl * sceneEventControl(EndpointId endpoint) + { + EmberEventControl * controller = getEventControl(endpoint, Span(sceneHandlerEventControls)); + VerifyOrReturnValue(controller != nullptr, nullptr); + + controller->endpoint = endpoint; + controller->callback = mCallback; + + return controller; + } + + ClusterId mClusterId; + void (*mCallback)(EndpointId); + + private: + /** + * @brief event control object for an endpoint + * + * @param[in] endpoint target endpoint + * @param[in] eventControlArray Array where to find the event control + * @return EmberEventControl* configured event control + */ + EmberEventControl * getEventControl(EndpointId endpoint, const Span & eventControlArray) + { + uint16_t index = emberAfGetClusterServerEndpointIndex(endpoint, mClusterId, FixedEndpointCount); + if (index >= eventControlArray.size()) + { + return nullptr; + } + + return &eventControlArray[index]; + } + }; + + static constexpr uint8_t kMaxAvPair = CHIP_CONFIG_SCENES_MAX_AV_PAIRS_EFS; + + DefaultSceneHandlerImpl() = default; + ~DefaultSceneHandlerImpl() override{}; + + /// @brief Encodes an attribute value list into a TLV structure and resizes the buffer to the size of the encoded data + /// @param aVlist[in] Attribute value list to encode + /// @param serializedBytes[out] Buffer to fill from the Attribute value list in a TLV format + /// @return CHIP_ERROR + virtual CHIP_ERROR EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes); + + /// @brief Decodes an attribute value list from a TLV structure and ensure it fits the member pair buffer + /// @param serializedBytes [in] Buffer to read from + /// @param aVlist [out] Attribute value list to fill from the TLV structure. Only valid while the buffer backing + /// serializedBytes exists and its contents are not modified. + /// @return CHIP_ERROR + virtual CHIP_ERROR DecodeAttributeValueList(const ByteSpan & serializedBytes, + DecodableList & aVlist); + + /// @brief From command AddScene, allows handler to filter through clusters in command to serialize only the supported ones. + /// @param endpoint[in] Endpoint ID + /// @param extensionFieldSet[in] ExtensionFieldSets provided by the AddScene Command, pre initialized + /// @param serializedBytes[out] Buffer to fill from the ExtensionFieldSet in command + /// @return CHIP_NO_ERROR if successful, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not supported, CHIP_ERROR value + /// otherwise + virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, + MutableByteSpan & serializedBytes) override; + + /// @brief Simulates taking data from nvm and loading it in a command object if the cluster is supported by the endpoint + /// @param endpoint target endpoint + /// @param cluster target cluster + /// @param serializedBytes data to deserialize into EFS + /// @return CHIP_NO_ERROR if Extension Field Set was successfully populated, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not + /// supported, specific CHIP_ERROR otherwise + virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, + ExtensionFieldSetType & extensionFieldSet) override; + +private: + AttributeValuePairType mAVPairs[kMaxAvPair]; +}; + +} // namespace scenes +} // namespace chip diff --git a/src/app/clusters/scenes-server/SceneTable.h b/src/app/clusters/scenes-server/SceneTable.h index 33a495f671bec8..5ee97bf1da3fe3 100644 --- a/src/app/clusters/scenes-server/SceneTable.h +++ b/src/app/clusters/scenes-server/SceneTable.h @@ -284,6 +284,14 @@ class SceneTable virtual CHIP_ERROR SceneApplyEFS(const SceneTableEntry & scene) = 0; // Fabrics + + /** + * @brief Removes all scenes associated with a fabric index and the stored FabricSceneData that maps them + * @param fabric_index Fabric index to remove + * @return CHIP_ERROR, CHIP_NO_ERROR if successful or if the Fabric was not found, specific CHIP_ERROR otherwise + * @note This function is meant to be used after a fabric is removed from the device, the implementation MUST ensure that it + * won't interact with the actual fabric table as it will be removed beforehand. + */ virtual CHIP_ERROR RemoveFabric(FabricIndex fabric_index) = 0; virtual CHIP_ERROR RemoveEndpoint() = 0; diff --git a/src/app/clusters/scenes-server/SceneTableImpl.cpp b/src/app/clusters/scenes-server/SceneTableImpl.cpp index d003c42d74a50a..afb5295edf4868 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.cpp +++ b/src/app/clusters/scenes-server/SceneTableImpl.cpp @@ -22,81 +22,6 @@ namespace chip { namespace scenes { -CHIP_ERROR -DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) -{ - TLV::TLVWriter writer; - writer.Init(serializedBytes); - ReturnErrorOnFailure(app::DataModel::Encode(writer, TLV::AnonymousTag(), aVlist)); - serializedBytes.reduce_size(writer.GetLengthWritten()); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR DefaultSceneHandlerImpl::DecodeAttributeValueList(const ByteSpan & serializedBytes, - DecodableList & aVlist) -{ - TLV::TLVReader reader; - - reader.Init(serializedBytes); - ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Array, TLV::AnonymousTag())); - ReturnErrorOnFailure(aVlist.Decode(reader)); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, - MutableByteSpan & serializedBytes) -{ - AttributeValuePairType aVPairs[kMaxAvPair]; - - size_t pairTotal = 0; - // Verify size of list - ReturnErrorOnFailure(extensionFieldSet.attributeValueList.ComputeSize(&pairTotal)); - VerifyOrReturnError(pairTotal <= ArraySize(aVPairs), CHIP_ERROR_BUFFER_TOO_SMALL); - - uint8_t pairCount = 0; - auto pair_iterator = extensionFieldSet.attributeValueList.begin(); - while (pair_iterator.Next()) - { - aVPairs[pairCount] = pair_iterator.GetValue(); - pairCount++; - } - ReturnErrorOnFailure(pair_iterator.GetStatus()); - List attributeValueList(aVPairs, pairCount); - - return EncodeAttributeValueList(attributeValueList, serializedBytes); -} - -CHIP_ERROR DefaultSceneHandlerImpl::Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - ExtensionFieldSetType & extensionFieldSet) -{ - DecodableList attributeValueList; - - ReturnErrorOnFailure(DecodeAttributeValueList(serializedBytes, attributeValueList)); - - // Verify size of list - size_t pairTotal = 0; - ReturnErrorOnFailure(attributeValueList.ComputeSize(&pairTotal)); - VerifyOrReturnError(pairTotal <= ArraySize(mAVPairs), CHIP_ERROR_BUFFER_TOO_SMALL); - - uint8_t pairCount = 0; - auto pair_iterator = attributeValueList.begin(); - while (pair_iterator.Next()) - { - mAVPairs[pairCount] = pair_iterator.GetValue(); - pairCount++; - }; - ReturnErrorOnFailure(pair_iterator.GetStatus()); - - extensionFieldSet.clusterID = cluster; - extensionFieldSet.attributeValueList = mAVPairs; - extensionFieldSet.attributeValueList.reduce_size(pairCount); - - return CHIP_NO_ERROR; -} - /// @brief Tags Used to serialize Scenes so they can be stored in flash memory. /// kSceneCount: Number of scenes in a Fabric /// kStorageIDArray: Array of StorageID struct @@ -817,12 +742,12 @@ CHIP_ERROR DefaultSceneTableImpl::SceneSaveEFS(SceneTableEntry & scene) // TODO : Once zap supports the scenable quality, implement a GetSceneableClusterCountFromEndpointType function to avoid // over-allocation uint8_t clusterCount = GetClusterCountFromEndpoint(); - chip::Platform::ScopedMemoryBuffer cBuffer; + chip::Platform::ScopedMemoryBuffer cBuffer; VerifyOrReturnError(cBuffer.Calloc(clusterCount), CHIP_ERROR_NO_MEMORY); clusterCount = GetClustersFromEndpoint(cBuffer.Get(), clusterCount); - Span cSpan(cBuffer.Get(), clusterCount); - for (clusterId cluster : cSpan) + Span cSpan(cBuffer.Get(), clusterCount); + for (ClusterId cluster : cSpan) { ExtensionFieldSet EFS; MutableByteSpan EFSSpan = MutableByteSpan(EFS.mBytesBuffer, kMaxFieldBytesPerCluster); diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index 8da1ba8fa465ef..753799ec70c68e 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -17,6 +17,7 @@ #pragma once #include +#include #include #include #include @@ -41,69 +42,6 @@ static_assert(kMaxScenesPerEndpoint >= 16, "Per spec, kMaxScenesPerEndpoint must static constexpr uint16_t kMaxScenesPerFabric = (kMaxScenesPerEndpoint - 1) / 2; static constexpr uint8_t kMaxFabrics = CHIP_CONFIG_MAX_FABRICS; -using clusterId = chip::ClusterId; - -/// @brief Default implementation of handler, handle EFS from add scene and view scene commands for any cluster -/// The implementation of SerializeSave and ApplyScene were omitted and must be implemented in a way that -/// is compatible with the SerializeAdd output in order to function with the Default Scene Handler. -/// It is worth noting that this implementation is very memory consuming. In the current worst case, -/// (Color control cluster), the Extension Field Set's value pair list TLV occupies 99 bytes of memory -class DefaultSceneHandlerImpl : public scenes::SceneHandler -{ - - template - using List = chip::app::DataModel::List; - - template - using DecodableList = chip::app::DataModel::DecodableList; - - using AttributeValuePairType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type; - using AttributeValuePairDecodableType = chip::app::Clusters::Scenes::Structs::AttributeValuePair::DecodableType; - using ExtensionFieldSetDecodableType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType; - using ExtensionFieldSetType = chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type; - -public: - static constexpr uint8_t kMaxAvPair = CHIP_CONFIG_SCENES_MAX_AV_PAIRS_EFS; - - DefaultSceneHandlerImpl() = default; - ~DefaultSceneHandlerImpl() override{}; - - /// @brief Encodes an attribute value list into a TLV structure and resizes the buffer to the size of the encoded data - /// @param aVlist[in] Attribute value list to encode - /// @param serializedBytes[out] Buffer to fill from the Attribute value list in a TLV format - /// @return CHIP_ERROR - virtual CHIP_ERROR EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes); - - /// @brief Decodes an attribute value list from a TLV structure and ensure it fits the member pair buffer - /// @param serializedBytes [in] Buffer to read from - /// @param aVlist [out] Attribute value list to fill from the TLV structure. Only valid while the buffer backing - /// serializedBytes exists and its contents are not modified. - /// @return CHIP_ERROR - virtual CHIP_ERROR DecodeAttributeValueList(const ByteSpan & serializedBytes, - DecodableList & aVlist); - - /// @brief From command AddScene, allows handler to filter through clusters in command to serialize only the supported ones. - /// @param endpoint[in] Endpoint ID - /// @param extensionFieldSet[in] ExtensionFieldSets provided by the AddScene Command, pre initialized - /// @param serializedBytes[out] Buffer to fill from the ExtensionFieldSet in command - /// @return CHIP_NO_ERROR if successful, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not supported, CHIP_ERROR value - /// otherwise - virtual CHIP_ERROR SerializeAdd(EndpointId endpoint, const ExtensionFieldSetDecodableType & extensionFieldSet, - MutableByteSpan & serializedBytes) override; - - /// @brief Simulates taking data from nvm and loading it in a command object if the cluster is supported by the endpoint - /// @param endpoint target endpoint - /// @param cluster target cluster - /// @param serializedBytes data to deserialize into EFS - /// @return CHIP_NO_ERROR if Extension Field Set was successfully populated, CHIP_ERROR_INVALID_ARGUMENT if the cluster is not - /// supported, specific CHIP_ERROR otherwise - virtual CHIP_ERROR Deserialize(EndpointId endpoint, ClusterId cluster, const ByteSpan & serializedBytes, - ExtensionFieldSetType & extensionFieldSet) override; - -private: - AttributeValuePairType mAVPairs[kMaxAvPair]; -}; - /** * @brief Implementation of a storage in nonvolatile storage of the scene table. * diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index 7a0807b5c7c816..cac001cdc2c49d 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -47,6 +47,8 @@ namespace app { namespace Clusters { namespace Scenes { +namespace { + /// @brief Generate and add a response to a command handler context if err parameter is not CHIP_NO_ERROR /// @tparam ResponseType Type of response, depends on the command /// @param ctx Command Handler context where to add reponse @@ -96,6 +98,204 @@ CHIP_ERROR UpdateLastConfiguredBy(HandlerContext & ctx, ResponseType resp) return AddResponseOnError(ctx, resp, status); } +/// @brief Helper function to update the FabricSceneInfo attribute for a given Endpoint and fabric +/// @param endpoint Endpoint to update +/// @param fabric Fabric to update +/// @param group Group to update, if not provided, will be assigned 0 for a new SceneInfoStruct or keep previous value for an +/// existing one +/// @param scene Scene to update, if not provided, will be assigned 0 for a new SceneInfoStruct or keep previous value for an +/// existing one +/// @param sceneValid sceneValid status, if not provided, will be assigned false for a new SceneInfoStruct or keep previous +/// value for an existing one +/// @return +CHIP_ERROR UpdateFabricSceneInfo(EndpointId endpoint, FabricIndex fabric, Optional group, Optional scene, + Optional sceneValid) +{ + VerifyOrReturnError(kInvalidEndpointId != endpoint, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(kUndefinedFabricIndex != fabric, CHIP_ERROR_INVALID_ARGUMENT); + + SceneTable * sceneTable = scenes::GetSceneTableImpl(endpoint); + Structs::SceneInfoStruct::Type * sceneInfo = ScenesServer::Instance().GetSceneInfoStruct(endpoint, fabric); + if (nullptr != sceneInfo) + { + if (group.HasValue()) + { + sceneInfo->currentGroup = group.Value(); + } + + if (scene.HasValue()) + { + sceneInfo->currentScene = scene.Value(); + } + + if (sceneValid.HasValue()) + { + sceneInfo->sceneValid = sceneValid.Value(); + } + + ReturnErrorOnFailure(sceneTable->GetFabricSceneCount(fabric, sceneInfo->sceneCount)); + ReturnErrorOnFailure(sceneTable->GetRemainingCapacity(fabric, sceneInfo->remainingCapacity)); + } + else + { + // If we couldn't find a SceneInfoStruct for the fabric, create one + Structs::SceneInfoStruct::Type newSceneInfo; + newSceneInfo.fabricIndex = fabric; + + newSceneInfo.currentGroup = group.ValueOr(0); + newSceneInfo.currentScene = scene.ValueOr(0); + newSceneInfo.sceneValid = sceneValid.ValueOr(false); + + ReturnErrorOnFailure(sceneTable->GetFabricSceneCount(fabric, newSceneInfo.sceneCount)); + ReturnErrorOnFailure(sceneTable->GetRemainingCapacity(fabric, newSceneInfo.remainingCapacity)); + ReturnErrorOnFailure(ScenesServer::Instance().SetSceneInfoStruct(endpoint, fabric, newSceneInfo)); + } + + MatterReportingAttributeChangeCallback(endpoint, Id, Attributes::FabricSceneInfo::Id); + return CHIP_NO_ERROR; +} + +} // namespace + +/// @brief Gets the SceneInfoStruct array associated to an endpoint +/// @param endpoint target endpoint +/// @param fabric target fabric +/// @return Optional with no value not found, Span of SceneInfoStruct +Span ScenesServer::FabricSceneInfo::GetFabricSceneInfo(EndpointId endpoint) +{ + size_t endpointIndex = 0; + Span fabricSceneInfoSpan; + CHIP_ERROR status = FindFabricSceneInfoIndex(endpoint, endpointIndex); + if (CHIP_NO_ERROR == status) + { + fabricSceneInfoSpan = + Span(&mSceneInfoStructs[endpointIndex][0], mSceneInfoStructsCount[endpointIndex]); + } + return fabricSceneInfoSpan; +} + +/// @brief Gets the SceneInfoStruct for a specific fabric for a specific endpoint +/// @param endpoint target endpoint +/// @param fabric target fabric +/// @param index +/// @return Nullptr if not found, pointer to the SceneInfoStruct otherwise +Structs::SceneInfoStruct::Type * ScenesServer::FabricSceneInfo::GetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric) +{ + size_t endpointIndex = 0; + VerifyOrReturnValue(CHIP_NO_ERROR == FindFabricSceneInfoIndex(endpoint, endpointIndex), nullptr); + uint8_t sceneInfoStructIndex = 0; + VerifyOrReturnValue(CHIP_NO_ERROR == FindSceneInfoStructIndex(fabric, endpointIndex, sceneInfoStructIndex), nullptr); + + return &mSceneInfoStructs[endpointIndex][sceneInfoStructIndex]; +} + +/// @brief Sets the SceneInfoStruct for a specific fabric for a specific endpoint +/// @param endpoint target endpoint +/// @param fabric target fabric +/// @param [in] sceneInfoStruct SceneInfoStruct to set +/// @return CHIP_NO_ERROR, CHIP_ERROR_NOT_FOUND if the endpoint is not found, CHIP_ERROR_NO_MEMORY if the number of fabrics is +/// exceeded, CHIP_ERROR_INVALID_ARGUMENT if invalid fabric or endpoint +CHIP_ERROR ScenesServer::FabricSceneInfo::SetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric, + Structs::SceneInfoStruct::Type & sceneInfoStruct) +{ + VerifyOrReturnError(kInvalidEndpointId != endpoint, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(kUndefinedFabricIndex != fabric, CHIP_ERROR_INVALID_ARGUMENT); + + size_t endpointIndex = 0; + ReturnErrorOnFailure(FindFabricSceneInfoIndex(endpoint, endpointIndex)); + uint8_t sceneInfoStructIndex = 0; + if (CHIP_ERROR_NOT_FOUND == FindSceneInfoStructIndex(fabric, endpointIndex, sceneInfoStructIndex)) + { + VerifyOrReturnError(mSceneInfoStructsCount[endpointIndex] < ArraySize(mSceneInfoStructs[endpointIndex]), + CHIP_ERROR_NO_MEMORY); + sceneInfoStructIndex = mSceneInfoStructsCount[endpointIndex]; + + // Increment number of populated ScenesInfoStructs + mSceneInfoStructsCount[endpointIndex]++; + } + mSceneInfoStructs[endpointIndex][sceneInfoStructIndex] = sceneInfoStruct; + + return CHIP_NO_ERROR; +} + +/// @brief Clears the SceneInfoStruct associated to a fabric and compresses the array to leave uninitialised structs at the end +/// @param[in] endpoint target endpoint +/// @param[in] fabric target fabric +void ScenesServer::FabricSceneInfo::ClearSceneInfoStruct(EndpointId endpoint, FabricIndex fabric) +{ + size_t endpointIndex = 0; + ReturnOnFailure(FindFabricSceneInfoIndex(endpoint, endpointIndex)); + uint8_t sceneInfoStructIndex = 0; + ReturnOnFailure(FindSceneInfoStructIndex(fabric, endpointIndex, sceneInfoStructIndex)); + + uint8_t nextIndex = static_cast(sceneInfoStructIndex + 1); + uint8_t moveNum = static_cast(ArraySize(mSceneInfoStructs[endpointIndex]) - nextIndex); + // Compress the endpoint's SceneInfoStruct array + if (moveNum) + { + for (size_t i = 0; i < moveNum; ++i) + { + mSceneInfoStructs[endpointIndex][sceneInfoStructIndex + i] = mSceneInfoStructs[endpointIndex][nextIndex + i]; + } + } + + // Decrement the SceneInfoStruct count + mSceneInfoStructsCount[endpointIndex]--; + + // Clear the last populated SceneInfoStruct + mSceneInfoStructs[endpointIndex][mSceneInfoStructsCount[endpointIndex]].fabricIndex = kUndefinedFabricIndex; + mSceneInfoStructs[endpointIndex][mSceneInfoStructsCount[endpointIndex]].sceneCount = 0; + mSceneInfoStructs[endpointIndex][mSceneInfoStructsCount[endpointIndex]].currentScene = 0; + mSceneInfoStructs[endpointIndex][mSceneInfoStructsCount[endpointIndex]].currentGroup = 0; + mSceneInfoStructs[endpointIndex][mSceneInfoStructsCount[endpointIndex]].remainingCapacity = 0; +} + +/// @brief Returns the index of the FabricSceneInfo associated to an endpoint +/// @param[in] endpoint target endpoint +/// @param[out] endpointIndex index of the corresponding FabricSceneInfo for an endpoint, corresponds to a row in the +/// mSceneInfoStructs array, +/// @return CHIP_NO_ERROR or CHIP_ERROR_NOT_FOUND, CHIP_ERROR_INVALID_ARGUMENT if invalid endpoint +CHIP_ERROR ScenesServer::FabricSceneInfo::FindFabricSceneInfoIndex(EndpointId endpoint, size_t & endpointIndex) +{ + VerifyOrReturnError(kInvalidEndpointId != endpoint, CHIP_ERROR_INVALID_ARGUMENT); + + uint16_t index = emberAfGetClusterServerEndpointIndex(endpoint, Scenes::Id, EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT); + + if (index < ArraySize(mSceneInfoStructs)) + { + endpointIndex = index; + return CHIP_NO_ERROR; + } + return CHIP_ERROR_NOT_FOUND; +} + +/// @brief Returns the SceneInfoStruct associated to a fabric +/// @param[in] fabric target fabric index +/// @param[in] endpointIndex index of the corresponding FabricSceneInfo for an endpoint, corresponds to a row in the +/// mSceneInfoStructs array +/// @param[out] index index of the corresponding SceneInfoStruct if found, otherwise the index value will be invalid and +/// should not be used. This is safe to store in a uint8_t because the index is guaranteed to be smaller than +/// CHIP_CONFIG_MAX_FABRICS. +/// @return CHIP_NO_ERROR or CHIP_ERROR_NOT_FOUND, CHIP_ERROR_INVALID_ARGUMENT if invalid fabric or endpointIndex are provided +CHIP_ERROR ScenesServer::FabricSceneInfo::FindSceneInfoStructIndex(FabricIndex fabric, size_t endpointIndex, uint8_t & index) +{ + VerifyOrReturnError(endpointIndex < ArraySize(mSceneInfoStructs), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(kUndefinedFabricIndex != fabric, CHIP_ERROR_INVALID_ARGUMENT); + + index = 0; + + for (auto & info : mSceneInfoStructs[endpointIndex]) + { + if (info.fabricIndex == fabric) + { + return CHIP_NO_ERROR; + } + index++; + } + + return CHIP_ERROR_NOT_FOUND; +} + ScenesServer ScenesServer::mInstance; ScenesServer & ScenesServer::Instance() @@ -104,6 +304,19 @@ ScenesServer & ScenesServer::Instance() } void ReportAttributeOnAllEndpoints(AttributeId attribute) {} +class ScenesClusterFabricDelegate : public chip::FabricTable::Delegate +{ + void OnFabricRemoved(const FabricTable & fabricTable, FabricIndex fabricIndex) override + { + SceneTable * sceneTable = scenes::GetSceneTableImpl(); + VerifyOrReturn(nullptr != sceneTable); + // The implementation of SceneTable::RemoveFabric() must not call back into the FabricTable + sceneTable->RemoveFabric(fabricIndex); + } +}; + +static ScenesClusterFabricDelegate gFabricDelegate; + CHIP_ERROR ScenesServer::Init() { // Prevents re-initializing @@ -115,6 +328,7 @@ CHIP_ERROR ScenesServer::Init() SceneTable * sceneTable = scenes::GetSceneTableImpl(); ReturnErrorOnFailure(sceneTable->Init(&chip::Server::GetInstance().GetPersistentStorage())); + ReturnErrorOnFailure(chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(&gFabricDelegate)); mIsInitialized = true; return CHIP_NO_ERROR; @@ -234,9 +448,11 @@ void AddSceneParse(CommandHandlerInterface::HandlerContext & ctx, const CommandD ReturnOnFailure( AddResponseOnError(ctx, response, sceneTable->SetSceneTableEntry(ctx.mCommandHandler.GetAccessingFabricIndex(), scene))); - // Update Attributes - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::RemainingCapacity::Id); + // Update FabricSceneInfo + ReturnOnFailure( + AddResponseOnError(ctx, response, + UpdateFabricSceneInfo(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex(), + Optional(), Optional(), Optional()))); ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); @@ -327,6 +543,9 @@ void ViewSceneParse(HandlerContext & ctx, const CommandData & req, GroupDataProv CHIP_ERROR StoreSceneParse(const FabricIndex & fabricIdx, const EndpointId & endpointID, const GroupId & groupID, const SceneId & sceneID, GroupDataProvider * groupProvider) { + // Make the current fabric's SceneValid false before storing a scene + ScenesServer::Instance().MakeSceneInvalid(endpointID, fabricIdx); + uint16_t endpointTableSize = 0; ReturnErrorOnFailure( StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError()); @@ -374,12 +593,9 @@ CHIP_ERROR StoreSceneParse(const FabricIndex & fabricIdx, const EndpointId & end // Insert in Scene Table ReturnErrorOnFailure(sceneTable->SetSceneTableEntry(fabricIdx, scene)); - // Update size attributes - MatterReportingAttributeChangeCallback(endpointID, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(endpointID, Id, Attributes::RemainingCapacity::Id); - - ReturnErrorOnFailure(StatusIB(ToInteractionModelStatus(Attributes::CurrentScene::Set(endpointID, sceneID))).ToChipError()); - ReturnErrorOnFailure(StatusIB(ToInteractionModelStatus(Attributes::CurrentGroup::Set(endpointID, groupID))).ToChipError()); + // Update SceneInfo Attribute + ReturnErrorOnFailure(UpdateFabricSceneInfo(endpointID, fabricIdx, MakeOptional(groupID), MakeOptional(sceneID), + MakeOptional(static_cast(true)))); return CHIP_NO_ERROR; } @@ -388,6 +604,9 @@ CHIP_ERROR RecallSceneParse(const FabricIndex & fabricIdx, const EndpointId & en const SceneId & sceneID, const Optional> & transitionTime, GroupDataProvider * groupProvider) { + // Make SceneValid false for all fabrics before recalling a scene + ScenesServer::Instance().MakeSceneInvalidForAllFabrics(endpointID); + uint16_t endpointTableSize = 0; ReturnErrorOnFailure( StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(endpointID, &endpointTableSize))).ToChipError()); @@ -420,9 +639,9 @@ CHIP_ERROR RecallSceneParse(const FabricIndex & fabricIdx, const EndpointId & en ReturnErrorOnFailure(sceneTable->SceneApplyEFS(scene)); - ReturnErrorOnFailure(StatusIB(ToInteractionModelStatus(Attributes::CurrentScene::Set(endpointID, sceneID))).ToChipError()); - - ReturnErrorOnFailure(StatusIB(ToInteractionModelStatus(Attributes::CurrentGroup::Set(endpointID, groupID))).ToChipError()); + // Update FabricSceneInfo, at this point the scene is considered valid + ReturnErrorOnFailure( + UpdateFabricSceneInfo(endpointID, fabricIdx, Optional(groupID), Optional(sceneID), Optional(true))); return CHIP_NO_ERROR; } @@ -478,43 +697,50 @@ void ScenesServer::InvokeCommand(HandlerContext & ctxt) // AttributeAccessInterface CHIP_ERROR ScenesServer::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - uint8_t value = 0; - uint16_t endpointTableSize = 0; - ReturnErrorOnFailure( - StatusIB(ToInteractionModelStatus(Attributes::SceneTableSize::Get(aPath.mEndpointId, &endpointTableSize))).ToChipError()); - - // Get Scene Table Instance - SceneTable * sceneTable; - switch (aPath.mAttributeId) { - case Attributes::SceneCount::Id: - sceneTable = scenes::GetSceneTableImpl(aPath.mEndpointId, endpointTableSize); - ReturnErrorOnFailure(sceneTable->GetEndpointSceneCount(value)); - return aEncoder.Encode(value); - case Attributes::RemainingCapacity::Id: - sceneTable = scenes::GetSceneTableImpl(aPath.mEndpointId, endpointTableSize); - ReturnErrorOnFailure(sceneTable->GetRemainingCapacity(aEncoder.AccessingFabricIndex(), value)); - return aEncoder.Encode(value); + case Attributes::FabricSceneInfo::Id: { + return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR { + Span fabricSceneInfoSpan = mFabricSceneInfo.GetFabricSceneInfo(aPath.mEndpointId); + for (auto & info : fabricSceneInfoSpan) + { + ReturnErrorOnFailure(encoder.Encode(info)); + } + return CHIP_NO_ERROR; + }); + } default: return CHIP_NO_ERROR; } } +Structs::SceneInfoStruct::Type * ScenesServer::GetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric) +{ + Structs::SceneInfoStruct::Type * sceneInfoStruct = mFabricSceneInfo.GetSceneInfoStruct(endpoint, fabric); + return sceneInfoStruct; +} + +CHIP_ERROR ScenesServer::SetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric, + Structs::SceneInfoStruct::Type & sceneInfoStruct) +{ + ReturnErrorOnFailure(mFabricSceneInfo.SetSceneInfoStruct(endpoint, fabric, sceneInfoStruct)); + return CHIP_NO_ERROR; +} + void ScenesServer::GroupWillBeRemoved(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId) { // Get Scene Table Instance SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); VerifyOrReturn(nullptr != sceneTable); - chip::GroupId currentGroup; - Attributes::CurrentGroup::Get(aEndpointId, ¤tGroup); + Structs::SceneInfoStruct::Type * sceneInfo = mFabricSceneInfo.GetSceneInfoStruct(aEndpointId, aFabricIx); + chip::GroupId currentGroup = (nullptr != sceneInfo) ? sceneInfo->currentGroup : 0x0000; // If currentGroup is what is being removed, we can't possibly still have a valid scene, // because the scene we have (if any) will also be removed. if (aGroupId == currentGroup) { - MakeSceneInvalid(aEndpointId); + MakeSceneInvalid(aEndpointId, aFabricIx); } VerifyOrReturn(nullptr != mGroupProvider); @@ -526,28 +752,28 @@ void ScenesServer::GroupWillBeRemoved(FabricIndex aFabricIx, EndpointId aEndpoin sceneTable->DeleteAllScenesInGroup(aFabricIx, aGroupId); } -void ScenesServer::MakeSceneInvalid(EndpointId aEndpointId) +void ScenesServer::MakeSceneInvalid(EndpointId aEndpointId, FabricIndex aFabricIx) { - Attributes::SceneValid::Set(aEndpointId, false); + UpdateFabricSceneInfo(aEndpointId, aFabricIx, Optional(), Optional(), Optional(false)); } -void ScenesServer::StoreCurrentScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId) +void ScenesServer::MakeSceneInvalidForAllFabrics(EndpointId aEndpointId) { - if (CHIP_NO_ERROR == StoreSceneParse(aFabricIx, aEndpointId, aGroupId, aSceneId, mGroupProvider)) + for (auto & info : chip::Server::GetInstance().GetFabricTable()) { - Attributes::SceneValid::Set(aEndpointId, true); + MakeSceneInvalid(aEndpointId, info.GetFabricIndex()); } } + +void ScenesServer::StoreCurrentScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId) +{ + StoreSceneParse(aFabricIx, aEndpointId, aGroupId, aSceneId, mGroupProvider); +} void ScenesServer::RecallScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId) { - VerifyOrReturn(EMBER_ZCL_STATUS_SUCCESS == Attributes::SceneValid::Set(aEndpointId, false)); - Optional> transitionTime; - if (CHIP_NO_ERROR == RecallSceneParse(aFabricIx, aEndpointId, aGroupId, aSceneId, transitionTime, mGroupProvider)) - { - Attributes::SceneValid::Set(aEndpointId, true); - } + RecallSceneParse(aFabricIx, aEndpointId, aGroupId, aSceneId, transitionTime, mGroupProvider); } bool ScenesServer::IsHandlerRegistered(EndpointId aEndpointId, scenes::SceneHandler * handler) @@ -576,6 +802,13 @@ void ScenesServer::UnregisterSceneHandler(EndpointId aEndpointId, scenes::SceneH } } +void ScenesServer::RemoveFabric(EndpointId aEndpointId, FabricIndex aFabricIndex) +{ + SceneTable * sceneTable = scenes::GetSceneTableImpl(aEndpointId); + sceneTable->RemoveFabric(aFabricIndex); + mFabricSceneInfo.ClearSceneInfoStruct(aEndpointId, aFabricIndex); +} + void ScenesServer::HandleAddScene(HandlerContext & ctx, const Commands::AddScene::DecodableType & req) { AddSceneParse(ctx, req, mGroupProvider); @@ -622,11 +855,20 @@ void ScenesServer::HandleRemoveScene(HandlerContext & ctx, const Commands::Remov ReturnOnFailure(AddResponseOnError( ctx, response, sceneTable->RemoveSceneTableEntry(ctx.mCommandHandler.GetAccessingFabricIndex(), scene.mStorageId))); - // Update Attributes - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::RemainingCapacity::Id); + // Update SceneInfoStruct Attributes + Structs::SceneInfoStruct::Type * sceneInfo = + GetSceneInfoStruct(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex()); + Optional sceneValid; + if (nullptr != sceneInfo && req.groupID == sceneInfo->currentGroup && req.sceneID == sceneInfo->currentScene) + { + sceneValid.Emplace(false); + } ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); + ReturnOnFailure( + AddResponseOnError(ctx, response, + UpdateFabricSceneInfo(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex(), + Optional(), Optional(), sceneValid))); // Write response response.status = to_underlying(Protocols::InteractionModel::Status::Success); @@ -661,8 +903,19 @@ void ScenesServer::HandleRemoveAllScenes(HandlerContext & ctx, const Commands::R ctx, response, sceneTable->DeleteAllScenesInGroup(ctx.mCommandHandler.GetAccessingFabricIndex(), req.groupID))); // Update Attributes - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::RemainingCapacity::Id); + Structs::SceneInfoStruct::Type * sceneInfo = + GetSceneInfoStruct(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex()); + + Optional sceneValid; + if (nullptr != sceneInfo && req.groupID == sceneInfo->currentGroup) + { + sceneValid.Emplace(false); + } + + ReturnOnFailure( + AddResponseOnError(ctx, response, + UpdateFabricSceneInfo(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex(), + Optional(), Optional(), sceneValid))); ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); @@ -675,9 +928,6 @@ void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreS { Commands::StoreSceneResponse::Type response; - // Scene Valid is false when this command begins - ReturnOnFailure(AddResponseOnError(ctx, response, Attributes::SceneValid::Set(ctx.mRequestPath.mEndpointId, false))); - // Response data response.groupID = req.groupID; response.sceneID = req.sceneID; @@ -687,8 +937,6 @@ void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreS if (CHIP_NO_ERROR == err) { - ReturnOnFailure(AddResponseOnError(ctx, response, Attributes::SceneValid::Set(ctx.mRequestPath.mEndpointId, true))); - ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); } @@ -698,21 +946,12 @@ void ScenesServer::HandleStoreScene(HandlerContext & ctx, const Commands::StoreS void ScenesServer::HandleRecallScene(HandlerContext & ctx, const Commands::RecallScene::DecodableType & req) { - // Scene Valid is false when this command begins - EmberAfStatus status = Attributes::SceneValid::Set(ctx.mRequestPath.mEndpointId, false); - if (EMBER_ZCL_STATUS_SUCCESS != status) - { - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, ToInteractionModelStatus(status)); - return; - } - CHIP_ERROR err = RecallSceneParse(ctx.mCommandHandler.GetAccessingFabricIndex(), ctx.mRequestPath.mEndpointId, req.groupID, req.sceneID, req.transitionTime, mGroupProvider); if (CHIP_NO_ERROR == err) { - status = Attributes::SceneValid::Set(ctx.mRequestPath.mEndpointId, true); - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, ToInteractionModelStatus(status)); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Success); return; } @@ -848,9 +1087,11 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce ctx, response, sceneTable->SetSceneTableEntry(ctx.mCommandHandler.GetAccessingFabricIndex(), scene))); } - // Update Attributes - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::RemainingCapacity::Id); + // Update SceneInfoStruct Attributes + ReturnOnFailure( + AddResponseOnError(ctx, response, + UpdateFabricSceneInfo(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex(), + Optional(), Optional(), Optional()))); ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); @@ -869,8 +1110,10 @@ void ScenesServer::HandleCopyScene(HandlerContext & ctx, const Commands::CopySce AddResponseOnError(ctx, response, sceneTable->SetSceneTableEntry(ctx.mCommandHandler.GetAccessingFabricIndex(), scene))); // Update Attributes - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::SceneCount::Id); - MatterReportingAttributeChangeCallback(ctx.mRequestPath.mEndpointId, Id, Attributes::RemainingCapacity::Id); + ReturnOnFailure( + AddResponseOnError(ctx, response, + UpdateFabricSceneInfo(ctx.mRequestPath.mEndpointId, ctx.mCommandHandler.GetAccessingFabricIndex(), + Optional(), Optional(), Optional()))); ReturnOnFailure(UpdateLastConfiguredBy(ctx, response)); @@ -921,6 +1164,13 @@ void emberAfScenesClusterServerInitCallback(EndpointId endpoint) { ChipLogDetail(Zcl, "ERR: setting LastConfiguredBy on Endpoint %hu Status: %x", endpoint, status); } + + // Initialize the FabricSceneInfo by getting the number of scenes and the remaining capacity for storing fabric scene data + for (auto & info : chip::Server::GetInstance().GetFabricTable()) + { + auto fabric = info.GetFabricIndex(); + UpdateFabricSceneInfo(endpoint, fabric, Optional(), Optional(), Optional()); + } } void MatterScenesClusterServerShutdownCallback(EndpointId endpoint) diff --git a/src/app/clusters/scenes-server/scenes-server.h b/src/app/clusters/scenes-server/scenes-server.h index a96d1dc29ce3ca..49bd1537de8734 100644 --- a/src/app/clusters/scenes-server/scenes-server.h +++ b/src/app/clusters/scenes-server/scenes-server.h @@ -34,6 +34,42 @@ namespace Scenes { class ScenesServer : public CommandHandlerInterface, public AttributeAccessInterface { public: + static constexpr size_t kScenesServerMaxEndpointCount = + EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + static_assert(kScenesServerMaxEndpointCount <= kEmberInvalidEndpointIndex, "Scenes endpoint count error"); + static constexpr uint8_t kScenesServerMaxFabricCount = CHIP_CONFIG_MAX_FABRICS; + + // FabricSceneInfo + class FabricSceneInfo + { + public: + Span GetFabricSceneInfo(EndpointId endpoint); + Structs::SceneInfoStruct::Type * GetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric); + CHIP_ERROR SetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric, Structs::SceneInfoStruct::Type & sceneInfoStruct); + void ClearSceneInfoStruct(EndpointId endpoint, FabricIndex fabric); + + private: + /// @brief Returns the index of the FabricSceneInfo associated to an endpoint + /// @param[in] endpoint target endpoint + /// @param[out] endpointIndex index of the corresponding FabricSceneInfo for an endpoint, corresponds to a row in the + /// mSceneInfoStructs array, + /// @return CHIP_NO_ERROR or CHIP_ERROR_NOT_FOUND, CHIP_ERROR_INVALID_ARGUMENT if invalid endpoint + CHIP_ERROR FindFabricSceneInfoIndex(EndpointId endpoint, size_t & endpointIndex); + + /// @brief Returns the SceneInfoStruct associated to a fabric + /// @param[in] fabric target fabric index + /// @param[in] endpointIndex index of the corresponding FabricSceneInfo for an endpoint, corresponds to a row in the + /// mSceneInfoStructs array + /// @param[out] index index of the corresponding SceneInfoStruct if found, otherwise the index value will be invalid and + /// should not be used. This is safe to store in a uint8_t because the index is guaranteed to be smaller than + /// CHIP_CONFIG_MAX_FABRICS. + /// @return CHIP_NO_ERROR or CHIP_ERROR_NOT_FOUND, CHIP_ERROR_INVALID_ARGUMENT if invalid fabric or endpoint + CHIP_ERROR FindSceneInfoStructIndex(FabricIndex fabric, size_t endpointIndex, uint8_t & index); + + Structs::SceneInfoStruct::Type mSceneInfoStructs[kScenesServerMaxEndpointCount][kScenesServerMaxFabricCount]; + uint8_t mSceneInfoStructsCount[kScenesServerMaxEndpointCount] = { 0 }; + }; + static ScenesServer & Instance(); CHIP_ERROR Init(); @@ -45,16 +81,25 @@ class ScenesServer : public CommandHandlerInterface, public AttributeAccessInter // AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + // SceneInfoStruct Accessors + Structs::SceneInfoStruct::Type * GetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric); + CHIP_ERROR SetSceneInfoStruct(EndpointId endpoint, FabricIndex fabric, Structs::SceneInfoStruct::Type & sceneInfoStruct); + // Callbacks void GroupWillBeRemoved(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId); - void MakeSceneInvalid(EndpointId aEndpointId); + void MakeSceneInvalid(EndpointId aEndpointId, FabricIndex aFabricIx); + void MakeSceneInvalidForAllFabrics(EndpointId aEndpointId); void StoreCurrentScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId); void RecallScene(FabricIndex aFabricIx, EndpointId aEndpointId, GroupId aGroupId, SceneId aSceneId); + // Handlers for extension field sets bool IsHandlerRegistered(EndpointId aEndpointId, scenes::SceneHandler * handler); void RegisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler); void UnregisterSceneHandler(EndpointId aEndpointId, scenes::SceneHandler * handler); + // Fabric + void RemoveFabric(EndpointId aEndpointId, FabricIndex aFabricIndex); + private: ScenesServer() : CommandHandlerInterface(Optional(), Id), AttributeAccessInterface(Optional(), Id) {} ~ScenesServer() { Shutdown(); } @@ -76,6 +121,9 @@ class ScenesServer : public CommandHandlerInterface, public AttributeAccessInter // Group Data Provider Credentials::GroupDataProvider * mGroupProvider = nullptr; + // FabricSceneInfo + FabricSceneInfo mFabricSceneInfo; + // Instance static ScenesServer mInstance; }; diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 85fa7c7a035322..6c3504c6bea270 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp index f4eb458a0a8313..8bc0b2a6416d03 100644 --- a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp +++ b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp @@ -52,44 +52,47 @@ class TimeFormatLocalizationAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadSupportedCalendarTypes(AttributeValueEncoder & aEncoder); }; +class AutoReleaseIterator +{ +public: + using Iterator = DeviceLayer::DeviceInfoProvider::SupportedCalendarTypesIterator; + + AutoReleaseIterator(Iterator * value) : mIterator(value) {} + ~AutoReleaseIterator() + { + if (mIterator != nullptr) + { + mIterator->Release(); + } + } + + bool IsValid() const { return mIterator != nullptr; } + bool Next(CalendarTypeEnum & value) { return (mIterator == nullptr) ? false : mIterator->Next(value); } + +private: + Iterator * mIterator; +}; + TimeFormatLocalizationAttrAccess gAttrAccess; CHIP_ERROR TimeFormatLocalizationAttrAccess::ReadSupportedCalendarTypes(AttributeValueEncoder & aEncoder) { - CHIP_ERROR err = CHIP_NO_ERROR; - DeviceLayer::DeviceInfoProvider * provider = DeviceLayer::GetDeviceInfoProvider(); + VerifyOrReturnValue(provider != nullptr, aEncoder.EncodeEmptyList()); - if (provider) - { - DeviceLayer::DeviceInfoProvider::SupportedCalendarTypesIterator * it = provider->IterateSupportedCalendarTypes(); - - if (it) - { - err = aEncoder.EncodeList([&it](const auto & encoder) -> CHIP_ERROR { - CalendarTypeEnum type; - - while (it->Next(type)) - { - ReturnErrorOnFailure(encoder.Encode(type)); - } + AutoReleaseIterator it(provider->IterateSupportedCalendarTypes()); + VerifyOrReturnValue(it.IsValid(), aEncoder.EncodeEmptyList()); - return CHIP_NO_ERROR; - }); + return aEncoder.EncodeList([&it](const auto & encoder) -> CHIP_ERROR { + CalendarTypeEnum type; - it->Release(); - } - else + while (it.Next(type)) { - err = aEncoder.EncodeEmptyList(); + ReturnErrorOnFailure(encoder.Encode(type)); } - } - else - { - err = aEncoder.EncodeEmptyList(); - } - return err; + return CHIP_NO_ERROR; + }); } CHIP_ERROR TimeFormatLocalizationAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) @@ -114,27 +117,18 @@ bool IsSupportedCalendarType(CalendarTypeEnum newType, CalendarTypeEnum & validT validType = CalendarTypeEnum::kBuddhist; DeviceLayer::DeviceInfoProvider * provider = DeviceLayer::GetDeviceInfoProvider(); + VerifyOrReturnValue(provider != nullptr, false); - if (provider) - { - DeviceLayer::DeviceInfoProvider::SupportedCalendarTypesIterator * it = provider->IterateSupportedCalendarTypes(); + AutoReleaseIterator it(provider->IterateSupportedCalendarTypes()); + VerifyOrReturnValue(it.IsValid(), false); - if (it) + CalendarTypeEnum type; + while (it.Next(type)) + { + validType = type; + if (validType == newType) { - CalendarTypeEnum type; - - while (it->Next(type)) - { - validType = type; - - if (validType == newType) - { - it->Release(); - return true; - } - } - - it->Release(); + return true; } } diff --git a/src/app/clusters/window-covering-server/window-covering-server.h b/src/app/clusters/window-covering-server/window-covering-server.h index 1622de77a1de4a..d70fbe921a80e2 100644 --- a/src/app/clusters/window-covering-server/window-covering-server.h +++ b/src/app/clusters/window-covering-server/window-covering-server.h @@ -19,7 +19,6 @@ #include "window-covering-delegate.h" #include -#include #include #include diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index a7202afe6d7ba5..810decc84dfab8 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -5,16 +5,6 @@ DarwinForceWritable: - ContentLauncher::SupportedStreamingProtocols - FanControl::FanModeSequence -WeakEnums: - # Allow-list of enums that we generate as enums, not enum classes. - # The goal is to drive this down to 0. - - BarrierControlBarrierPosition - - BarrierControlMovingState - - ColorControlOptions - - ColorMode - - EnhancedColorMode - - PHYRateEnum - EnumsNotUsedAsTypeInXML: # List of enums that are not used as a type in XML. By adding an enum # to this list you prevent incorrectly assuming from code that you are diff --git a/src/app/common/templates/templates.json b/src/app/common/templates/templates.json index de1817b98bce43..6d253d5e1b2d6f 100644 --- a/src/app/common/templates/templates.json +++ b/src/app/common/templates/templates.json @@ -31,11 +31,6 @@ } ], "templates": [ - { - "path": "../../zap-templates/templates/app/attribute-size.zapt", - "name": "ZCL attribute-size header", - "output": "attribute-size.h" - }, { "path": "../../zap-templates/templates/app/attribute-type.zapt", "name": "ZCL attribute-type header", @@ -46,11 +41,6 @@ "name": "ZCL callback header", "output": "callback.h" }, - { - "path": "../../zap-templates/templates/app/enums.zapt", - "name": "ZCL enums header", - "output": "enums.h" - }, { "path": "../../zap-templates/templates/app/print-cluster.zapt", "name": "ZCL print-cluster header", diff --git a/src/app/icd/BUILD.gn b/src/app/icd/BUILD.gn index aa0a6ef67bf28b..8b8f10fd5c1587 100644 --- a/src/app/icd/BUILD.gn +++ b/src/app/icd/BUILD.gn @@ -42,10 +42,25 @@ source_set("manager") { ":cluster", ":notifier", ":observer", + ":sender", "${chip_root}/src/credentials:credentials", ] } +source_set("sender") { + sources = [ + "ICDCheckInSender.cpp", + "ICDCheckInSender.h", + ] + + public_deps = [ + ":cluster", + "${chip_root}/src/credentials:credentials", + "${chip_root}/src/lib/address_resolve:address_resolve", + "${chip_root}/src/protocols/secure_channel", + ] +} + # ICD management cluster source-set is broken out of the main source-set to enable unit tests # All sources and configurations used by the ICD management cluster need to go in this source-set source_set("cluster") { diff --git a/src/app/icd/ICDCheckInSender.cpp b/src/app/icd/ICDCheckInSender.cpp new file mode 100644 index 00000000000000..bd2b86bb24fdd3 --- /dev/null +++ b/src/app/icd/ICDCheckInSender.cpp @@ -0,0 +1,104 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ICDCheckInSender.h" + +#include + +#include + +#include + +namespace chip { +namespace app { + +using namespace Protocols::SecureChannel; + +ICDCheckInSender::ICDCheckInSender(Messaging::ExchangeManager * exchangeManager) +{ + VerifyOrDie(exchangeManager != nullptr); + mExchangeManager = exchangeManager; + mAddressLookupHandle.SetListener(this); +} + +void ICDCheckInSender::OnNodeAddressResolved(const PeerId & peerId, const AddressResolve::ResolveResult & result) +{ + mResolveInProgress = false; + + VerifyOrReturn(CHIP_NO_ERROR != SendCheckInMsg(result.address), + ChipLogError(AppServer, "Failed to send the ICD Check-In message")); +} + +void ICDCheckInSender::OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) +{ + mResolveInProgress = false; + ChipLogProgress(AppServer, "Node Address resolution failed for ICD Check-In with Node ID " ChipLogFormatX64, + ChipLogValueX64(peerId.GetNodeId())); +} + +CHIP_ERROR ICDCheckInSender::SendCheckInMsg(const Transport::PeerAddress & addr) +{ + System::PacketBufferHandle buffer = MessagePacketBuffer::New(CheckinMessage::sMinPayloadSize); + + VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); + MutableByteSpan output{ buffer->Start(), buffer->DataLength() }; + + // TODO retrieve Check-in counter + CounterType counter = 0; + + ReturnErrorOnFailure(CheckinMessage::GenerateCheckinMessagePayload(mKey, counter, ByteSpan(), output)); + + VerifyOrReturnError(mExchangeManager->GetSessionManager() != nullptr, CHIP_ERROR_INTERNAL); + + Optional session = + mExchangeManager->GetSessionManager()->CreateUnauthenticatedSession(addr, GetDefaultMRPConfig()); + VerifyOrReturnError(session.HasValue(), CHIP_ERROR_NO_MEMORY); + + // Using default MRP since we are not doing MRP in this context + Messaging::ExchangeContext * exchangeContext = mExchangeManager->NewContext(session.Value(), nullptr); + + VerifyOrReturnError(exchangeContext != nullptr, CHIP_ERROR_NO_MEMORY); + + return exchangeContext->SendMessage(MsgType::ICD_CheckIn, std::move(buffer), Messaging::SendMessageFlags::kNoAutoRequestAck); +} + +CHIP_ERROR ICDCheckInSender::RequestResolve(ICDMonitoringEntry & entry, FabricTable * fabricTable) +{ + VerifyOrReturnError(entry.IsValid(), CHIP_ERROR_INTERNAL); + VerifyOrReturnError(fabricTable != nullptr, CHIP_ERROR_INTERNAL); + const FabricInfo * fabricInfo = fabricTable->FindFabricWithIndex(entry.fabricIndex); + PeerId peerId(fabricInfo->GetCompressedFabricId(), entry.checkInNodeID); + + AddressResolve::NodeLookupRequest request(peerId); + + memcpy(mKey.AsMutable(), entry.key.As(), + sizeof(Crypto::Aes128KeyByteArray)); + + // TODO #30492 + // Device must stay active during MDNS resolution + CHIP_ERROR err = AddressResolve::Resolver::Instance().LookupNode(request, mAddressLookupHandle); + + if (err == CHIP_NO_ERROR) + { + mResolveInProgress = true; + } + + return err; +} + +} // namespace app +} // namespace chip diff --git a/src/app/icd/ICDCheckInSender.h b/src/app/icd/ICDCheckInSender.h new file mode 100644 index 00000000000000..a06efeee419287 --- /dev/null +++ b/src/app/icd/ICDCheckInSender.h @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include + +#include + +namespace chip { +namespace app { + +/** + * @brief ICD Check-In Sender is responsible for resolving the NodeId and sending the check-in message + */ +class ICDCheckInSender : public AddressResolve::NodeListener +{ +public: + ICDCheckInSender(Messaging::ExchangeManager * exchangeManager); + ~ICDCheckInSender(){}; + + CHIP_ERROR RequestResolve(ICDMonitoringEntry & entry, FabricTable * fabricTable); + + // AddressResolve::NodeListener - notifications when dnssd finds a node IP address + void OnNodeAddressResolved(const PeerId & peerId, const AddressResolve::ResolveResult & result) override; + void OnNodeAddressResolutionFailed(const PeerId & peerId, CHIP_ERROR reason) override; + + bool mResolveInProgress = false; + +private: + CHIP_ERROR SendCheckInMsg(const Transport::PeerAddress & addr); + + // This is used when a node address is required. + AddressResolve::NodeLookupHandle mAddressLookupHandle; + + Messaging::ExchangeManager * mExchangeManager = nullptr; + + Crypto::Aes128KeyHandle mKey = Crypto::Aes128KeyHandle(); +}; + +} // namespace app +} // namespace chip diff --git a/src/app/icd/ICDManager.cpp b/src/app/icd/ICDManager.cpp index 65aca79acda778..3d75b0d4dcf74c 100644 --- a/src/app/icd/ICDManager.cpp +++ b/src/app/icd/ICDManager.cpp @@ -73,7 +73,7 @@ void ICDManager::Init(PersistentStorageDelegate * storage, FabricTable * fabricT // VerifyOrDie(kFastPollingInterval.count() < activeModeDuration); UpdateICDMode(); - UpdateOperationState(OperationalState::ActiveMode); + UpdateOperationState(OperationalState::IdleMode); } void ICDManager::Shutdown() @@ -84,7 +84,7 @@ void ICDManager::Shutdown() DeviceLayer::SystemLayer().CancelTimer(OnActiveModeDone, this); DeviceLayer::SystemLayer().CancelTimer(OnTransitionToIdle, this); mICDMode = ICDMode::SIT; - mOperationalState = OperationalState::IdleMode; + mOperationalState = OperationalState::ActiveMode; mStorage = nullptr; mFabricTable = nullptr; mStateObserverPool.ReleaseAll(); diff --git a/src/app/icd/ICDManager.h b/src/app/icd/ICDManager.h index 29ff0722c7e54d..75001f8f71e0ca 100644 --- a/src/app/icd/ICDManager.h +++ b/src/app/icd/ICDManager.h @@ -33,14 +33,13 @@ namespace app { // Used in unit tests class TestICDManager; -// This structure is used for the creation an ObjectPool of ICDStateObserver pointers - /** * @brief ICD Manager is responsible of processing the events and triggering the correct action for an ICD */ class ICDManager : public ICDListener { public: + // This structure is used for the creation an ObjectPool of ICDStateObserver pointers struct ObserverPointer { ObserverPointer(ICDStateObserver * obs) : mObserver(obs) {} @@ -142,7 +141,8 @@ class ICDManager : public ICDListener BitFlags mKeepActiveFlags{ 0 }; - OperationalState mOperationalState = OperationalState::IdleMode; + // Initialize mOperationalState to ActiveMode so the init sequence at bootup triggers the IdleMode behaviour first. + OperationalState mOperationalState = OperationalState::ActiveMode; ICDMode mICDMode = ICDMode::SIT; PersistentStorageDelegate * mStorage = nullptr; FabricTable * mFabricTable = nullptr; diff --git a/src/app/icd/ICDMonitoringTable.cpp b/src/app/icd/ICDMonitoringTable.cpp index f47da4187dda65..fe8c959983a714 100644 --- a/src/app/icd/ICDMonitoringTable.cpp +++ b/src/app/icd/ICDMonitoringTable.cpp @@ -161,6 +161,25 @@ bool ICDMonitoringEntry::IsKeyEquivalent(ByteSpan keyData) return (data == validation) ? true : false; } +ICDMonitoringEntry & ICDMonitoringEntry::operator=(const ICDMonitoringEntry & icdMonitoringEntry) +{ + if (this == &icdMonitoringEntry) + { + return *this; + } + + fabricIndex = icdMonitoringEntry.fabricIndex; + checkInNodeID = icdMonitoringEntry.checkInNodeID; + monitoredSubject = icdMonitoringEntry.monitoredSubject; + index = icdMonitoringEntry.index; + keyHandleValid = icdMonitoringEntry.keyHandleValid; + symmetricKeystore = icdMonitoringEntry.symmetricKeystore; + memcpy(key.AsMutable(), icdMonitoringEntry.key.As(), + sizeof(Crypto::Aes128KeyByteArray)); + + return *this; +} + CHIP_ERROR ICDMonitoringTable::Get(uint16_t index, ICDMonitoringEntry & entry) const { entry.fabricIndex = this->mFabric; diff --git a/src/app/icd/ICDMonitoringTable.h b/src/app/icd/ICDMonitoringTable.h index cf5fa28b4f1138..c97703b226aa75 100644 --- a/src/app/icd/ICDMonitoringTable.h +++ b/src/app/icd/ICDMonitoringTable.h @@ -54,7 +54,6 @@ struct ICDMonitoringEntry : public PersistentData this->symmetricKeystore = keyStore; } - bool IsValid() { return this->checkInNodeID != kUndefinedNodeId && this->fabricIndex != kUndefinedFabricIndex; } CHIP_ERROR UpdateKey(StorageKeyName & key) override; CHIP_ERROR Serialize(TLV::TLVWriter & writer) const override; CHIP_ERROR Deserialize(TLV::TLVReader & reader) override; @@ -77,6 +76,13 @@ struct ICDMonitoringEntry : public PersistentData */ CHIP_ERROR SetKey(ByteSpan keyData); CHIP_ERROR DeleteKey(void); + inline bool IsValid() + { + return (symmetricKeystore != nullptr && keyHandleValid && fabricIndex != kUndefinedFabricIndex && + checkInNodeID != kUndefinedNodeId); + } + + ICDMonitoringEntry & operator=(const ICDMonitoringEntry & icdMonitoringEntry); /** * @brief Implement the key verification needed by the ICDManagement Server. diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 0a3eedd4ad767c..96f2530cc59acc 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -120,8 +120,10 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeReportIBs(ReportDataMessage::Bu ConcreteAttributePath readPath; ChipLogDetail(DataManagement, - "Building Reports for ReadHandler with LastReportGeneration = %" PRIu64 " DirtyGeneration = %" PRIu64, - apReadHandler->mPreviousReportsBeginGeneration, apReadHandler->mDirtyGeneration); + "Building Reports for ReadHandler with LastReportGeneration = 0x" ChipLogFormatX64 + " DirtyGeneration = 0x" ChipLogFormatX64, + ChipLogValueX64(apReadHandler->mPreviousReportsBeginGeneration), + ChipLogValueX64(apReadHandler->mDirtyGeneration)); // This ReadHandler is not generating reports, so we reset the iterator for a clean start. if (!apReadHandler->IsReporting()) diff --git a/src/app/reporting/ReportSchedulerImpl.cpp b/src/app/reporting/ReportSchedulerImpl.cpp index 5c061d1336bc84..1655fbc434bb04 100644 --- a/src/app/reporting/ReportSchedulerImpl.cpp +++ b/src/app/reporting/ReportSchedulerImpl.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include +#include #include #include @@ -73,9 +73,9 @@ void ReportSchedulerImpl::OnSubscriptionEstablished(ReadHandler * aReadHandler) newNode = mNodesPool.CreateObject(aReadHandler, this, now); ChipLogProgress(DataManagement, - "Registered a ReadHandler that will schedule a report between system Timestamp: %" PRIu64 - " and system Timestamp %" PRIu64 ".", - newNode->GetMinTimestamp().count(), newNode->GetMaxTimestamp().count()); + "Registered a ReadHandler that will schedule a report between system Timestamp: 0x" ChipLogFormatX64 + " and system Timestamp 0x" ChipLogFormatX64 ".", + ChipLogValueX64(newNode->GetMinTimestamp().count()), ChipLogValueX64(newNode->GetMaxTimestamp().count())); } /// @brief When a ReadHandler becomes reportable, schedule, recalculate and reschedule the report. diff --git a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp index 55992e35febd24..d10a7ea4d3fea3 100644 --- a/src/app/reporting/SynchronizedReportSchedulerImpl.cpp +++ b/src/app/reporting/SynchronizedReportSchedulerImpl.cpp @@ -193,8 +193,8 @@ void SynchronizedReportSchedulerImpl::TimerFired() if (node->IsReportableNow(now)) { node->SetEngineRunScheduled(true); - ChipLogProgress(DataManagement, "Handler: %p with min: %" PRIu64 " and max: %" PRIu64 "", (node), - node->GetMinTimestamp().count(), node->GetMaxTimestamp().count()); + ChipLogProgress(DataManagement, "Handler: %p with min: 0x" ChipLogFormatX64 " and max: 0x" ChipLogFormatX64 "", (node), + ChipLogValueX64(node->GetMinTimestamp().count()), ChipLogValueX64(node->GetMaxTimestamp().count())); } return Loop::Continue; diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 7206696ba95f99..018c6f2196eb49 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -17,7 +17,7 @@ #pragma once -#include +#include #include #include diff --git a/src/app/tests/BUILD.gn b/src/app/tests/BUILD.gn index 26c0cb0693c532..78e3bdb229e49c 100644 --- a/src/app/tests/BUILD.gn +++ b/src/app/tests/BUILD.gn @@ -95,6 +95,8 @@ source_set("scenes-table-test-srcs") { "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h", "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp", "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.h", + "${chip_root}/src/app/clusters/scenes-server/SceneHandlerImpl.cpp", + "${chip_root}/src/app/clusters/scenes-server/SceneHandlerImpl.h", "${chip_root}/src/app/clusters/scenes-server/SceneTable.h", "${chip_root}/src/app/clusters/scenes-server/SceneTableImpl.cpp", "${chip_root}/src/app/clusters/scenes-server/SceneTableImpl.h", diff --git a/src/app/tests/TestICDManager.cpp b/src/app/tests/TestICDManager.cpp index 693d1bc5630f73..7e47996dff78fa 100644 --- a/src/app/tests/TestICDManager.cpp +++ b/src/app/tests/TestICDManager.cpp @@ -141,13 +141,15 @@ class TestICDManager { TestContext * ctx = static_cast(aContext); - // After the init we should be in active mode + // After the init we should be in Idle mode + NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); + AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDManagementServer::GetInstance().GetIdleModeDurationSec()) + 1); + // Idle mode interval expired, ICDManager transitioned to the ActiveMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); AdvanceClockAndRunEventLoop(ctx, ICDManagementServer::GetInstance().GetActiveModeDurationMs() + 1); // Active mode interval expired, ICDManager transitioned to the IdleMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::IdleMode); AdvanceClockAndRunEventLoop(ctx, secondsToMilliseconds(ICDManagementServer::GetInstance().GetIdleModeDurationSec()) + 1); - // Idle mode interval expired, ICDManager transitioned to the ActiveMode. NL_TEST_ASSERT(aSuite, ctx->mICDManager.mOperationalState == ICDManager::OperationalState::ActiveMode); // Events updating the Operation to Active mode can extend the current active mode time by 1 Active mode threshold. diff --git a/src/app/tests/TestICDMonitoringTable.cpp b/src/app/tests/TestICDMonitoringTable.cpp index a228e3368696fc..170ece20e1778d 100644 --- a/src/app/tests/TestICDMonitoringTable.cpp +++ b/src/app/tests/TestICDMonitoringTable.cpp @@ -61,6 +61,39 @@ constexpr uint8_t kKeyBuffer3a[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f }; +void TestEntryAssignationOverload(nlTestSuite * aSuite, void * aContext) +{ + TestSessionKeystoreImpl keystore; + ICDMonitoringEntry entry(&keystore); + + // Test Setting Key + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == entry.SetKey(ByteSpan(kKeyBuffer1a))); + + entry.fabricIndex = 2; + + NL_TEST_ASSERT(aSuite, !entry.IsValid()); + + entry.checkInNodeID = 34; + entry.monitoredSubject = 32; + + // Entry should be valid now + NL_TEST_ASSERT(aSuite, entry.IsValid()); + + ICDMonitoringEntry entry2; + + NL_TEST_ASSERT(aSuite, !entry2.IsValid()); + + entry2 = entry; + + NL_TEST_ASSERT(aSuite, entry2.IsValid()); + + NL_TEST_ASSERT(aSuite, entry2.fabricIndex == entry.fabricIndex); + NL_TEST_ASSERT(aSuite, entry2.checkInNodeID == entry.checkInNodeID); + NL_TEST_ASSERT(aSuite, entry2.monitoredSubject == entry.monitoredSubject); + + NL_TEST_ASSERT(aSuite, entry2.IsKeyEquivalent(ByteSpan(kKeyBuffer1a))); +} + void TestEntryKeyFunctions(nlTestSuite * aSuite, void * aContext) { TestSessionKeystoreImpl keystore; @@ -393,6 +426,7 @@ int Test_Setup(void * inContext) int TestClientMonitoringRegistrationTable() { static nlTest sTests[] = { NL_TEST_DEF("TestEntryKeyFunctions", TestEntryKeyFunctions), + NL_TEST_DEF("TestEntryAssignationOverload", TestEntryAssignationOverload), NL_TEST_DEF("TestSaveAndLoadRegistrationValue", TestSaveAndLoadRegistrationValue), NL_TEST_DEF("TestSaveAllInvalidRegistrationValues", TestSaveAllInvalidRegistrationValues), NL_TEST_DEF("TestSaveLoadRegistrationValueForMultipleFabrics", diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index b54d03757bb1f3..dd163bcf210aa1 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -333,6 +333,7 @@ class TestReadInteraction static void TestReadClientGenerateOneEventPaths(nlTestSuite * apSuite, void * apContext); static void TestReadClientGenerateTwoEventPaths(nlTestSuite * apSuite, void * apContext); static void TestReadClientInvalidReport(nlTestSuite * apSuite, void * apContext); + static void TestReadClientInvalidAttributeId(nlTestSuite * apSuite, void * apContext); static void TestReadHandlerInvalidAttributePath(nlTestSuite * apSuite, void * apContext); static void TestProcessSubscribeRequest(nlTestSuite * apSuite, void * apContext); #if CHIP_CONFIG_ENABLE_ICD_SERVER @@ -390,12 +391,19 @@ class TestReadInteraction static void TestReadHandlerMalformedSubscribeRequest(nlTestSuite * apSuite, void * apContext); private: + enum class ReportType : uint8_t + { + kValid, + kInvalidNoAttributeId, + kInvalidOutOfRangeAttributeId, + }; + static void GenerateReportData(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload, - bool aNeedInvalidReport, bool aSuppressResponse, bool aHasSubscriptionId); + ReportType aReportType, bool aSuppressResponse, bool aHasSubscriptionId); }; void TestReadInteraction::GenerateReportData(nlTestSuite * apSuite, void * apContext, System::PacketBufferHandle & aPayload, - bool aNeedInvalidReport, bool aSuppressResponse, bool aHasSubscriptionId = false) + ReportType aReportType, bool aSuppressResponse, bool aHasSubscriptionId = false) { CHIP_ERROR err = CHIP_NO_ERROR; System::PacketBufferTLVWriter writer; @@ -428,12 +436,17 @@ void TestReadInteraction::GenerateReportData(nlTestSuite * apSuite, void * apCon AttributePathIB::Builder & attributePathBuilder = attributeDataIBBuilder.CreatePath(); NL_TEST_ASSERT(apSuite, attributeDataIBBuilder.GetError() == CHIP_NO_ERROR); - if (aNeedInvalidReport) + if (aReportType == ReportType::kInvalidNoAttributeId) { attributePathBuilder.Node(1).Endpoint(2).Cluster(3).ListIndex(5).EndOfAttributePathIB(); } + else if (aReportType == ReportType::kInvalidOutOfRangeAttributeId) + { + attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(0xFFF18000).EndOfAttributePathIB(); + } else { + NL_TEST_ASSERT(apSuite, aReportType == ReportType::kValid); attributePathBuilder.Node(1).Endpoint(2).Cluster(3).Attribute(4).EndOfAttributePathIB(); } @@ -496,7 +509,7 @@ void TestReadInteraction::TestReadClient(nlTestSuite * apSuite, void * apContext ctx.GetLoopback().mNumMessagesToDrop = 1; ctx.DrainAndServiceIO(); - GenerateReportData(apSuite, apContext, buf, false /*aNeedInvalidReport*/, true /* aSuppressResponse*/); + GenerateReportData(apSuite, apContext, buf, ReportType::kValid, true /* aSuppressResponse*/); err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -521,8 +534,7 @@ void TestReadInteraction::TestReadUnexpectedSubscriptionId(nlTestSuite * apSuite ctx.DrainAndServiceIO(); // For read, we don't expect there is subscription id in report data. - GenerateReportData(apSuite, apContext, buf, false /*aNeedInvalidReport*/, true /* aSuppressResponse*/, - true /*aHasSubscriptionId*/); + GenerateReportData(apSuite, apContext, buf, ReportType::kValid, true /* aSuppressResponse*/, true /*aHasSubscriptionId*/); err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INVALID_ARGUMENT); } @@ -547,7 +559,7 @@ void TestReadInteraction::TestReadHandler(nlTestSuite * apSuite, void * apContex ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, app::reporting::GetDefaultReportScheduler()); - GenerateReportData(apSuite, apContext, reportDatabuf, false /*aNeedInvalidReport*/, false /* aSuppressResponse*/); + GenerateReportData(apSuite, apContext, reportDatabuf, ReportType::kValid, false /* aSuppressResponse*/); err = readHandler.SendReportData(std::move(reportDatabuf), false); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INCORRECT_STATE); @@ -665,12 +677,46 @@ void TestReadInteraction::TestReadClientInvalidReport(nlTestSuite * apSuite, voi ctx.GetLoopback().mNumMessagesToDrop = 1; ctx.DrainAndServiceIO(); - GenerateReportData(apSuite, apContext, buf, true /*aNeedInvalidReport*/, true /* aSuppressResponse*/); + GenerateReportData(apSuite, apContext, buf, ReportType::kInvalidNoAttributeId, true /* aSuppressResponse*/); err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB); } +void TestReadInteraction::TestReadClientInvalidAttributeId(nlTestSuite * apSuite, void * apContext) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + MockInteractionModelApp delegate; + + System::PacketBufferHandle buf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Read); + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // We don't actually want to deliver that message, because we want to + // synthesize the read response. But we don't want it hanging around + // forever either. + ctx.GetLoopback().mNumMessagesToDrop = 1; + ctx.DrainAndServiceIO(); + + GenerateReportData(apSuite, apContext, buf, ReportType::kInvalidOutOfRangeAttributeId, true /* aSuppressResponse*/); + + err = readClient.ProcessReportData(std::move(buf), ReadClient::ReportType::kContinuingTransaction); + // Overall processing should succeed. + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + // We should not have gotten any attribute reports or errors. + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 0); + NL_TEST_ASSERT(apSuite, !delegate.mGotReport); + NL_TEST_ASSERT(apSuite, !delegate.mReadError); +} + void TestReadInteraction::TestReadHandlerInvalidAttributePath(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -691,7 +737,7 @@ void TestReadInteraction::TestReadHandlerInvalidAttributePath(nlTestSuite * apSu ReadHandler readHandler(nullCallback, exchangeCtx, chip::app::ReadHandler::InteractionType::Read, app::reporting::GetDefaultReportScheduler()); - GenerateReportData(apSuite, apContext, reportDatabuf, false /*aNeedInvalidReport*/, false /* aSuppressResponse*/); + GenerateReportData(apSuite, apContext, reportDatabuf, ReportType::kValid, false /* aSuppressResponse*/); err = readHandler.SendReportData(std::move(reportDatabuf), false); NL_TEST_ASSERT(apSuite, err == CHIP_ERROR_INCORRECT_STATE); @@ -1940,7 +1986,7 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 2; - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2283,7 +2329,8 @@ void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite readPrepareParams.mMinIntervalFloorSeconds = 1; readPrepareParams.mMaxIntervalCeilingSeconds = 3600; - printf("\nSend first subscribe request message with wildcard urgent event to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message with wildcard urgent event to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); readPrepareParams.mKeepSubscriptions = true; @@ -2463,7 +2510,7 @@ void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * ap readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 1; - printf("\nSend subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2615,7 +2662,7 @@ void TestReadInteraction::TestSubscribePartialOverlap(nlTestSuite * apSuite, voi readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 1; - printf("\nSend subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2692,7 +2739,7 @@ void TestReadInteraction::TestSubscribeSetDirtyFullyOverlap(nlTestSuite * apSuit readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 1; - printf("\nSend subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2765,7 +2812,7 @@ void TestReadInteraction::TestSubscribeEarlyShutdown(nlTestSuite * apSuite, void readPrepareParams.mMaxIntervalCeilingSeconds = 5; readPrepareParams.mKeepSubscriptions = false; - printf("Send subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("Send subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2821,7 +2868,7 @@ void TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite readPrepareParams.mSessionHolder.Grab(ctx.GetSessionBobToAlice()); readPrepareParams.mMinIntervalFloorSeconds = 0; readPrepareParams.mMaxIntervalCeilingSeconds = 1; - printf("\nSend subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, @@ -2933,7 +2980,7 @@ void TestReadInteraction::TestSubscribeInvalidInterval(nlTestSuite * apSuite, vo NL_TEST_ASSERT(apSuite, readClient.SendRequest(readPrepareParams) == CHIP_ERROR_INVALID_ARGUMENT); - printf("\nSend subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend subscribe request message to Node: 0x" ChipLogFormatX64 "\n", ChipLogValueX64(chip::kTestDeviceNodeId)); ctx.DrainAndServiceIO(); } @@ -2994,7 +3041,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -3116,7 +3164,8 @@ void TestReadInteraction::TestSubscribeRoundtripStatusReportTimeout(nlTestSuite { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -3293,7 +3342,8 @@ void TestReadInteraction::TestSubscribeRoundtripChunkStatusReportTimeout(nlTestS { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -3365,7 +3415,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -3469,7 +3520,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -3571,7 +3623,8 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReport(nlTestSuite * ap { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + printf("\nSend first subscribe request message to Node: 0x" ChipLogFormatX64 "\n", + ChipLogValueX64(chip::kTestDeviceNodeId)); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -4934,6 +4987,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadClientGenerateOneEventPaths", chip::app::TestReadInteraction::TestReadClientGenerateOneEventPaths), NL_TEST_DEF("TestReadClientGenerateTwoEventPaths", chip::app::TestReadInteraction::TestReadClientGenerateTwoEventPaths), NL_TEST_DEF("TestReadClientInvalidReport", chip::app::TestReadInteraction::TestReadClientInvalidReport), + NL_TEST_DEF("TestReadClientInvalidAttributeId", chip::app::TestReadInteraction::TestReadClientInvalidAttributeId), NL_TEST_DEF("TestReadHandlerInvalidAttributePath", chip::app::TestReadInteraction::TestReadHandlerInvalidAttributePath), NL_TEST_DEF("TestProcessSubscribeRequest", chip::app::TestReadInteraction::TestProcessSubscribeRequest), /* diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp index 2ff9139b003bc5..3346c54dabdc6e 100644 --- a/src/app/tests/TestSceneTable.cpp +++ b/src/app/tests/TestSceneTable.cpp @@ -683,6 +683,8 @@ void TestHandlerFunctions(nlTestSuite * aSuite, void * aContext) memset(buffer, 0, buff_span.size()); }; +void TestHandlerHelpers(nlTestSuite * aSuite, void * aContext) {} + void TestStoreScenes(nlTestSuite * aSuite, void * aContext) { SceneTable * sceneTable = scenes::GetSceneTableImpl(kTestEndpoint1, defaultTestTableSize); diff --git a/src/app/tests/suites/TestBasicInformation.yaml b/src/app/tests/suites/TestBasicInformation.yaml index 9ecac058316cd5..7db46f10030999 100644 --- a/src/app/tests/suites/TestBasicInformation.yaml +++ b/src/app/tests/suites/TestBasicInformation.yaml @@ -78,6 +78,8 @@ tests: 18, 19, 20, + 21, + 22, 0xFFF8, # GeneratedCommandList 0xFFF9, # AcceptedCommandList 0xFFFA, # EventList @@ -112,6 +114,8 @@ tests: 18, 19, 20, + 21, + 22, 0xFFF8, # GeneratedCommandList 0xFFF9, # AcceptedCommandList 0xFFFB, # AttributeList @@ -191,9 +195,23 @@ tests: arguments: value: false - - label: "Read the ProductApppearance value" + - label: "Read the ProductAppearance value" command: "readAttribute" attribute: "ProductAppearance" response: # For now all-clusters-app is a satin purple. value: { Finish: 2, PrimaryColor: 5 } + + - label: "Read the Specification Version value" + command: "readAttribute" + attribute: "SpecificationVersion" + response: + # For now all-clusters-app has a version 1.3. + value: 0x01030000 + + - label: "Read the Max Paths Per Invoke value" + command: "readAttribute" + attribute: "MaxPathsPerInvoke" + response: + # For now all-clusters-app only supports 1 max paths per invoke. + value: 1 diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index 626945db5e8d11..e07b707e190858 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -28,6 +28,12 @@ tests: - name: "nodeId" value: nodeId + - label: "Read Feature Map" + command: "readAttribute" + attribute: "FeatureMap" + response: + value: 0x07 + - label: "Read IdleModeDuration" command: "readAttribute" attribute: "IdleModeDuration" diff --git a/src/app/tests/suites/TestScenesFabricRemoval.yaml b/src/app/tests/suites/TestScenesFabricRemoval.yaml new file mode 100644 index 00000000000000..3acb0ebf3ae9df --- /dev/null +++ b/src/app/tests/suites/TestScenesFabricRemoval.yaml @@ -0,0 +1,394 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# !!!!!!!!!! TEST INFORMATION !!!!!!!!!!!!!!!!!! +# This test covers removal of fabric in the SceneTable + +name: Scenes Fabric Removal + +config: + nodeId: 0x12344321 + cluster: "Scenes" + endpoint: 1 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + discriminator: + type: int16u + defaultValue: 3840 + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + G1: + type: group_id + defaultValue: 0x0001 + +tests: + - label: "Commission DUT to TH1" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH1 reads the fabric index" + cluster: "Operational Credentials" + endpoint: 0 + command: "readAttribute" + attribute: "CurrentFabricIndex" + response: + saveAs: th1FabricIndex + + - label: "Open Commissioning Window from alpha" + endpoint: 0 + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + - label: "Commission from TH2" + identity: "beta" + endpoint: 0 + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: payload + + - label: "Wait for the commissioned device to be retrieved for TH2" + endpoint: 0 + identity: beta + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH2 reads the fabric index" + identity: "beta" + endpoint: 0 + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "CurrentFabricIndex" + response: + saveAs: th2FabricIndex + + - label: "TH1 sends a RemoveAllGroups command to DUT." + cluster: "Groups" + command: "RemoveAllGroups" + + - label: "TH 1 Add Group KeySet." + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", + EpochStartTime2: 1110002, + } + + - label: "TH1 Map KeySets to GroupId." + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 0, GroupId: G1, GroupKeySetID: 0x01a1 }] + + - label: "TH1 sends a AddGroup command to DUT for G1." + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "GroupName" + value: "Group1" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "Preparation step : TH2 Add Group KeySet." + identity: "beta" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a2, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1120000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1120001, + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", + EpochStartTime2: 1120002, + } + + - label: "Preparation step TH2 Map KeySets to GroupId." + identity: "beta" + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 0, GroupId: G1, GroupKeySetID: 0x01a2 }] + + - label: "TH2 sends a AddGroup command to DUT for G1." + identity: "beta" + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "GroupName" + value: "Group1" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "TH1 confirms its Scene table is empty and gets its capacity" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + saveAs: fabricCapacity + - name: "GroupID" + value: G1 + + - label: + "TH2 confirms its Scene table is empty and has the same capacity as + TH1" + identity: "beta" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity + - name: "GroupID" + value: G1 + + - label: "TH1 sends an AddScene command to DUT for Scene 1 G1" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: [] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "TH1 sends an AddScene command to DUT for Scene 2 G1" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + - name: "TransitionTime" + value: 0x0000 + - name: "SceneName" + value: "Scene2" + - name: "ExtensionFieldSets" + value: [] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + + - label: "TH2 sends an AddScene command to DUT for Scene 1 G1" + identity: "beta" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: [] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "TH2 sends an AddScene command to DUT for Scene 2 G1" + identity: "beta" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + - name: "TransitionTime" + value: 0x0000 + - name: "SceneName" + value: "Scene2" + - name: "ExtensionFieldSets" + value: [] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + + - label: "TH1 confirms its G1 holds 2 scenes" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity - 2 + - name: "GroupID" + value: G1 + - name: "SceneList" + value: [0x01, 0x02] + + - label: "TH2 confirms its G1 holds 2 scenes" + command: "GetSceneMembership" + identity: "beta" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity - 2 + - name: "GroupID" + value: G1 + - name: "SceneList" + value: [0x01, 0x02] + + - label: "TH1 sends RemoveFabric command for TH2" + cluster: "Operational Credentials" + endpoint: 0 + command: "RemoveFabric" + arguments: + values: + - name: "FabricIndex" + value: th2FabricIndex + + - label: "TH1 confirms its G1 still holds 2 scenes" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity - 2 + - name: "GroupID" + value: G1 + - name: "SceneList" + value: [0x01, 0x02] +# TODO Figure out a way to recommission with Fabric Index 2 and confirm the scene table is empty for that fabric index diff --git a/src/app/tests/suites/TestScenesFabricSceneInfo.yaml b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml new file mode 100644 index 00000000000000..8c211e43d94f40 --- /dev/null +++ b/src/app/tests/suites/TestScenesFabricSceneInfo.yaml @@ -0,0 +1,577 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# !!!!!!!!!! TEST INFORMATION !!!!!!!!!!!!!!!!!! +# This test file tests the FabricSceneInfo attribute of the scenes cluster + +name: Scenes FabricSceneInfo testing + +PICS: + - MCORE.ROLE.COMMISSIONEE + - APPDEVICE.S + - S.S + - S.S.F03 + - S.S.A0007 + +config: + nodeId: 0x12344321 + cluster: "Scenes" + endpoint: 1 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + discriminator: + type: int16u + defaultValue: 3840 + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + G1: + type: group_id + defaultValue: 0x0001 + G2: + type: group_id + defaultValue: 0x0002 + +tests: + - label: "Commission DUT to TH1" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH1 reads the fabric index" + cluster: "Operational Credentials" + endpoint: 0 + command: "readAttribute" + attribute: "CurrentFabricIndex" + response: + saveAs: th1FabricIndex + + - label: "Read FeatureMap FabricScene bit (global attribute 65532)" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x8] + + - label: "Read the FabricSceneInfo attribute (0x0007) " + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + constraints: + type: list + + - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute" + command: "readAttribute" + attribute: "SceneTableSize" + response: + values: + - name: "SceneTableSize" + saveAs: maxScenes + + - label: "Arithmetic operation to get the maxScenes - 1" + cluster: "Unit Testing" + command: "TestAddArguments" + arguments: + values: + - name: "arg1" + value: maxScenes - 1 + - name: "arg2" + value: 0 + response: + values: + - name: "returnValue" + saveAs: maxScenesMinusOne + value: maxScenes - 1 + + - label: "Arithmetic operation to get the fabric Capacity" + cluster: "Unit Testing" + command: "TestAddArguments" + arguments: + values: + - name: "arg1" + value: maxScenesMinusOne / 2 + - name: "arg2" + value: 0 + response: + values: + - name: "returnValue" + saveAs: fabricCapacity + value: maxScenesMinusOne / 2 + - label: "Preparation step :Add Group KeySet." + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", + EpochStartTime2: 1110002, + } + + - label: "Preparation step for using the Write Group Keys command." + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: + [ + { FabricIndex: 0, GroupId: G1, GroupKeySetID: 0x01a1 }, + { FabricIndex: 0, GroupId: G2, GroupKeySetID: 0x01a1 }, + ] + + - label: "TH sends a RemoveAllGroups command to DUT." + cluster: "Groups" + command: "RemoveAllGroups" + + - label: "TH sends a AddGroup command to DUT for G1." + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "GroupName" + value: "Group1" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "TH sends a AddGroup command to DUT for G2." + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "GroupName" + value: "Group2" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G2 + + - label: "TH confirms the Fabric Capacity is Maximum" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity + - name: "GroupID" + value: G1 + + - label: "TH sends an AddScene command to DUT for Scene 1 G1" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x01 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x64 }], + }, + ] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: + "TH confirms the Scene was added to the Scene table by + GetSceneMembership" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity -1 + - name: "GroupID" + value: G1 + + - label: "TH confirms the Scene Was properly added with ViewScene" + command: "ViewScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x01 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x64 }], + }, + ] + + - label: "Read the FabricSceneInfo attribute (0x0007) " + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: "TH sends a RecallScene command for Scene 1 Group 1" + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: "TH sends an AddScene command to DUT for Scene 1 G1" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0002 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x00 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0xFA }], + }, + ] + + - label: "TH confirms the Scene Was properly added with ViewScene" + command: "ViewScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0002 + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x00 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0xFA }], + }, + ] + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "TH sends a RecallScene command for Scene 1 Group 2" + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: + "Configures the DUT to a different state, should invalidate the scene" + cluster: "Level Control" + command: "MoveToLevelWithOnOff" + arguments: + values: + - name: "Level" + value: 200 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 1 + - name: "OptionsOverride" + value: 1 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "Store the current DUT state to a new scene" + command: "StoreScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 3, + CurrentScene: 0x02, + CurrentGroup: G1, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 3, + }, + ] + + - label: "TH sends a RecallScene command for Scene 1 Group 2" + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 3, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 3, + }, + ] + + - label: "Remove Active scene" + command: "RemoveScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "Remove all scenes from G1" + command: "RemoveAllScenes" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "Confirm the FabricSceneInfo attribute was properly updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] diff --git a/src/app/tests/suites/TestScenesMultiFabric.yaml b/src/app/tests/suites/TestScenesMultiFabric.yaml new file mode 100644 index 00000000000000..803b01cdd09e6b --- /dev/null +++ b/src/app/tests/suites/TestScenesMultiFabric.yaml @@ -0,0 +1,1029 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# !!!!!!!!!! TEST INFORMATION !!!!!!!!!!!!!!!!!! +# This test covers multi fabric support for scenes cluster attributes such as LastConfiguredBy and FabricSceneInfo + +name: Scenes Multi-fabric testing + +PICS: + - MCORE.ROLE.COMMISSIONEE + - APPDEVICE.S + - S.S + - S.S.F03 + - S.S.A0007 + +config: + nodeId: 0x12344321 + cluster: "Scenes" + endpoint: 1 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + discriminator: + type: int16u + defaultValue: 3840 + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + G1: + type: group_id + defaultValue: 0x0001 + G2: + type: group_id + defaultValue: 0x0002 + +tests: + - label: "Commission DUT to TH1" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH1 reads the fabric index" + cluster: "Operational Credentials" + endpoint: 0 + command: "readAttribute" + attribute: "CurrentFabricIndex" + response: + saveAs: th1FabricIndex + + - label: "Read the commissioner node ID from the alpha fabric" + identity: "alpha" + endpoint: 0 + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: commissionerNodeIdAlpha + + - label: "Open Commissioning Window from alpha" + endpoint: 0 + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + - label: "Commission from TH2" + identity: "beta" + endpoint: 0 + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: payload + + - label: "Wait for the commissioned device to be retrieved for TH2" + endpoint: 0 + identity: beta + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 4: TH2 reads the fabric index" + identity: "beta" + endpoint: 0 + cluster: "Operational Credentials" + command: "readAttribute" + attribute: "CurrentFabricIndex" + response: + saveAs: th2FabricIndex + + - label: "Read the commissioner node ID from the beta fabric" + identity: "beta" + endpoint: 0 + cluster: "CommissionerCommands" + command: "GetCommissionerNodeId" + response: + values: + - name: "nodeId" + saveAs: commissionerNodeIdBeta + + - label: "Read FeatureMap FabricScene bit (global attribute 65532)" + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x8] + + - label: "Read the FabricSceneInfo attribute (0x0007) " + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + constraints: + type: list + + - label: "TH reads from the DUT the (0x0006) SceneTableSize attribute" + command: "readAttribute" + attribute: "SceneTableSize" + response: + values: + - name: "SceneTableSize" + saveAs: maxScenes + + - label: "Arithmetic operation to get the maxScenes - 1" + cluster: "Unit Testing" + command: "TestAddArguments" + arguments: + values: + - name: "arg1" + value: maxScenes - 1 + - name: "arg2" + value: 0 + response: + values: + - name: "returnValue" + saveAs: maxScenesMinusOne + value: maxScenes - 1 + + - label: "Arithmetic operation to get the fabric Capacity" + cluster: "Unit Testing" + command: "TestAddArguments" + arguments: + values: + - name: "arg1" + value: maxScenesMinusOne / 2 + - name: "arg2" + value: 0 + response: + values: + - name: "returnValue" + saveAs: fabricCapacity + value: maxScenesMinusOne / 2 + + - label: "Preparation step : TH 1 Add Group KeySet." + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a1, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1110000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1110001, + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", + EpochStartTime2: 1110002, + } + + - label: "Preparation step TH1 Map KeySets to GroupId." + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: + [ + { FabricIndex: 0, GroupId: G1, GroupKeySetID: 0x01a1 }, + { FabricIndex: 0, GroupId: G2, GroupKeySetID: 0x01a1 }, + ] + + - label: "TH1 sends a RemoveAllGroups command to DUT." + cluster: "Groups" + command: "RemoveAllGroups" + + - label: "TH1 sends a AddGroup command to DUT for G1." + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "GroupName" + value: "Group1" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "TH1 sends a AddGroup command to DUT for G2." + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "GroupName" + value: "Group2" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G2 + + - label: "Preparation step : TH 2 Add Group KeySet." + identity: "beta" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: "GroupKeySet" + value: + { + GroupKeySetID: 0x01a2, + GroupKeySecurityPolicy: 0, + EpochKey0: "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf", + EpochStartTime0: 1120000, + EpochKey1: "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf", + EpochStartTime1: 1120001, + EpochKey2: "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", + EpochStartTime2: 1120002, + } + + - label: "Preparation step TH1 Map KeySets to GroupId." + identity: "beta" + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 0, GroupId: G1, GroupKeySetID: 0x01a2 }] + + - label: "TH2 sends a AddGroup command to DUT for G1." + identity: "beta" + cluster: "Groups" + command: "AddGroup" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "GroupName" + value: "Group1" + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "TH1 confirms the Fabric Capacity is Maximum" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity + - name: "GroupID" + value: G1 + + - label: "TH1 Reads LastConfiguredBy attribute" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: null + + - label: "TH2 reads LastConfiguredBy attribute" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: null + + - label: "TH1 sends an AddScene command to DUT for Scene 1 G1" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x01 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x64 }], + }, + ] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: + "TH1 confirms the Scene was added to the Scene table by + GetSceneMembership" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity -1 + - name: "GroupID" + value: G1 + + - label: "TH2 confirms the Scene membership wasn't affected for fabric 2" + identity: "beta" + command: "GetSceneMembership" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0x00 + - name: "Capacity" + value: fabricCapacity + - name: "GroupID" + value: G1 + + - label: "TH1 Read the FabricSceneInfo attribute (0x0007) " + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: "TH2 Read the FabricSceneInfo attribute (0x0007) " + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: [] + # TODO : Have FabricSceneInfo initialized on adding a new fabric + + - label: "TH1 reads LastConfiguredBy attribute, should be TH1's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 reads LastConfiguredBy attribute, should be TH1's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 sends an AddScene command to DUT for Scene 1 G1" + identity: "beta" + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 0x0001 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x01 }], + }, + { + ClusterID: 0x0008, + AttributeValueList: + [{ AttributeID: 0x0000, AttributeValue: 0x64 }], + }, + ] + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH2's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 reads LastConfiguredBy attribute, should be TH2's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 sends a RecallScene command for Scene 1 Group 1" + identity: "beta" + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "TH2 confirms the FabricSceneInfo attribute was properly updated" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: + "TH1 confirms there were no change to its FabricSceneInfo attribute" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: "TH1 copies Scene 1 from G1 to Scene 2 in G1" + command: "CopyScene" + arguments: + values: + - name: "Mode" + value: 0x00 + - name: "GroupIdentifierFrom" + value: G1 + - name: "SceneIdentifierFrom" + value: 0x01 + - name: "GroupIdentifierTo" + value: G1 + - name: "SceneIdentifierTo" + value: 0x02 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupIdentifierFrom" + value: G1 + - name: "SceneIdentifierFrom" + value: 0x01 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH1's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 reads LastConfiguredBy attribute, should be TH1's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 confirms the FabricSceneInfo didn't change" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: + "TH1 confirms the update of FabricSceneInfo attribute with scene Valid + still false" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "TH2 Remove Scene 1 from G1" + identity: "beta" + command: "RemoveScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH2's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 reads LastConfiguredBy attribute, should be TH2's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 confirms the FabricSceneInfo's update" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] + + - label: "TH1 confirms its FabricSceneInfo remained unchanged" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "TH1 copies all Scenes from G1 to G1" + command: "CopyScene" + arguments: + values: + - name: "Mode" + value: 0x01 + - name: "GroupIdentifierFrom" + value: G1 + - name: "SceneIdentifierFrom" + value: 0x00 + - name: "GroupIdentifierTo" + value: G2 + - name: "SceneIdentifierTo" + value: 0x00 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupIdentifierFrom" + value: G1 + - name: "SceneIdentifierFrom" + value: 0x00 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH1's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 reads LastConfiguredBy attribute, should be TH1's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 confirms its FabricSceneInfo remained unchanged" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] + + - label: "TH1 confirms its FabricSceneInfo was updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 4, + CurrentScene: 0x00, + CurrentGroup: 0x00, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity - 4, + }, + ] + + - label: "TH1 sends a RecallScene command for Scene 1 Group 2" + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: G2 + - name: "SceneID" + value: 0x01 + + - label: "TH2 confirms its FabricSceneInfo remained unchanged" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x01, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] + + - label: "TH1 confirms its FabricSceneInfo was updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 4, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 4, + }, + ] + + - label: "TH2 Store the current DUT state to a new scene" + identity: "beta" + command: "StoreScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH2's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 reads LastConfiguredBy attribute, should be TH2's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 confirms its FabricSceneInfo was updated" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x02, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: + "TH1 confirms its FabricSceneInfo's field SceneValid remains unchanged" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 4, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 4, + }, + ] + + - label: "TH1 removes all scenes from G1" + command: "RemoveAllScenes" + arguments: + values: + - name: "GroupID" + value: G1 + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G1 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH1's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 reads LastConfiguredBy attribute, should be TH1's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 confirms its FabricSceneInfo remained unchanged" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x02, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] + + - label: + "TH1 confirms its FabricSceneInfo's field SceneCount and + RemainingCapacity were updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "TH2 Remove Scene 2 from G1" + identity: "beta" + command: "RemoveScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x02 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH2's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 reads LastConfiguredBy attribute, should be TH2's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdBeta + + - label: "TH2 confirms its FabricSceneInfo was updated" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x02, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] + + - label: "TH1 confirms its FabricSceneInfo remained unchanged" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 2, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: true, + RemainingCapacity: fabricCapacity - 2, + }, + ] + + - label: "TH1 removes all scenes from G2" + command: "RemoveAllScenes" + arguments: + values: + - name: "GroupID" + value: G2 + response: + values: + - name: "Status" + value: 0 + - name: "GroupID" + value: G2 + + - label: "TH1 reads LastConfiguredBy attribute, should be TH2's nodeId" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 reads LastConfiguredBy attribute, should be TH2's nodeId" + identity: "beta" + command: "readAttribute" + attribute: "LastConfiguredBy" + response: + value: commissionerNodeIdAlpha + + - label: "TH2 confirms its FabricSceneInfo remained unchanged" + identity: "beta" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x02, + CurrentGroup: G1, + FabricIndex: th2FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] + + - label: "TH1 confirms its FabricSceneInfo was updated" + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 0, + CurrentScene: 0x01, + CurrentGroup: G2, + FabricIndex: th1FabricIndex, + SceneValid: false, + RemainingCapacity: fabricCapacity, + }, + ] diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 1137d1dee7c5e3..a6f9974e59d182 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -5707,7 +5707,7 @@ PICS: - label: "Does the device implement the SceneTableSize attribute?" id: S.S.A0006 - - label: "Does the device implement the RemainingCapacity attribute?" + - label: "Does the device implement the FabricSceneInfo attribute?" id: S.S.A0007 # diff --git a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml index 6e4e78125d7566..1f909b06b83b1a 100644 --- a/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BINFO_1_1.yaml @@ -37,7 +37,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 2 + value: 3 constraints: type: int16u diff --git a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml index ed3fe73f726710..08cb955a312fc4 100644 --- a/src/app/tests/suites/certification/Test_TC_S_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_1_1.yaml @@ -41,7 +41,7 @@ tests: constraints: type: int16u - - label: "Step 3a: Read FeatureMap (global attribute 65532)" + - label: "Step 3a: Read FeatureMap NameSupport bit (global attribute 65532)" PICS: (!S.S.F00) command: "readAttribute" attribute: "FeatureMap" @@ -50,7 +50,7 @@ tests: type: bitmap32 hasMasksClear: [0x1] - - label: "Step 3a: Read FeatureMap (global attribute 65532)" + - label: "Step 3a: Read FeatureMap NameSupport bit (global attribute 65532)" PICS: S.S.F00 command: "readAttribute" attribute: "FeatureMap" @@ -59,7 +59,17 @@ tests: type: bitmap32 hasMasksSet: [0x1] - - label: "Step 3b: Read FeatureMap (global attribute 65532)" + - label: "Step 3b: Read FeatureMap Explicit bit (global attribute 65532)" + PICS: (!S.S.F01) + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksClear: [0x2] + + - label: "Step 3b: Read FeatureMap Explicit bit (global attribute 65532)" + PICS: S.S.F01 command: "readAttribute" attribute: "FeatureMap" response: @@ -67,7 +77,17 @@ tests: type: bitmap32 hasMasksSet: [0x2] - - label: "Step 3c: Read FeatureMap (global attribute 65532)" + - label: "Step 3c: Read FeatureMap TableSize bit (global attribute 65532)" + PICS: (!S.S.F02) + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksClear: [0x4] + + - label: "Step 3c: Read FeatureMap TableSize bit (global attribute 65532)" + PICS: S.S.F02 command: "readAttribute" attribute: "FeatureMap" response: @@ -75,6 +95,24 @@ tests: type: bitmap32 hasMasksSet: [0x4] + - label: "Step 3d: Read FeatureMap FabricScene bit (global attribute 65532)" + PICS: (!S.S.F03) + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksClear: [0x8] + + - label: "Step 3d: Read FeatureMap FabricScene bit (global attribute 65532)" + PICS: S.S.F03 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x8] + - label: "Step 4: Read Mandatory attributes in AttributeList (global attribute 65531)" diff --git a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml index 3e31cf836e1dd2..97f3c0a23a1892 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_1.yaml @@ -35,7 +35,7 @@ tests: value: nodeId - label: "Step 2: TH reads from the DUT the (0x0000) SceneCount attribute" - PICS: S.S.A0000 + PICS: S.S.A0000 && (!S.S.F03) command: "readAttribute" attribute: "SceneCount" response: @@ -43,7 +43,7 @@ tests: type: int8u - label: "Step 3: TH reads from the DUT the (0x0001) CurrentScene attribute" - PICS: S.S.A0001 + PICS: S.S.A0001 && (!S.S.F03) command: "readAttribute" attribute: "CurrentScene" response: @@ -51,7 +51,7 @@ tests: type: int8u - label: "Step 4: TH reads from the DUT the (0x0002) CurrentGroup attribute" - PICS: S.S.A0002 + PICS: S.S.A0002 && (!S.S.F03) command: "readAttribute" attribute: "CurrentGroup" response: @@ -59,7 +59,7 @@ tests: type: group_id - label: "Step 5: TH reads from the DUT the (0x0003) SceneValid attribute" - PICS: S.S.A0003 + PICS: S.S.A0003 && (!S.S.F03) command: "readAttribute" attribute: "SceneValid" response: @@ -67,7 +67,7 @@ tests: type: boolean - label: "Step 6: TH reads from the DUT the (0x0004) NameSupport attribute" - PICS: S.S.A0003 && S.S.F00 + PICS: S.S.A0004 && S.S.F00 command: "readAttribute" attribute: "NameSupport" response: @@ -103,11 +103,10 @@ tests: type: int16u - label: - "Step 9: TH reads from the DUT the (0x0007) RemainingCapacity - attribute" + "Step 9: TH reads from the DUT the (0x0007) FabricSceneInfo attribute" PICS: S.S.A0007 command: "readAttribute" - attribute: "RemainingCapacity" + attribute: "FabricSceneInfo" response: constraints: - type: int8u + type: list diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index a1f900478330c4..5601e168d5ab34 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -309,7 +309,7 @@ tests: type: boolean - label: "Step 3g: TH reads attribute SceneTableSize from DUT." - PICS: S.S.F03 && S.S.F02 + PICS: PICS_SDK_CI_ONLY && S.S.F03 && S.S.F02 command: "readAttribute" attribute: "SceneTableSize" response: @@ -317,7 +317,6 @@ tests: constraints: type: int16u - #FabricSceneInfo attribute not supported - label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" verification: | DUT provides FabricSceneInfo containing (for the current fabric) following fields: @@ -330,7 +329,7 @@ tests: SceneValid has the value TRUE. - if S.S.F02(TS), RemainingCapacity has the value SceneTableSize/2 + if S.S.F02(TS), RemainingCapacity has the value fabricCapacity - 1 cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP && S.S.F03 && S.S.F02 @@ -341,18 +340,21 @@ tests: - name: "expectedValue" value: "y" - #- label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" - # PICS: S.S.F03 && S.S.F02 - # command: "readAttribute" - # attribute: "FabricSceneInfo" - # response: - # value: { - # SceneCount: SceneCountValue, - # CurrentScene: 0x01, - # CurrentGroup: G1, - # SceneValid: true, - # RemainingCapacity: ( SceneTableSizeValue/2 ), - # } + - label: "Step 3h: TH reads attribute FabricSceneInfo from DUT" + PICS: PICS_SDK_CI_ONLY && S.S.F03 && S.S.F02 + command: "readAttribute" + attribute: "FabricSceneInfo" + response: + value: + [ + { + SceneCount: 1, + CurrentScene: 0x01, + CurrentGroup: G1, + SceneValid: true, + RemainingCapacity: fabricCapacity - 1, + }, + ] - label: "Step 4a: Reboot target device" PICS: PICS_SDK_CI_ONLY diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index eb629bb708fdde..77167aa6f46673 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -651,14 +651,14 @@ I.C.AO-WRITE=0 # Scenes Cluster S.S=1 -S.S.A0000=1 -S.S.A0001=1 -S.S.A0002=1 -S.S.A0003=1 +S.S.A0000=0 +S.S.A0001=0 +S.S.A0002=0 +S.S.A0003=0 S.S.A0004=1 S.S.A0005=1 S.S.A0006=1 -S.S.A0007=0 +S.S.A0007=1 S.S.C00.Rsp=1 S.S.C01.Rsp=1 S.S.C02.Rsp=1 @@ -674,7 +674,7 @@ S.S.AO=0 S.S.F00=1 S.S.F01=1 S.S.F02=1 -S.S.F03=0 +S.S.F03=1 PICS_SC_RECALL_SCENE_TRANSITION_TIME=1 S.C=0 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 5202ed65195e02..18a069f267e33e 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -321,6 +321,9 @@ "Test_TC_G_2_1" ], "Scenes": [ + "TestScenesFabricRemoval", + "TestScenesFabricSceneInfo", + "TestScenesMultiFabric", "Test_TC_S_1_1", "Test_TC_S_2_1", "Test_TC_S_2_2", diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 619ecdcd923dcc..1add78990aa7e9 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -158,6 +158,8 @@ void MatterRefrigeratorAndTemperatureControlledCabinetModePluginServerInitCallba void MatterOperationalStatePluginServerInitCallback() {} void MatterRvcOperationalStatePluginServerInitCallback() {} void MatterDishwasherAlarmPluginServerInitCallback() {} +void MatterBooleanSensorConfigurationPluginServerInitCallback() {} +void MatterValveConfigurationAndControlPluginServerInitCallback() {} // **************************************** // Print out information about each cluster // **************************************** diff --git a/src/app/zap-templates/templates/app/attribute-size.zapt b/src/app/zap-templates/templates/app/attribute-size.zapt deleted file mode 100644 index 489dca0b893f68..00000000000000 --- a/src/app/zap-templates/templates/app/attribute-size.zapt +++ /dev/null @@ -1,11 +0,0 @@ -{{> header}} - -// Prevent multiple inclusion -#pragma once - -// ZCL attribute sizes -{{#zcl_atomics}} -{{#if size}} -{{ident}}ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE, {{size}}, -{{/if}} -{{/zcl_atomics}} diff --git a/src/app/zap-templates/templates/app/cluster-enums-check.zapt b/src/app/zap-templates/templates/app/cluster-enums-check.zapt index cf66cef8a3d5c2..cb263c05153db1 100644 --- a/src/app/zap-templates/templates/app/cluster-enums-check.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums-check.zapt @@ -14,21 +14,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue({{asUpperCamelCase ../n { using EnumType = {{asUpperCamelCase ../name}}::{{asType label}}; switch (val) { -{{#if (isInConfigList label "WeakEnums")}} -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -{{/if}} {{#zcl_enum_items}} case EnumType::k{{asUpperCamelCase label}}: {{/zcl_enum_items}} -{{#if (isInConfigList label "WeakEnums")}} -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - {{#zcl_enum_items}} - case EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}}: - {{/zcl_enum_items}} -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -{{/if}} return val; default: return static_cast({{first_unused_enum_value mode="first_unused"}}); diff --git a/src/app/zap-templates/templates/app/cluster-enums.zapt b/src/app/zap-templates/templates/app/cluster-enums.zapt index 2f4ba955abbf89..34092a124f519e 100644 --- a/src/app/zap-templates/templates/app/cluster-enums.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums.zapt @@ -4,7 +4,6 @@ #include -#include namespace chip { namespace app { @@ -14,11 +13,6 @@ namespace Clusters { namespace {{asUpperCamelCase name}} { {{#zcl_enums}} -{{#if (isInConfigList label "WeakEnums")}} -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -{{/if}} // Enum for {{label}} enum class {{asType label}} : {{asUnderlyingZclType name}} { {{#zcl_enum_items}} @@ -38,12 +32,6 @@ kUnknownEnumValue = {{first_unused_enum_value mode="first_unused"}}, // src/app/common/templates/config-data.yaml. {{/unless}} }; -{{#if (isInConfigList label "WeakEnums")}} -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using {{asType label}} = EmberAf{{asType label}}; -static {{asType label}} __attribute__((unused)) k{{asType label}}kUnknownEnumValue = static_cast<{{asType label}}>({{first_unused_enum_value mode="first_unused"}}); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -{{/if}} {{/zcl_enums}} {{#zcl_bitmaps}} diff --git a/src/app/zap-templates/templates/app/cluster-objects.zapt b/src/app/zap-templates/templates/app/cluster-objects.zapt index 9b4fe04b4341a9..4e17d227629f34 100644 --- a/src/app/zap-templates/templates/app/cluster-objects.zapt +++ b/src/app/zap-templates/templates/app/cluster-objects.zapt @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/zap-templates/templates/app/enums.zapt b/src/app/zap-templates/templates/app/enums.zapt deleted file mode 100644 index d0e95a7df2b75f..00000000000000 --- a/src/app/zap-templates/templates/app/enums.zapt +++ /dev/null @@ -1,20 +0,0 @@ -{{> header}} - -// Prevent multiple inclusion -#pragma once - -#include - -// ZCL enums - -{{#zcl_enums}} -{{#if (isInConfigList label "WeakEnums")}} - -// Enum for {{label}} -enum EmberAf{{asType label}} : {{asUnderlyingZclType name}} { -{{#zcl_enum_items}} -{{ident}}EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} = {{value}}, -{{/zcl_enum_items}} -}; -{{/if}} -{{/zcl_enums}} diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index 63cd2e9146a6b1..4bc7ef7ee81604 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -10,6 +10,7 @@ + @@ -55,6 +56,7 @@ + @@ -85,6 +87,7 @@ + diff --git a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml index a37d30c8ce9f61..a9c0f7f620e42a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/basic-information-cluster.xml @@ -72,7 +72,7 @@ limitations under the License. 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. - + DataModelRevision VendorName @@ -107,6 +107,8 @@ limitations under the License. UniqueID CapabilityMinima ProductAppearance + SpecificationVersion + MaxPathsPerInvoke The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. diff --git a/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml new file mode 100644 index 00000000000000..44bb181f2b9d59 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/boolean-sensor-configuration-cluster.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Boolean Sensor Configuration + Measurement & Sensing + 0x0080 + BOOLEAN_SENSOR_CONFIGURATION_CLUSTER + true + true + This cluster is used to configure a boolean sensor. + + + SensitivityLevel + AlarmsActive + AlarmsSuppressed + AlarmsEnabled + + + This command is used to suppress the specified alarm. + + + + + This event SHALL be generated when any bits in the AlarmsActive and/or AlarmsSuppressed attributes change. + + + + + + This event SHALL be generated when the device detects a sensor fault. + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml index 649c45fea3ae5a..3c4499d6d7a28e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml @@ -69,7 +69,7 @@ limitations under the License. BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER true true - + VendorName VendorID @@ -86,7 +86,7 @@ limitations under the License. SerialNumber Reachable UniqueID - ProductAppearance + ProductAppearance The StartUp event SHALL be emitted by a Node as soon as reasonable after completing a boot or reboot process. diff --git a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml index e3fa9f85c51c21..c5e4b98ae6d333 100644 --- a/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/drlc-cluster.xml @@ -109,13 +109,6 @@ limitations under the License. - - - - - - - @@ -137,7 +130,7 @@ limitations under the License. - + @@ -182,7 +175,7 @@ limitations under the License. - + Demand Response Load Control Energy This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. @@ -192,19 +185,18 @@ limitations under the License. true - DeviceClass - LoadControlPrograms - NumberOfLoadControlPrograms - Events - ActiveEvents - NumberOfEventsPerProgram - NumberOfTransistions - + LoadControlPrograms + NumberOfLoadControlPrograms + Events + ActiveEvents + NumberOfEventsPerProgram + NumberOfTransitions + DefaultRandomStart - + DefaultRandomDuration diff --git a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml index a307d0c192a6b9..eabc56a4d95916 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-commissioning-cluster.xml @@ -60,12 +60,12 @@ limitations under the License. Success/failure response for ArmFailSafe command - + Set the regulatory configuration to be used during commissioning - + diff --git a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml index 90a335b46b1988..26af706cd62b78 100644 --- a/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/icd-management-cluster.xml @@ -81,7 +81,7 @@ limitations under the License. UserActiveModeTriggerInstruction - Register a client to the end device + Register a client to the end device @@ -89,21 +89,26 @@ limitations under the License. - - RegisterClient response command + + RegisterClient response command - Unregister a client from an end device + Unregister a client from an end device - + Request the end device to stay in Active Mode for an additional ActiveModeThreshold + + + StayActiveRequest response command + + diff --git a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml index aaa1820fae3320..d4f6ffbba9a742 100644 --- a/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/keypad-input-cluster.xml @@ -27,7 +27,7 @@ limitations under the License. Upon receipt, this SHALL process a keycode as input to the media device. - + @@ -44,7 +44,7 @@ limitations under the License. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index b88f9cd12943cb..03cb6da5199103 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -2032,6 +2032,54 @@ limitations under the License. + + MA-boolean-sensor + CHIP + Matter Boolean Sensor + 0x0103 + 0x0041 + Simple + Endpoint + + + + + TAG_LIST + + + + + MA-valve + CHIP + Matter Valve + 0x0103 + 0x0042 + Simple + Endpoint + + + + + + + + MA-water-leak-detector + CHIP + Matter Water Leak Detector + 0x0103 + 0x0043 + Simple + Endpoint + Matter Boolean Sensor + + + + + + TAG_LIST + + + MA-all-clusters-app CHIP diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml index 2f89779bda6b4a..9d31baf004f7e5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml @@ -30,6 +30,7 @@ This is because zap does not currently support generating code for clusters that + @@ -42,6 +43,7 @@ This is because zap does not currently support generating code for clusters that + @@ -88,6 +90,7 @@ This is because zap does not currently support generating code for clusters that + diff --git a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml new file mode 100644 index 00000000000000..e12d37d267e9c5 --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + General + Oven Mode + 0x0049 + OVEN_MODE_CLUSTER + true + true + Attributes and commands for selecting a mode from a list of supported options. + + + SupportedModes + CurrentMode + StartUpMode + OnMode + + + + + This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + + + + + + + This command is sent by the device on receipt of the ChangeToModeWithStatus command. + + + + + + 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 69455e4de08469..b8bcbc1243a1dd 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -25,6 +25,15 @@ limitations under the License. + + + + + + + + + @@ -48,14 +57,14 @@ limitations under the License. true - SceneCount - CurrentScene - CurrentGroup - SceneValid + SceneCount + CurrentScene + CurrentGroup + SceneValid NameSupport LastConfiguredBy SceneTableSize - RemainingCapacity + FabricSceneInfo Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' diff --git a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml index 22dfff577636f7..febb19ed595e36 100644 --- a/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml @@ -35,7 +35,10 @@ limitations under the License. mechanism by which they can be configured to use a user’s preferred unit. - TemperatureUnit + + TemperatureUnit + + diff --git a/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml new file mode 100644 index 00000000000000..d4207d6f116e2f --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Valve Configuration and Control + HVAC + 0x0081 + VALVE_CONFIGURATION_AND_CONTROL_CLUSTER + true + true + This cluster is used to configure a valve. + + + + + + OpenDuration + + + + AutoCloseTime + RemainingDuration + CurrentState + TargetState + + StartUpState + + + + CurrentLevel + TargetLevel + + OpenLevel + + + + ValveFault + + + This command is used to set the valve to its fully open position. + + + + + This command is used to set the valve to its fully closed position. + + + + This command is used to set the valve to a specific level. + + + + + + This event SHALL be generated when the valve changes state, either opens or closes. + + + + + This event SHALL be generated when the valve registers a fault. + + + + diff --git a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml index af51f6a53aba27..ce3f7494c76d2d 100644 --- a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml @@ -30,18 +30,6 @@ limitations under the License. - - - - - - - - - - - - Barrier Control Closures diff --git a/src/app/zap-templates/zcl/data-model/draft/types/color-control.xml b/src/app/zap-templates/zcl/data-model/draft/types/color-control.xml deleted file mode 100644 index 9e3523063eb7c3..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/color-control.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/manufacturers.xml b/src/app/zap-templates/zcl/data-model/manufacturers.xml index 35314522c26d39..2efcb5f74ddb4c 100644 --- a/src/app/zap-templates/zcl/data-model/manufacturers.xml +++ b/src/app/zap-templates/zcl/data-model/manufacturers.xml @@ -177,7 +177,6 @@ Note: - 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 ea2d302d5c167d..87d0686dec2967 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -24,6 +24,7 @@ "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", + "boolean-sensor-configuration-cluster.xml", "boolean-state-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", @@ -73,6 +74,7 @@ "operational-credentials-cluster.xml", "operational-state-cluster.xml", "operational-state-rvc-cluster.xml", + "oven-mode-cluster.xml", "pressure-measurement-cluster.xml", "power-source-cluster.xml", "power-source-configuration-cluster.xml", @@ -104,13 +106,13 @@ "timer-cluster.xml", "user-label-cluster.xml", "unit-localization-cluster.xml", + "valve-configuration-and-control-cluster.xml", "wake-on-lan-cluster.xml", "washer-controls-cluster.xml", "wifi-network-diagnostics-cluster.xml", "window-covering.xml", "matter-devices.xml", "sample-mei-cluster.xml", - "types/color-control.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", "types/thermostat-user-interface-configuration.xml" @@ -162,7 +164,9 @@ "SerialNumber", "UniqueID", "CapabilityMinima", - "ProductAppearance" + "ProductAppearance", + "SpecificationVersion", + "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], "Descriptor": ["ClusterRevision"], @@ -221,7 +225,6 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": ["SceneCount", "RemainingCapacity"], "Unit Testing": [ "struct_attr", "nullable_struct", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 004bc03c9c8692..5a672e41398fee 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -23,6 +23,7 @@ "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", + "boolean-sensor-configuration-cluster.xml", "boolean-state-cluster.xml", "actions-cluster.xml", "bridged-device-basic-information.xml", @@ -70,6 +71,7 @@ "operational-credentials-cluster.xml", "operational-state-cluster.xml", "operational-state-rvc-cluster.xml", + "oven-mode-cluster.xml", "pressure-measurement-cluster.xml", "power-source-cluster.xml", "power-source-configuration-cluster.xml", @@ -102,13 +104,13 @@ "timer-cluster.xml", "user-label-cluster.xml", "unit-localization-cluster.xml", + "valve-configuration-and-control-cluster.xml", "wake-on-lan-cluster.xml", "washer-controls-cluster.xml", "wifi-network-diagnostics-cluster.xml", "window-covering.xml", "matter-devices.xml", "sample-mei-cluster.xml", - "types/color-control.xml", "types/door-lock.xml", "types/occupancy-sensing.xml", "types/thermostat-user-interface-configuration.xml" @@ -160,7 +162,9 @@ "SerialNumber", "UniqueID", "CapabilityMinima", - "ProductAppearance" + "ProductAppearance", + "SpecificationVersion", + "MaxPathsPerInvoke" ], "Bridged Device Basic Information": ["ProductAppearance"], "Descriptor": ["ClusterRevision"], @@ -219,7 +223,6 @@ "FeatureMap", "ThreadMetrics" ], - "Scenes": ["SceneCount", "RemainingCapacity"], "Unit Testing": [ "struct_attr", "nullable_struct", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 694996b2339a7c..0a30412aaca164 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -15,6 +15,7 @@ "BASIC_INFORMATION_CLUSTER": [], "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": [], + "BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [], "BOOLEAN_STATE_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [], "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], @@ -68,6 +69,7 @@ "OTA_BOOTLOAD_CLUSTER": [], "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": [], "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": [], + "OVEN_MODE_CLUSTER": [], "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "PM10_CONCENTRATION_MEASUREMENT_CLUSTER": [], "PM1_CONCENTRATION_MEASUREMENT_CLUSTER": [], @@ -110,6 +112,7 @@ "UNIT_TESTING_CLUSTER": [], "USER_LABEL_CLUSTER": [], "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [], + "VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [], "WAKE_ON_LAN_CLUSTER": [], "LAUNDRY_WASHER_CONTROLS_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], @@ -136,6 +139,7 @@ "BASIC_INFORMATION_CLUSTER": ["basic-information"], "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": ["bindings"], + "BOOLEAN_SENSOR_CONFIGURATION_CLUSTER": [], "BOOLEAN_STATE_CLUSTER": [], "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER": [ "bridged-device-basic-information-server" @@ -202,6 +206,7 @@ "OTA_BOOTLOAD_CLUSTER": [], "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER": ["ota-provider"], "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER": ["ota-requestor"], + "OVEN_MODE_CLUSTER": ["mode-base-server"], "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER": [ "concentration-measurement-server" ], @@ -263,6 +268,7 @@ "UNIT_LOCALIZATION_CLUSTER": [], "UNIT_TESTING_CLUSTER": ["test-cluster-server"], "USER_LABEL_CLUSTER": ["user-label-server"], + "VALVE_CONFIGURATION_AND_CONTROL_CLUSTER": [], "WAKE_ON_LAN_CLUSTER": ["wake-on-lan-server"], "LAUNDRY_WASHER_CONTROLS_CLUSTER": ["laundry-washer-controls-server"], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"], diff --git a/src/ble/BUILD.gn b/src/ble/BUILD.gn index 34450c03c4a8ee..a9f2f07419f77f 100644 --- a/src/ble/BUILD.gn +++ b/src/ble/BUILD.gn @@ -42,6 +42,8 @@ buildconfig_header("ble_buildconfig") { defines += [ "BLE_PLATFORM_CONFIG_INCLUDE=${chip_ble_platform_config_include}" ] } + + visibility = [ ":ble_config_header" ] } source_set("ble_config_header") { @@ -49,10 +51,11 @@ source_set("ble_config_header") { public_configs = [ "${chip_root}/src:includes" ] - public_deps = [ + public_deps = [ "${chip_root}/src/system:system_config_header" ] + + deps = [ ":ble_buildconfig", "${chip_root}/src/platform:platform_buildconfig", - "${chip_root}/src/system:system_config_header", ] } @@ -65,7 +68,6 @@ if (chip_config_network_layer_ble) { "BLEEndPoint.h", "Ble.h", "BleApplicationDelegate.h", - "BleConfig.h", "BleConnectionDelegate.h", "BleError.cpp", "BleError.h", diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index fd355e6f0d473c..f442190c0fc200 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -27,7 +27,7 @@ #pragma once #include "app/ConcreteCommandPath.h" -#include +#include #include #include #include diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 135812979d16aa..29c6cabb72184e 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -35,7 +35,6 @@ // module header, comes first #include -#include #include #include @@ -74,8 +73,6 @@ #include #endif -#include - #include #include #include diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 9d6a9d6f5a897c..2919096977f1ac 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -28,7 +28,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/controller/CommissioningWindowOpener.cpp b/src/controller/CommissioningWindowOpener.cpp index cfe0fe6bc03864..7cc4fbe0de5adf 100644 --- a/src/controller/CommissioningWindowOpener.cpp +++ b/src/controller/CommissioningWindowOpener.cpp @@ -126,7 +126,7 @@ CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindow(NodeId deviceId, S CHIP_ERROR CommissioningWindowOpener::OpenCommissioningWindowInternal(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { - ChipLogProgress(Controller, "OpenCommissioningWindow for device ID %" PRIu64, mNodeId); + ChipLogProgress(Controller, "OpenCommissioningWindow for device ID 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); constexpr EndpointId kAdministratorCommissioningClusterEndpoint = 0; diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index f6254f3df4cee4..8eae6613ddf10e 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/controller/TypedReadCallback.h b/src/controller/TypedReadCallback.h index 7823ad312123b1..000b5d51d522ce 100644 --- a/src/controller/TypedReadCallback.h +++ b/src/controller/TypedReadCallback.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index e4836a893e87f0..9c66a57da336c5 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -184,6 +184,8 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/OtaSoftwareUpdateProviderClient-ReadImpl.cpp", "jni/OtaSoftwareUpdateRequestorClient-InvokeSubscribeImpl.cpp", "jni/OtaSoftwareUpdateRequestorClient-ReadImpl.cpp", + "jni/OvenModeClient-InvokeSubscribeImpl.cpp", + "jni/OvenModeClient-ReadImpl.cpp", "jni/OzoneConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", "jni/OzoneConcentrationMeasurementClient-ReadImpl.cpp", "jni/Pm10ConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", @@ -270,7 +272,7 @@ if (current_os == "android" || matter_enable_java_compilation) { deps = [ ":data_model", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", ] public_configs = [ ":java-build-config" ] diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index f56573cb7cd833..db93c236c1b094 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -151,14 +151,23 @@ provisional client cluster Scenes = 5 { AttributeValuePair attributeValueList[] = 1; } - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute group_id currentGroup = 2; - readonly attribute boolean sceneValid = 3; + fabric_scoped struct SceneInfoStruct { + int8u sceneCount = 0; + fabric_sensitive int8u currentScene = 1; + fabric_sensitive group_id currentGroup = 2; + fabric_sensitive boolean sceneValid = 3; + int8u remainingCapacity = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute optional int8u sceneCount = 0; + readonly attribute optional int8u currentScene = 1; + readonly attribute optional group_id currentGroup = 2; + readonly attribute optional boolean sceneValid = 3; readonly attribute NameSupportBitmap nameSupport = 4; readonly attribute optional nullable node_id lastConfiguredBy = 5; readonly attribute int16u sceneTableSize = 6; - readonly attribute int8u remainingCapacity = 7; + readonly attribute SceneInfoStruct fabricSceneInfo[] = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -921,6 +930,8 @@ client cluster BasicInformation = 40 { readonly attribute optional 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; @@ -1151,7 +1162,7 @@ client cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - attribute optional TempUnitEnum temperatureUnit = 0; + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1468,12 +1479,12 @@ client cluster GeneralCommissioning = 48 { response struct ArmFailSafeResponse = 1 { CommissioningErrorEnum errorCode = 0; - char_string debugText = 1; + char_string<128> debugText = 1; } request struct SetRegulatoryConfigRequest { RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - char_string countryCode = 1; + char_string<2> countryCode = 1; int64u breadcrumb = 2; } @@ -2816,12 +2827,16 @@ client cluster IcdManagement = 70 { optional octet_string<16> verificationKey = 1; } + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + /** Register a client to the end device */ fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; /** Unregister a client from an end device */ fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ - command access(invoke: manage) StayActiveRequest(): DefaultSuccess = 3; + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; } /** This cluster supports creating a simple timer functionality. */ @@ -2869,6 +2884,60 @@ provisional client cluster Timer = 71 { command ReduceTime(ReduceTimeRequest): DefaultSuccess = 3; } +/** Attributes and commands for selecting a mode from a list of supported options. */ +provisional client cluster OvenMode = 73 { + enum ModeTag : enum16 { + kBake = 16384; + kConvection = 16385; + kGrill = 16386; + kRoast = 16387; + kClean = 16388; + kConvectionBake = 16389; + kConvectionRoast = 16390; + kWarming = 16391; + kProofing = 16392; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + /** Attributes and commands for selecting a mode from a list of supported options. */ client cluster ModeSelect = 80 { bitmap Feature : bitmap32 { @@ -3715,8 +3784,115 @@ client cluster ActivatedCarbonFilterMonitoring = 114 { command ResetCondition(): DefaultSuccess = 0; } +/** This cluster is used to configure a boolean sensor. */ +provisional client cluster BooleanSensorConfiguration = 128 { + enum SensitivityEnum : enum8 { + kHigh = 0; + kStandard = 1; + kLow = 2; + } + + bitmap AlarmModeBitmap : bitmap8 { + kVisual = 0x1; + kAudible = 0x2; + } + + bitmap Feature : bitmap32 { + kVisual = 0x1; + kAudible = 0x2; + kAlarmSuppress = 0x4; + kSensitivityLevel = 0x8; + } + + info event AlarmsStateChanged = 0 { + AlarmModeBitmap alarmsActive = 0; + optional AlarmModeBitmap alarmsSuppressed = 1; + } + + info event SensorFault = 1 { + } + + attribute optional SensitivityEnum sensitivityLevel = 0; + readonly attribute optional AlarmModeBitmap alarmsActive = 1; + readonly attribute optional AlarmModeBitmap alarmsSuppressed = 2; + attribute optional AlarmModeBitmap alarmsEnabled = 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 SuppressRequestRequest { + AlarmModeBitmap alarmsToSuppress = 0; + } + + /** This command is used to suppress the specified alarm. */ + command SuppressRequest(SuppressRequestRequest): DefaultSuccess = 0; +} + +/** This cluster is used to configure a valve. */ +provisional client cluster ValveConfigurationAndControl = 129 { + enum ValveStateEnum : enum8 { + kOpen = 0; + kClosed = 1; + } + + bitmap Feature : bitmap32 { + kTimeSync = 0x1; + kLevel = 0x2; + } + + bitmap ValveFaultBitmap : bitmap16 { + kGeneralFault = 0x1; + kBlocked = 0x2; + kLeaking = 0x4; + } + + info event ValveStateChanged = 0 { + ValveStateEnum valveState = 0; + } + + info event ValveFault = 1 { + ValveFaultBitmap valveFault = 0; + } + + attribute access(write: manage) nullable elapsed_s openDuration = 0; + readonly attribute optional nullable epoch_us autoCloseTime = 1; + readonly attribute optional nullable elapsed_s remainingDuration = 2; + readonly attribute nullable ValveStateEnum currentState = 3; + readonly attribute nullable ValveStateEnum targetState = 4; + attribute access(write: manage) optional ValveStateEnum startUpState = 5; + readonly attribute optional nullable percent currentLevel = 6; + readonly attribute optional nullable percent targetLevel = 7; + attribute access(write: manage) optional nullable percent openLevel = 8; + readonly attribute optional ValveFaultBitmap valveFault = 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 OpenRequest { + optional elapsed_s openDuration = 0; + } + + request struct SetLevelRequest { + percent level = 0; + optional elapsed_s openDuration = 1; + } + + /** This command is used to set the valve to its fully open position. */ + command Open(OpenRequest): DefaultSuccess = 0; + /** This command is used to set the valve to its fully closed position. */ + command Close(): DefaultSuccess = 1; + /** This command is used to set the valve to a specific level. */ + command SetLevel(SetLevelRequest): DefaultSuccess = 2; +} + /** This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. */ -client cluster DemandResponseLoadControl = 150 { +provisional client cluster DemandResponseLoadControl = 150 { enum CriticalityLevelEnum : enum8 { kUnknown = 0; kGreen = 1; @@ -3757,12 +3933,6 @@ client cluster DemandResponseLoadControl = 150 { kFailed = 12; } - enum PowerSavingsEnum : enum8 { - kLow = 0; - kMedium = 1; - kHigh = 2; - } - bitmap CancelControlBitmap : bitmap16 { kRandomEnd = 0x1; } @@ -3811,7 +3981,7 @@ client cluster DemandResponseLoadControl = 150 { } struct PowerSavingsControlStruct { - PowerSavingsEnum powerSavings = 0; + percent powerSavings = 0; } struct DutyCycleControlStruct { @@ -3871,15 +4041,14 @@ client cluster DemandResponseLoadControl = 150 { optional nullable HeatingSourceControlStruct heatingSourceControl = 9; } - readonly attribute DeviceClassBitmap deviceClass = 0; - readonly attribute LoadControlProgramStruct loadControlPrograms[] = 1; - readonly attribute int8u numberOfLoadControlPrograms = 2; - readonly attribute LoadControlEventStruct events[] = 3; - readonly attribute LoadControlEventStruct activeEvents[] = 4; - readonly attribute int8u numberOfEventsPerProgram = 5; - readonly attribute int8u numberOfTransistions = 6; - attribute access(write: manage) int8u defaultRandomStart = 7; - attribute access(write: manage) int8u defaultRandomDuration = 8; + readonly attribute LoadControlProgramStruct loadControlPrograms[] = 0; + readonly attribute int8u numberOfLoadControlPrograms = 1; + readonly attribute LoadControlEventStruct events[] = 2; + readonly attribute LoadControlEventStruct activeEvents[] = 3; + readonly attribute int8u numberOfEventsPerProgram = 4; + readonly attribute int8u numberOfTransitions = 5; + attribute access(write: manage) int8u defaultRandomStart = 6; + attribute access(write: manage) int8u defaultRandomDuration = 7; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6413,7 +6582,7 @@ client cluster LowPower = 1288 { /** This cluster provides an interface for controlling a device like a TV using action commands such as UP, DOWN, and SELECT. */ client cluster KeypadInput = 1289 { - enum CecKeyCode : enum8 { + enum CECKeyCodeEnum : enum8 { kSelect = 0; kUp = 1; kDown = 2; @@ -6522,7 +6691,7 @@ client cluster KeypadInput = 1289 { readonly attribute int16u clusterRevision = 65533; request struct SendKeyRequest { - CecKeyCode keyCode = 0; + CECKeyCodeEnum keyCode = 0; } response struct SendKeyResponse = 1 { diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 6ac8dcb8b8e81e..d9ab05d301a4d3 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -1946,6 +1946,14 @@ "source": "client", "isIncoming": 0, "isEnabled": 1 + }, + { + "name": "StayActiveResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -2044,6 +2052,67 @@ } ] }, + { + "name": "Oven Mode", + "code": 73, + "mfgCode": null, + "define": "OVEN_MODE_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Mode Select", "code": 80, diff --git a/src/controller/java/DeviceAttestationDelegateBridge.h b/src/controller/java/DeviceAttestationDelegateBridge.h index 258a53528eb4e3..214c5d78ec95ae 100644 --- a/src/controller/java/DeviceAttestationDelegateBridge.h +++ b/src/controller/java/DeviceAttestationDelegateBridge.h @@ -17,7 +17,7 @@ #include #include -#include +#include #include diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 8d50cbbd76758f..d6b5bf59646c13 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -1012,7 +1012,7 @@ public static class ScenesCluster extends BaseChipCluster { private static final long NAME_SUPPORT_ATTRIBUTE_ID = 4L; private static final long LAST_CONFIGURED_BY_ATTRIBUTE_ID = 5L; private static final long SCENE_TABLE_SIZE_ATTRIBUTE_ID = 6L; - private static final long REMAINING_CAPACITY_ATTRIBUTE_ID = 7L; + private static final long FABRIC_SCENE_INFO_ATTRIBUTE_ID = 7L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -1600,6 +1600,10 @@ public interface LastConfiguredByAttributeCallback extends BaseAttributeCallback void onSuccess(@Nullable Long value); } + public interface FabricSceneInfoAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -1791,29 +1795,34 @@ public void onSuccess(byte[] tlv) { }, SCENE_TABLE_SIZE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readRemainingCapacityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_CAPACITY_ATTRIBUTE_ID); + public void readFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback) { + readFabricSceneInfoAttributeWithFabricFilter(callback, true); + } + + public void readFabricSceneInfoAttributeWithFabricFilter( + FabricSceneInfoAttributeCallback callback, boolean isFabricFiltered) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REMAINING_CAPACITY_ATTRIBUTE_ID, true); + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, isFabricFiltered); } - public void subscribeRemainingCapacityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_CAPACITY_ATTRIBUTE_ID); + public void subscribeFabricSceneInfoAttribute( + FabricSceneInfoAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FABRIC_SCENE_INFO_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REMAINING_CAPACITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, FABRIC_SCENE_INFO_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -5773,6 +5782,8 @@ public static class BasicInformationCluster extends BaseChipCluster { private static final long UNIQUE_I_D_ATTRIBUTE_ID = 18L; private static final long CAPABILITY_MINIMA_ATTRIBUTE_ID = 19L; private static final long PRODUCT_APPEARANCE_ATTRIBUTE_ID = 20L; + private static final long SPECIFICATION_VERSION_ATTRIBUTE_ID = 21L; + private static final long MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID = 22L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -6382,6 +6393,56 @@ public void onSuccess(byte[] tlv) { }, PRODUCT_APPEARANCE_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readSpecificationVersionAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, true); + } + + public void subscribeSpecificationVersionAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPECIFICATION_VERSION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SPECIFICATION_VERSION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMaxPathsPerInvokeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, true); + } + + public void subscribeMaxPathsPerInvokeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_PATHS_PER_INVOKE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -19033,11 +19094,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void stayActiveRequest(DefaultClusterCallback callback) { + public void stayActiveRequest(StayActiveResponseCallback callback) { stayActiveRequest(callback, 0); } - public void stayActiveRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void stayActiveRequest(StayActiveResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 3L; ArrayList elements = new ArrayList<>(); @@ -19045,7 +19106,17 @@ public void stayActiveRequest(DefaultClusterCallback callback, int timedInvokeTi invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long promisedActiveDurationFieldID = 0L; + Long promisedActiveDuration = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == promisedActiveDurationFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + promisedActiveDuration = castingValue.value(Long.class); + } + } + } + callback.onSuccess(promisedActiveDuration); }}, commandId, value, timedInvokeTimeoutMs); } @@ -19053,6 +19124,10 @@ public interface RegisterClientResponseCallback extends BaseClusterCallback { void onSuccess(Long ICDCounter); } + public interface StayActiveResponseCallback extends BaseClusterCallback { + void onSuccess(Long promisedActiveDuration); + } + public interface RegisteredClientsAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -19770,15 +19845,13 @@ public void onSuccess(byte[] tlv) { } } - public static class ModeSelectCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 80L; + public static class OvenModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 73L; - private static final long DESCRIPTION_ATTRIBUTE_ID = 0L; - private static final long STANDARD_NAMESPACE_ATTRIBUTE_ID = 1L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 2L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 3L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 4L; - private static final long ON_MODE_ATTRIBUTE_ID = 5L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -19786,7 +19859,7 @@ public static class ModeSelectCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ModeSelectCluster(long devicePtr, int endpointId) { + public OvenModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -19796,11 +19869,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(DefaultClusterCallback callback, Integer newMode) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { changeToMode(callback, newMode, 0); } - public void changeToMode(DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -19812,16 +19885,33 @@ public void changeToMode(DefaultClusterCallback callback, Integer newMode, int t invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, value, timedInvokeTimeoutMs); } - public interface StandardNamespaceAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface StartUpModeAttributeCallback extends BaseAttributeCallback { @@ -19848,56 +19938,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readDescriptionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DESCRIPTION_ATTRIBUTE_ID, true); - } - - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, STANDARD_NAMESPACE_ATTRIBUTE_ID, true); - } - - public void subscribeStandardNamespaceAttribute( - StandardNamespaceAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, STANDARD_NAMESPACE_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readSupportedModesAttribute( SupportedModesAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); @@ -19905,7 +19945,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -19918,7 +19958,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -20167,13 +20207,15 @@ public void onSuccess(byte[] tlv) { } } - public static class LaundryWasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 81L; + public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 80L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long DESCRIPTION_ATTRIBUTE_ID = 0L; + private static final long STANDARD_NAMESPACE_ATTRIBUTE_ID = 1L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 2L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 3L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 4L; + private static final long ON_MODE_ATTRIBUTE_ID = 5L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -20181,7 +20223,7 @@ public static class LaundryWasherModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LaundryWasherModeCluster(long devicePtr, int endpointId) { + public ModeSelectCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -20191,11 +20233,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + public void changeToMode(DefaultClusterCallback callback, Integer newMode) { changeToMode(callback, newMode, 0); } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + public void changeToMode(DefaultClusterCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -20207,33 +20249,16 @@ public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); + callback.onSuccess(); }}, commandId, value, timedInvokeTimeoutMs); } - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); + public interface StandardNamespaceAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface StartUpModeAttributeCallback extends BaseAttributeCallback { @@ -20260,6 +20285,56 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } + public void readDescriptionAttribute( + CharStringAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DESCRIPTION_ATTRIBUTE_ID, true); + } + + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STANDARD_NAMESPACE_ATTRIBUTE_ID, true); + } + + public void subscribeStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STANDARD_NAMESPACE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STANDARD_NAMESPACE_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readSupportedModesAttribute( SupportedModesAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); @@ -20267,7 +20342,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -20280,7 +20355,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -20529,8 +20604,8 @@ public void onSuccess(byte[] tlv) { } } - public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 82L; + public static class LaundryWasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 81L; private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; @@ -20543,7 +20618,7 @@ public static class RefrigeratorAndTemperatureControlledCabinetModeCluster exten private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { + public LaundryWasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -20595,7 +20670,7 @@ public interface ChangeToModeResponseCallback extends BaseClusterCallback { } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface StartUpModeAttributeCallback extends BaseAttributeCallback { @@ -20629,7 +20704,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -20642,7 +20717,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -20891,13 +20966,13 @@ public void onSuccess(byte[] tlv) { } } - public static class LaundryWasherControlsCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 83L; + public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 82L; - private static final long SPIN_SPEEDS_ATTRIBUTE_ID = 0L; - private static final long SPIN_SPEED_CURRENT_ATTRIBUTE_ID = 1L; - private static final long NUMBER_OF_RINSES_ATTRIBUTE_ID = 2L; - private static final long SUPPORTED_RINSES_ATTRIBUTE_ID = 3L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -20905,7 +20980,7 @@ public static class LaundryWasherControlsCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public LaundryWasherControlsCluster(long devicePtr, int endpointId) { + public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -20915,16 +20990,57 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface SpinSpeedsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); } - public interface SpinSpeedCurrentAttributeCallback extends BaseAttributeCallback { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface StartUpModeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Integer value); } - public interface SupportedRinsesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -20943,122 +21059,122 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SPIN_SPEEDS_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeSpinSpeedsAttribute( - SpinSpeedsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SPIN_SPEEDS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); + public void readCurrentModeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, true); - } - - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { - writeSpinSpeedCurrentAttribute(callback, value, 0); - } - - public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), SPIN_SPEED_CURRENT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeSpinSpeedCurrentAttribute( - SpinSpeedCurrentAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNumberOfRinsesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, NUMBER_OF_RINSES_ATTRIBUTE_ID, true); + }, START_UP_MODE_ATTRIBUTE_ID, true); } - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { - writeNumberOfRinsesAttribute(callback, value, 0); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(callback, value, 0); } - public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), NUMBER_OF_RINSES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeNumberOfRinsesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, NUMBER_OF_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_RINSES_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeSupportedRinsesAttribute( - SupportedRinsesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -21212,12 +21328,13 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcRunModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 84L; + public static class LaundryWasherControlsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 83L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long SPIN_SPEEDS_ATTRIBUTE_ID = 0L; + private static final long SPIN_SPEED_CURRENT_ATTRIBUTE_ID = 1L; + private static final long NUMBER_OF_RINSES_ATTRIBUTE_ID = 2L; + private static final long SUPPORTED_RINSES_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -21225,7 +21342,7 @@ public static class RvcRunModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcRunModeCluster(long devicePtr, int endpointId) { + public LaundryWasherControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21235,53 +21352,16 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { - changeToMode(callback, newMode, 0); - } - - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long newModeFieldID = 0L; - BaseTLVType newModetlvValue = new UIntType(newMode); - elements.add(new StructElement(newModeFieldID, newModetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); + public interface SpinSpeedsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SpinSpeedCurrentAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedRinsesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -21300,88 +21380,122 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void readSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); + }, SPIN_SPEEDS_ATTRIBUTE_ID, true); } - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); + public void subscribeSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEEDS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPIN_SPEEDS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentModeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void readSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { + writeSpinSpeedCurrentAttribute(callback, value, 0); + } + + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), SPIN_SPEED_CURRENT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SPIN_SPEED_CURRENT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SPIN_SPEED_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void readNumberOfRinsesAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_MODE_ATTRIBUTE_ID, true); + }, NUMBER_OF_RINSES_ATTRIBUTE_ID, true); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { + writeNumberOfRinsesAttribute(callback, value, 0); } - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), NUMBER_OF_RINSES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void subscribeNumberOfRinsesAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_RINSES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, NUMBER_OF_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_RINSES_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_RINSES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_RINSES_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -21535,8 +21649,8 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcCleanModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 85L; + public static class RvcRunModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 84L; private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; @@ -21548,7 +21662,7 @@ public static class RvcCleanModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcCleanModeCluster(long devicePtr, int endpointId) { + public RvcRunModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21600,7 +21714,7 @@ public interface ChangeToModeResponseCallback extends BaseClusterCallback { } public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + void onSuccess(List value); } public interface OnModeAttributeCallback extends BaseAttributeCallback { @@ -21630,7 +21744,7 @@ public void readSupportedModesAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, SUPPORTED_MODES_ATTRIBUTE_ID, true); @@ -21643,7 +21757,7 @@ public void subscribeSupportedModesAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -21858,15 +21972,12 @@ public void onSuccess(byte[] tlv) { } } - public static class TemperatureControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 86L; + public static class RvcCleanModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 85L; - private static final long TEMPERATURE_SETPOINT_ATTRIBUTE_ID = 0L; - private static final long MIN_TEMPERATURE_ATTRIBUTE_ID = 1L; - private static final long MAX_TEMPERATURE_ATTRIBUTE_ID = 2L; - private static final long STEP_ATTRIBUTE_ID = 3L; - private static final long SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID = 4L; - private static final long SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID = 5L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -21874,7 +21985,7 @@ public static class TemperatureControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public TemperatureControlCluster(long devicePtr, int endpointId) { + public RvcCleanModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -21884,32 +21995,53 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel) { - setTemperature(callback, targetTemperature, targetTemperatureLevel, 0); + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); } - public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel, int timedInvokeTimeoutMs) { + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long targetTemperatureFieldID = 0L; - BaseTLVType targetTemperaturetlvValue = targetTemperature.map((nonOptionaltargetTemperature) -> new IntType(nonOptionaltargetTemperature)).orElse(new EmptyType()); - elements.add(new StructElement(targetTemperatureFieldID, targetTemperaturetlvValue)); - - final long targetTemperatureLevelFieldID = 1L; - BaseTLVType targetTemperatureLeveltlvValue = targetTemperatureLevel.map((nonOptionaltargetTemperatureLevel) -> new UIntType(nonOptionaltargetTemperatureLevel)).orElse(new EmptyType()); - elements.add(new StructElement(targetTemperatureLevelFieldID, targetTemperatureLeveltlvValue)); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, value, timedInvokeTimeoutMs); } - public interface SupportedTemperatureLevelsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -21928,34 +22060,34 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readTemperatureSetpointAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeTemperatureSetpointAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinTemperatureAttribute( + public void readCurrentModeAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -21963,157 +22095,91 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MIN_TEMPERATURE_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeMinTemperatureAttribute( + public void subscribeCurrentModeAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MIN_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxTemperatureAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MAX_TEMPERATURE_ATTRIBUTE_ID, true); + }, ON_MODE_ATTRIBUTE_ID, true); } - public void subscribeMaxTemperatureAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MAX_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStepAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STEP_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeStepAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STEP_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, true); - } - - public void subscribeSelectedTemperatureLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedTemperatureLevelsAttribute( - SupportedTemperatureLevelsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); - } - - public void subscribeGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcceptedCommandListAttribute( - AcceptedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } public void subscribeAcceptedCommandListAttribute( @@ -22229,12 +22295,15 @@ public void onSuccess(byte[] tlv) { } } - public static class RefrigeratorAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 87L; + public static class TemperatureControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 86L; - private static final long MASK_ATTRIBUTE_ID = 0L; - private static final long STATE_ATTRIBUTE_ID = 2L; - private static final long SUPPORTED_ATTRIBUTE_ID = 3L; + private static final long TEMPERATURE_SETPOINT_ATTRIBUTE_ID = 0L; + private static final long MIN_TEMPERATURE_ATTRIBUTE_ID = 1L; + private static final long MAX_TEMPERATURE_ATTRIBUTE_ID = 2L; + private static final long STEP_ATTRIBUTE_ID = 3L; + private static final long SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID = 4L; + private static final long SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID = 5L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -22242,7 +22311,7 @@ public static class RefrigeratorAlarmCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { + public TemperatureControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22252,6 +22321,34 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel) { + setTemperature(callback, targetTemperature, targetTemperatureLevel, 0); + } + + public void setTemperature(DefaultClusterCallback callback, Optional targetTemperature, Optional targetTemperatureLevel, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long targetTemperatureFieldID = 0L; + BaseTLVType targetTemperaturetlvValue = targetTemperature.map((nonOptionaltargetTemperature) -> new IntType(nonOptionaltargetTemperature)).orElse(new EmptyType()); + elements.add(new StructElement(targetTemperatureFieldID, targetTemperaturetlvValue)); + + final long targetTemperatureLevelFieldID = 1L; + BaseTLVType targetTemperatureLeveltlvValue = targetTemperatureLevel.map((nonOptionaltargetTemperatureLevel) -> new UIntType(nonOptionaltargetTemperatureLevel)).orElse(new EmptyType()); + elements.add(new StructElement(targetTemperatureLevelFieldID, targetTemperatureLeveltlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface SupportedTemperatureLevelsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22268,79 +22365,154 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readMaskAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void readTemperatureSetpointAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, MASK_ATTRIBUTE_ID, true); + }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, true); } - public void subscribeMaskAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); + public void subscribeTemperatureSetpointAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); + }, TEMPERATURE_SETPOINT_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStateAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void readMinTemperatureAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, STATE_ATTRIBUTE_ID, true); + }, MIN_TEMPERATURE_ATTRIBUTE_ID, true); } - public void subscribeStateAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); + public void subscribeMinTemperatureAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_TEMPERATURE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MIN_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSupportedAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void readMaxTemperatureAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_ATTRIBUTE_ID, true); + }, MAX_TEMPERATURE_ATTRIBUTE_ID, true); } - public void subscribeSupportedAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); + public void subscribeMaxTemperatureAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_TEMPERATURE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, MAX_TEMPERATURE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStepAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, STEP_ATTRIBUTE_ID, true); + } + + public void subscribeStepAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STEP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, STEP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, true); + } + + public void subscribeSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SELECTED_TEMPERATURE_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_TEMPERATURE_LEVELS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -22494,13 +22666,12 @@ public void onSuccess(byte[] tlv) { } } - public static class DishwasherModeCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 89L; + public static class RefrigeratorAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 87L; - private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; - private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; - private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; - private static final long ON_MODE_ATTRIBUTE_ID = 3L; + private static final long MASK_ATTRIBUTE_ID = 0L; + private static final long STATE_ATTRIBUTE_ID = 2L; + private static final long SUPPORTED_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -22508,7 +22679,7 @@ public static class DishwasherModeCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public DishwasherModeCluster(long devicePtr, int endpointId) { + public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22518,59 +22689,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { - changeToMode(callback, newMode, 0); - } - - public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long newModeFieldID = 0L; - BaseTLVType newModetlvValue = new UIntType(newMode); - elements.add(new StructElement(newModeFieldID, newModetlvValue)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - Optional statusText = Optional.empty(); - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = Optional.of(castingValue.value(String.class)); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public interface ChangeToModeResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, Optional statusText); - } - - public interface SupportedModesAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface StartUpModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - - public interface OnModeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22587,122 +22705,79 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedModesAttribute( - SupportedModesAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_MODES_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedModesAttribute( - SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentModeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void readMaskAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_MODE_ATTRIBUTE_ID, true); + }, MASK_ATTRIBUTE_ID, true); } - public void subscribeCurrentModeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + public void subscribeMaskAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MASK_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, MASK_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readStartUpModeAttribute( - StartUpModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + public void readStateAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, START_UP_MODE_ATTRIBUTE_ID, true); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { - writeStartUpModeAttribute(callback, value, 0); - } - - public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, STATE_ATTRIBUTE_ID, true); } - public void subscribeStartUpModeAttribute( - StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + public void subscribeStateAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOnModeAttribute( - OnModeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void readSupportedAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, ON_MODE_ATTRIBUTE_ID, true); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { - writeOnModeAttribute(callback, value, 0); - } - - public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, SUPPORTED_ATTRIBUTE_ID, true); } - public void subscribeOnModeAttribute( - OnModeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + public void subscribeSupportedAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -22856,10 +22931,13 @@ public void onSuccess(byte[] tlv) { } } - public static class AirQualityCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 91L; + public static class DishwasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 89L; - private static final long AIR_QUALITY_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_MODES_ATTRIBUTE_ID = 0L; + private static final long CURRENT_MODE_ATTRIBUTE_ID = 1L; + private static final long START_UP_MODE_ATTRIBUTE_ID = 2L; + private static final long ON_MODE_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -22867,7 +22945,7 @@ public static class AirQualityCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public AirQualityCluster(long devicePtr, int endpointId) { + public DishwasherModeCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -22877,6 +22955,59 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode) { + changeToMode(callback, newMode, 0); + } + + public void changeToMode(ChangeToModeResponseCallback callback, Integer newMode, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + final long newModeFieldID = 0L; + BaseTLVType newModetlvValue = new UIntType(newMode); + elements.add(new StructElement(newModeFieldID, newModetlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + Optional statusText = Optional.empty(); + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = Optional.of(castingValue.value(String.class)); + } + } + } + callback.onSuccess(status, statusText); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface ChangeToModeResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Optional statusText); + } + + public interface SupportedModesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface StartUpModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OnModeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -22893,45 +23024,138 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readAirQualityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, AIR_QUALITY_ATTRIBUTE_ID, true); + }, SUPPORTED_MODES_ATTRIBUTE_ID, true); } - public void subscribeAirQualityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MODES_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, AIR_QUALITY_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MODES_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readGeneratedCommandListAttribute( - GeneratedCommandListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + public void readCurrentModeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + }, CURRENT_MODE_ATTRIBUTE_ID, true); } - public void subscribeGeneratedCommandListAttribute( + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_MODE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, START_UP_MODE_ATTRIBUTE_ID, true); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(callback, value, 0); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_MODE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, START_UP_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ON_MODE_ATTRIBUTE_ID, true); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(callback, value, 0); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), ON_MODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ON_MODE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ON_MODE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); @@ -23069,22 +23293,10 @@ public void onSuccess(byte[] tlv) { } } - public static class SmokeCoAlarmCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 92L; + public static class AirQualityCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 91L; - private static final long EXPRESSED_STATE_ATTRIBUTE_ID = 0L; - private static final long SMOKE_STATE_ATTRIBUTE_ID = 1L; - private static final long C_O_STATE_ATTRIBUTE_ID = 2L; - private static final long BATTERY_ALERT_ATTRIBUTE_ID = 3L; - private static final long DEVICE_MUTED_ATTRIBUTE_ID = 4L; - private static final long TEST_IN_PROGRESS_ATTRIBUTE_ID = 5L; - private static final long HARDWARE_FAULT_ALERT_ATTRIBUTE_ID = 6L; - private static final long END_OF_SERVICE_ALERT_ATTRIBUTE_ID = 7L; - private static final long INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID = 8L; - private static final long INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID = 9L; - private static final long CONTAMINATION_STATE_ATTRIBUTE_ID = 10L; - private static final long SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 11L; - private static final long EXPIRY_DATE_ATTRIBUTE_ID = 12L; + private static final long AIR_QUALITY_ATTRIBUTE_ID = 0L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -23092,7 +23304,7 @@ public static class SmokeCoAlarmCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public SmokeCoAlarmCluster(long devicePtr, int endpointId) { + public AirQualityCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -23102,22 +23314,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void selfTestRequest(DefaultClusterCallback callback) { - selfTestRequest(callback, 0); - } - - public void selfTestRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -23134,9 +23330,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readExpressedStateAttribute( + public void readAirQualityAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -23144,163 +23340,404 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, EXPRESSED_STATE_ATTRIBUTE_ID, true); + }, AIR_QUALITY_ATTRIBUTE_ID, true); } - public void subscribeExpressedStateAttribute( + public void subscribeAirQualityAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AIR_QUALITY_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, EXPRESSED_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, AIR_QUALITY_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSmokeStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SMOKE_STATE_ATTRIBUTE_ID, true); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeSmokeStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, SMOKE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCOStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, C_O_STATE_ATTRIBUTE_ID, true); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); } - public void subscribeCOStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, C_O_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBatteryAlertAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BATTERY_ALERT_ATTRIBUTE_ID, true); + }, EVENT_LIST_ATTRIBUTE_ID, true); } - public void subscribeBatteryAlertAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, BATTERY_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDeviceMutedAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEVICE_MUTED_ATTRIBUTE_ID, true); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); } - public void subscribeDeviceMutedAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEVICE_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readTestInProgressAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, TEST_IN_PROGRESS_ATTRIBUTE_ID, true); + }, FEATURE_MAP_ATTRIBUTE_ID, true); } - public void subscribeTestInProgressAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, TEST_IN_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readHardwareFaultAlertAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, true); + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); } - public void subscribeHardwareFaultAlertAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); - + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class SmokeCoAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 92L; + + private static final long EXPRESSED_STATE_ATTRIBUTE_ID = 0L; + private static final long SMOKE_STATE_ATTRIBUTE_ID = 1L; + private static final long C_O_STATE_ATTRIBUTE_ID = 2L; + private static final long BATTERY_ALERT_ATTRIBUTE_ID = 3L; + private static final long DEVICE_MUTED_ATTRIBUTE_ID = 4L; + private static final long TEST_IN_PROGRESS_ATTRIBUTE_ID = 5L; + private static final long HARDWARE_FAULT_ALERT_ATTRIBUTE_ID = 6L; + private static final long END_OF_SERVICE_ALERT_ATTRIBUTE_ID = 7L; + private static final long INTERCONNECT_SMOKE_ALARM_ATTRIBUTE_ID = 8L; + private static final long INTERCONNECT_C_O_ALARM_ATTRIBUTE_ID = 9L; + private static final long CONTAMINATION_STATE_ATTRIBUTE_ID = 10L; + private static final long SMOKE_SENSITIVITY_LEVEL_ATTRIBUTE_ID = 11L; + private static final long EXPIRY_DATE_ATTRIBUTE_ID = 12L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public SmokeCoAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void selfTestRequest(DefaultClusterCallback callback) { + selfTestRequest(callback, 0); + } + + public void selfTestRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readExpressedStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EXPRESSED_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeExpressedStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EXPRESSED_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EXPRESSED_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSmokeStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SMOKE_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeSmokeStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SMOKE_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SMOKE_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCOStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, C_O_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeCOStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, C_O_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, C_O_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readBatteryAlertAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, BATTERY_ALERT_ATTRIBUTE_ID, true); + } + + public void subscribeBatteryAlertAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BATTERY_ALERT_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, BATTERY_ALERT_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDeviceMutedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEVICE_MUTED_ATTRIBUTE_ID, true); + } + + public void subscribeDeviceMutedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_MUTED_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEVICE_MUTED_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTestInProgressAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TEST_IN_PROGRESS_ATTRIBUTE_ID, true); + } + + public void subscribeTestInProgressAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEST_IN_PROGRESS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TEST_IN_PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readHardwareFaultAlertAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID, true); + } + + public void subscribeHardwareFaultAlertAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARDWARE_FAULT_ALERT_ATTRIBUTE_ID); + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { @@ -25171,16 +25608,759 @@ public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Integer value); } - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { + public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readPhaseListAttribute( + PhaseListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PHASE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalStateAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readOperationalErrorAttribute( + OperationalErrorAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + } + + public void subscribeOperationalErrorAttribute( + OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class HepaFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 113L; + + private static final long CONDITION_ATTRIBUTE_ID = 0L; + private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; + private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; + private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; + private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; + private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void resetCondition(DefaultClusterCallback callback) { + resetCondition(callback, 0); + } + + public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public void readConditionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CONDITION_ATTRIBUTE_ID, true); + } + + public void subscribeConditionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readDegradationDirectionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); + } + + public void subscribeDegradationDirectionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readChangeIndicationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CHANGE_INDICATION_ATTRIBUTE_ID, true); + } + + public void subscribeChangeIndicationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readInPlaceIndicatorAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); + } + + public void subscribeInPlaceIndicatorAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { + writeLastChangedTimeAttribute(callback, value, 0); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, EVENT_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeEventListAttribute( + EventListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true); + } + + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FEATURE_MAP_ATTRIBUTE_ID, true); + } + + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, true); + } + + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval); + } + } + + public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 114L; + + private static final long CONDITION_ATTRIBUTE_ID = 0L; + private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; + private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; + private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; + private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; + private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; + private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; + private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; + private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L; + private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; + private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; + + public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void resetCondition(DefaultClusterCallback callback) { + resetCondition(callback, 0); + } + + public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 0L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } - public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); + public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -25199,154 +26379,163 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readPhaseListAttribute( - PhaseListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void readConditionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, PHASE_LIST_ATTRIBUTE_ID, true); + }, CONDITION_ATTRIBUTE_ID, true); } - public void subscribePhaseListAttribute( - PhaseListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_LIST_ATTRIBUTE_ID); + public void subscribeConditionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, PHASE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void readDegradationDirectionAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_PHASE_ATTRIBUTE_ID, true); + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); } - public void subscribeCurrentPhaseAttribute( - CurrentPhaseAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PHASE_ATTRIBUTE_ID); + public void subscribeDegradationDirectionAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); + }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCountdownTimeAttribute( - CountdownTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void readChangeIndicationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); + }, CHANGE_INDICATION_ATTRIBUTE_ID, true); } - public void subscribeCountdownTimeAttribute( - CountdownTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, COUNTDOWN_TIME_ATTRIBUTE_ID); + public void subscribeChangeIndicationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateListAttribute( - OperationalStateListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void readInPlaceIndicatorAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateListAttribute( - OperationalStateListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID); + public void subscribeInPlaceIndicatorAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + public void readLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); } - public void subscribeOperationalStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { + writeLastChangedTimeAttribute(callback, value, 0); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readOperationalErrorAttribute( - OperationalErrorAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void readReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); } - public void subscribeOperationalErrorAttribute( - OperationalErrorAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_ERROR_ATTRIBUTE_ID); + public void subscribeReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); + }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25500,15 +26689,13 @@ public void onSuccess(byte[] tlv) { } } - public static class HepaFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 113L; + public static class BooleanSensorConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 128L; - private static final long CONDITION_ATTRIBUTE_ID = 0L; - private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; - private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; - private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; - private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; - private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + private static final long SENSITIVITY_LEVEL_ATTRIBUTE_ID = 0L; + private static final long ALARMS_ACTIVE_ATTRIBUTE_ID = 1L; + private static final long ALARMS_SUPPRESSED_ATTRIBUTE_ID = 2L; + private static final long ALARMS_ENABLED_ATTRIBUTE_ID = 3L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -25516,7 +26703,7 @@ public static class HepaFilterMonitoringCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { + public BooleanSensorConfigurationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25526,14 +26713,18 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void resetCondition(DefaultClusterCallback callback) { - resetCondition(callback, 0); + public void suppressRequest(DefaultClusterCallback callback, Integer alarmsToSuppress) { + suppressRequest(callback, alarmsToSuppress, 0); } - public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void suppressRequest(DefaultClusterCallback callback, Integer alarmsToSuppress, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); + final long alarmsToSuppressFieldID = 0L; + BaseTLVType alarmsToSuppresstlvValue = new UIntType(alarmsToSuppress); + elements.add(new StructElement(alarmsToSuppressFieldID, alarmsToSuppresstlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -25542,14 +26733,6 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -25566,9 +26749,9 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readConditionAttribute( + public void readSensitivityLevelAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25576,49 +26759,33 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CONDITION_ATTRIBUTE_ID, true); + }, SENSITIVITY_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSensitivityLevelAttribute(callback, value, 0); } - public void readDegradationDirectionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); + public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), SENSITIVITY_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeDegradationDirectionAttribute( + public void subscribeSensitivityLevelAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SENSITIVITY_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, SENSITIVITY_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readChangeIndicationAttribute( + public void readAlarmsActiveAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ACTIVE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25626,103 +26793,78 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, true); + }, ALARMS_ACTIVE_ATTRIBUTE_ID, true); } - public void subscribeChangeIndicationAttribute( + public void subscribeAlarmsActiveAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ACTIVE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, ALARMS_ACTIVE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInPlaceIndicatorAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void readAlarmsSuppressedAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPRESSED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); + }, ALARMS_SUPPRESSED_ATTRIBUTE_ID, true); } - public void subscribeInPlaceIndicatorAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void subscribeAlarmsSuppressedAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_SUPPRESSED_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); + }, ALARMS_SUPPRESSED_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + public void readAlarmsEnabledAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { - writeLastChangedTimeAttribute(callback, value, 0); - } - - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, ALARMS_ENABLED_ATTRIBUTE_ID, true); } - public void subscribeLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value) { + writeAlarmsEnabledAttribute(callback, value, 0); } - public void readReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); + public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), ALARMS_ENABLED_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); - + public void subscribeAlarmsEnabledAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ALARMS_ENABLED_ATTRIBUTE_ID); + subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, ALARMS_ENABLED_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25876,15 +27018,19 @@ public void onSuccess(byte[] tlv) { } } - public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 114L; - - private static final long CONDITION_ATTRIBUTE_ID = 0L; - private static final long DEGRADATION_DIRECTION_ATTRIBUTE_ID = 1L; - private static final long CHANGE_INDICATION_ATTRIBUTE_ID = 2L; - private static final long IN_PLACE_INDICATOR_ATTRIBUTE_ID = 3L; - private static final long LAST_CHANGED_TIME_ATTRIBUTE_ID = 4L; - private static final long REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID = 5L; + public static class ValveConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 129L; + + private static final long OPEN_DURATION_ATTRIBUTE_ID = 0L; + private static final long AUTO_CLOSE_TIME_ATTRIBUTE_ID = 1L; + private static final long REMAINING_DURATION_ATTRIBUTE_ID = 2L; + private static final long CURRENT_STATE_ATTRIBUTE_ID = 3L; + private static final long TARGET_STATE_ATTRIBUTE_ID = 4L; + private static final long START_UP_STATE_ATTRIBUTE_ID = 5L; + private static final long CURRENT_LEVEL_ATTRIBUTE_ID = 6L; + private static final long TARGET_LEVEL_ATTRIBUTE_ID = 7L; + private static final long OPEN_LEVEL_ATTRIBUTE_ID = 8L; + private static final long VALVE_FAULT_ATTRIBUTE_ID = 9L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -25892,7 +27038,7 @@ public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipClust private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { + public ValveConfigurationAndControlCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -25902,14 +27048,18 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void resetCondition(DefaultClusterCallback callback) { - resetCondition(callback, 0); + public void open(DefaultClusterCallback callback, Optional openDuration) { + open(callback, openDuration, 0); } - public void resetCondition(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + public void open(DefaultClusterCallback callback, Optional openDuration, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); + final long openDurationFieldID = 0L; + BaseTLVType openDurationtlvValue = openDuration.map((nonOptionalopenDuration) -> new UIntType(nonOptionalopenDuration)).orElse(new EmptyType()); + elements.add(new StructElement(openDurationFieldID, openDurationtlvValue)); + StructType value = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -25918,12 +27068,76 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public interface LastChangedTimeAttributeCallback extends BaseAttributeCallback { + public void close(DefaultClusterCallback callback) { + close(callback, 0); + } + + public void close(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 1L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setLevel(DefaultClusterCallback callback, Integer level, Optional openDuration) { + setLevel(callback, level, openDuration, 0); + } + + public void setLevel(DefaultClusterCallback callback, Integer level, Optional openDuration, int timedInvokeTimeoutMs) { + final long commandId = 2L; + + ArrayList elements = new ArrayList<>(); + final long levelFieldID = 0L; + BaseTLVType leveltlvValue = new UIntType(level); + elements.add(new StructElement(levelFieldID, leveltlvValue)); + + final long openDurationFieldID = 1L; + BaseTLVType openDurationtlvValue = openDuration.map((nonOptionalopenDuration) -> new UIntType(nonOptionalopenDuration)).orElse(new EmptyType()); + elements.add(new StructElement(openDurationFieldID, openDurationtlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public interface OpenDurationAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } - public interface ReplacementProductListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface AutoCloseTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface RemainingDurationAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface CurrentStateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface TargetStateAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface CurrentLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface TargetLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface OpenLevelAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -25942,59 +27156,143 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readConditionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + public void readOpenDurationAttribute( + OpenDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_DURATION_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CONDITION_ATTRIBUTE_ID, true); + }, OPEN_DURATION_ATTRIBUTE_ID, true); } - public void subscribeConditionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CONDITION_ATTRIBUTE_ID); + public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value) { + writeOpenDurationAttribute(callback, value, 0); + } + + public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); + writeAttribute(new WriteAttributesCallbackImpl(callback), OPEN_DURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeOpenDurationAttribute( + OpenDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_DURATION_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CONDITION_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPEN_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readDegradationDirectionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + public void readAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_CLOSE_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, true); + }, AUTO_CLOSE_TIME_ATTRIBUTE_ID, true); } - public void subscribeDegradationDirectionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEGRADATION_DIRECTION_ATTRIBUTE_ID); + public void subscribeAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AUTO_CLOSE_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, DEGRADATION_DIRECTION_ATTRIBUTE_ID, minInterval, maxInterval); + }, AUTO_CLOSE_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readChangeIndicationAttribute( + public void readRemainingDurationAttribute( + RemainingDurationAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_DURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, REMAINING_DURATION_ATTRIBUTE_ID, true); + } + + public void subscribeRemainingDurationAttribute( + RemainingDurationAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMAINING_DURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, REMAINING_DURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readCurrentStateAttribute( + CurrentStateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, CURRENT_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeCurrentStateAttribute( + CurrentStateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, CURRENT_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTargetStateAttribute( + TargetStateAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_STATE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TARGET_STATE_ATTRIBUTE_ID, true); + } + + public void subscribeTargetStateAttribute( + TargetStateAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_STATE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TARGET_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readStartUpStateAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -26002,103 +27300,137 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, true); + }, START_UP_STATE_ATTRIBUTE_ID, true); } - public void subscribeChangeIndicationAttribute( + public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpStateAttribute(callback, value, 0); + } + + public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), START_UP_STATE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeStartUpStateAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CHANGE_INDICATION_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_UP_STATE_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, CHANGE_INDICATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, START_UP_STATE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readInPlaceIndicatorAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void readCurrentLevelAttribute( + CurrentLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, true); + }, CURRENT_LEVEL_ATTRIBUTE_ID, true); } - public void subscribeInPlaceIndicatorAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, IN_PLACE_INDICATOR_ATTRIBUTE_ID); + public void subscribeCurrentLevelAttribute( + CurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, IN_PLACE_INDICATOR_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + public void readTargetLevelAttribute( + TargetLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LEVEL_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, true); + }, TARGET_LEVEL_ATTRIBUTE_ID, true); } - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { - writeLastChangedTimeAttribute(callback, value, 0); + public void subscribeTargetLevelAttribute( + TargetLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARGET_LEVEL_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TARGET_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + public void readOpenLevelAttribute( + OpenLevelAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_LEVEL_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPEN_LEVEL_ATTRIBUTE_ID, true); + } + + public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeOpenLevelAttribute(callback, value, 0); + } + + public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { BaseTLVType tlvValue = value != null ? new UIntType(value) : new NullType(); - writeAttribute(new WriteAttributesCallbackImpl(callback), LAST_CHANGED_TIME_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + writeAttribute(new WriteAttributesCallbackImpl(callback), OPEN_LEVEL_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); } - public void subscribeLastChangedTimeAttribute( - LastChangedTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LAST_CHANGED_TIME_ATTRIBUTE_ID); + public void subscribeOpenLevelAttribute( + OpenLevelAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPEN_LEVEL_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, LAST_CHANGED_TIME_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPEN_LEVEL_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + public void readValveFaultAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VALVE_FAULT_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, true); + }, VALVE_FAULT_ATTRIBUTE_ID, true); } - public void subscribeReplacementProductListAttribute( - ReplacementProductListAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID); + public void subscribeValveFaultAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VALVE_FAULT_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, REPLACEMENT_PRODUCT_LIST_ATTRIBUTE_ID, minInterval, maxInterval); + }, VALVE_FAULT_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -26255,15 +27587,14 @@ public void onSuccess(byte[] tlv) { public static class DemandResponseLoadControlCluster extends BaseChipCluster { public static final long CLUSTER_ID = 150L; - private static final long DEVICE_CLASS_ATTRIBUTE_ID = 0L; - private static final long LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 1L; - private static final long NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 2L; - private static final long EVENTS_ATTRIBUTE_ID = 3L; - private static final long ACTIVE_EVENTS_ATTRIBUTE_ID = 4L; - private static final long NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID = 5L; - private static final long NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID = 6L; - private static final long DEFAULT_RANDOM_START_ATTRIBUTE_ID = 7L; - private static final long DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID = 8L; + private static final long LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 0L; + private static final long NUMBER_OF_LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID = 1L; + private static final long EVENTS_ATTRIBUTE_ID = 2L; + private static final long ACTIVE_EVENTS_ATTRIBUTE_ID = 3L; + private static final long NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID = 4L; + private static final long NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID = 5L; + private static final long DEFAULT_RANDOM_START_ATTRIBUTE_ID = 6L; + private static final long DEFAULT_RANDOM_DURATION_ATTRIBUTE_ID = 7L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -26409,31 +27740,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readDeviceClassAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_CLASS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DEVICE_CLASS_ATTRIBUTE_ID, true); - } - - public void subscribeDeviceClassAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEVICE_CLASS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, DEVICE_CLASS_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readLoadControlProgramsAttribute( LoadControlProgramsAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOAD_CONTROL_PROGRAMS_ATTRIBUTE_ID); @@ -26559,9 +27865,9 @@ public void onSuccess(byte[] tlv) { }, NUMBER_OF_EVENTS_PER_PROGRAM_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readNumberOfTransistionsAttribute( + public void readNumberOfTransitionsAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -26569,19 +27875,19 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID, true); + }, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID, true); } - public void subscribeNumberOfTransistionsAttribute( + public void subscribeNumberOfTransitionsAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, NUMBER_OF_TRANSISTIONS_ATTRIBUTE_ID, minInterval, maxInterval); + }, NUMBER_OF_TRANSITIONS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readDefaultRandomStartAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 4866e8833e8013..9c48ad3dcdcb70 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -2785,6 +2785,159 @@ public String toString() { return output.toString(); } } +public static class BooleanSensorConfigurationClusterAlarmsStateChangedEvent { + public Integer alarmsActive; + public Optional alarmsSuppressed; + private static final long ALARMS_ACTIVE_ID = 0L; + private static final long ALARMS_SUPPRESSED_ID = 1L; + + public BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + Integer alarmsActive, + Optional alarmsSuppressed + ) { + this.alarmsActive = alarmsActive; + this.alarmsSuppressed = alarmsSuppressed; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(ALARMS_ACTIVE_ID, new UIntType(alarmsActive))); + values.add(new StructElement(ALARMS_SUPPRESSED_ID, alarmsSuppressed.map((nonOptionalalarmsSuppressed) -> new UIntType(nonOptionalalarmsSuppressed)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static BooleanSensorConfigurationClusterAlarmsStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer alarmsActive = null; + Optional alarmsSuppressed = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == ALARMS_ACTIVE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + alarmsActive = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == ALARMS_SUPPRESSED_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + alarmsSuppressed = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + alarmsActive, + alarmsSuppressed + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n"); + output.append("\talarmsActive: "); + output.append(alarmsActive); + output.append("\n"); + output.append("\talarmsSuppressed: "); + output.append(alarmsSuppressed); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ValveConfigurationAndControlClusterValveStateChangedEvent { + public Integer valveState; + private static final long VALVE_STATE_ID = 0L; + + public ValveConfigurationAndControlClusterValveStateChangedEvent( + Integer valveState + ) { + this.valveState = valveState; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VALVE_STATE_ID, new UIntType(valveState))); + + return new StructType(values); + } + + public static ValveConfigurationAndControlClusterValveStateChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer valveState = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VALVE_STATE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + valveState = castingValue.value(Integer.class); + } + } + } + return new ValveConfigurationAndControlClusterValveStateChangedEvent( + valveState + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ValveConfigurationAndControlClusterValveStateChangedEvent {\n"); + output.append("\tvalveState: "); + output.append(valveState); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ValveConfigurationAndControlClusterValveFaultEvent { + public Integer valveFault; + private static final long VALVE_FAULT_ID = 0L; + + public ValveConfigurationAndControlClusterValveFaultEvent( + Integer valveFault + ) { + this.valveFault = valveFault; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(VALVE_FAULT_ID, new UIntType(valveFault))); + + return new StructType(values); + } + + public static ValveConfigurationAndControlClusterValveFaultEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer valveFault = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == VALVE_FAULT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + valveFault = castingValue.value(Integer.class); + } + } + } + return new ValveConfigurationAndControlClusterValveFaultEvent( + valveFault + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ValveConfigurationAndControlClusterValveFaultEvent {\n"); + output.append("\tvalveFault: "); + output.append(valveFault); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent { public byte[] eventID; public @Nullable Integer transitionIndex; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index b9889df5832fea..843b68318831b9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -146,6 +146,127 @@ public String toString() { return output.toString(); } } +public static class ScenesClusterSceneInfoStruct { + public Integer sceneCount; + public Integer currentScene; + public Integer currentGroup; + public Boolean sceneValid; + public Integer remainingCapacity; + public Integer fabricIndex; + private static final long SCENE_COUNT_ID = 0L; + private static final long CURRENT_SCENE_ID = 1L; + private static final long CURRENT_GROUP_ID = 2L; + private static final long SCENE_VALID_ID = 3L; + private static final long REMAINING_CAPACITY_ID = 4L; + private static final long FABRIC_INDEX_ID = 254L; + + public ScenesClusterSceneInfoStruct( + Integer sceneCount, + Integer currentScene, + Integer currentGroup, + Boolean sceneValid, + Integer remainingCapacity, + Integer fabricIndex + ) { + this.sceneCount = sceneCount; + this.currentScene = currentScene; + this.currentGroup = currentGroup; + this.sceneValid = sceneValid; + this.remainingCapacity = remainingCapacity; + this.fabricIndex = fabricIndex; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SCENE_COUNT_ID, new UIntType(sceneCount))); + values.add(new StructElement(CURRENT_SCENE_ID, new UIntType(currentScene))); + values.add(new StructElement(CURRENT_GROUP_ID, new UIntType(currentGroup))); + values.add(new StructElement(SCENE_VALID_ID, new BooleanType(sceneValid))); + values.add(new StructElement(REMAINING_CAPACITY_ID, new UIntType(remainingCapacity))); + values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); + + return new StructType(values); + } + + public static ScenesClusterSceneInfoStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer sceneCount = null; + Integer currentScene = null; + Integer currentGroup = null; + Boolean sceneValid = null; + Integer remainingCapacity = null; + Integer fabricIndex = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SCENE_COUNT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + sceneCount = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_SCENE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentScene = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == CURRENT_GROUP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + currentGroup = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SCENE_VALID_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + sceneValid = castingValue.value(Boolean.class); + } + } else if (element.contextTagNum() == REMAINING_CAPACITY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + remainingCapacity = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == FABRIC_INDEX_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + fabricIndex = castingValue.value(Integer.class); + } + } + } + return new ScenesClusterSceneInfoStruct( + sceneCount, + currentScene, + currentGroup, + sceneValid, + remainingCapacity, + fabricIndex + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ScenesClusterSceneInfoStruct {\n"); + output.append("\tsceneCount: "); + output.append(sceneCount); + output.append("\n"); + output.append("\tcurrentScene: "); + output.append(currentScene); + output.append("\n"); + output.append("\tcurrentGroup: "); + output.append(currentGroup); + output.append("\n"); + output.append("\tsceneValid: "); + output.append(sceneValid); + output.append("\n"); + output.append("\tremainingCapacity: "); + output.append(remainingCapacity); + output.append("\n"); + output.append("\tfabricIndex: "); + output.append(fabricIndex); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class DescriptorClusterDeviceTypeStruct { public Long deviceType; public Integer revision; @@ -3678,6 +3799,143 @@ public String toString() { return output.toString(); } } +public static class OvenModeClusterModeTagStruct { + public Optional mfgCode; + public Integer value; + private static final long MFG_CODE_ID = 0L; + private static final long VALUE_ID = 1L; + + public OvenModeClusterModeTagStruct( + Optional mfgCode, + Integer value + ) { + this.mfgCode = mfgCode; + this.value = value; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(MFG_CODE_ID, mfgCode.map((nonOptionalmfgCode) -> new UIntType(nonOptionalmfgCode)).orElse(new EmptyType()))); + values.add(new StructElement(VALUE_ID, new UIntType(value))); + + return new StructType(values); + } + + public static OvenModeClusterModeTagStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Optional mfgCode = Optional.empty(); + Integer value = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == MFG_CODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + mfgCode = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == VALUE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + value = castingValue.value(Integer.class); + } + } + } + return new OvenModeClusterModeTagStruct( + mfgCode, + value + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OvenModeClusterModeTagStruct {\n"); + output.append("\tmfgCode: "); + output.append(mfgCode); + output.append("\n"); + output.append("\tvalue: "); + output.append(value); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class OvenModeClusterModeOptionStruct { + public String label; + public Integer mode; + public ArrayList modeTags; + private static final long LABEL_ID = 0L; + private static final long MODE_ID = 1L; + private static final long MODE_TAGS_ID = 2L; + + public OvenModeClusterModeOptionStruct( + String label, + Integer mode, + ArrayList modeTags + ) { + this.label = label; + this.mode = mode; + this.modeTags = modeTags; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(LABEL_ID, new StringType(label))); + values.add(new StructElement(MODE_ID, new UIntType(mode))); + values.add(new StructElement(MODE_TAGS_ID, ArrayType.generateArrayType(modeTags, (elementmodeTags) -> elementmodeTags.encodeTlv()))); + + return new StructType(values); + } + + public static OvenModeClusterModeOptionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + String label = null; + Integer mode = null; + ArrayList modeTags = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == LABEL_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + label = castingValue.value(String.class); + } + } else if (element.contextTagNum() == MODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + mode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == MODE_TAGS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + modeTags = castingValue.map((elementcastingValue) -> ChipStructs.OvenModeClusterModeTagStruct.decodeTlv(elementcastingValue)); + } + } + } + return new OvenModeClusterModeOptionStruct( + label, + mode, + modeTags + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OvenModeClusterModeOptionStruct {\n"); + output.append("\tlabel: "); + output.append(label); + output.append("\n"); + output.append("\tmode: "); + output.append(mode); + output.append("\n"); + output.append("\tmodeTags: "); + output.append(modeTags); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ModeSelectClusterSemanticTagStruct { public Integer mfgCode; public Integer value; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index a340abd92582a1..a9afb548631586 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -154,6 +154,9 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == Timer.ID) { return new Timer(); } + if (clusterId == OvenMode.ID) { + return new OvenMode(); + } if (clusterId == ModeSelect.ID) { return new ModeSelect(); } @@ -208,6 +211,12 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == ActivatedCarbonFilterMonitoring.ID) { return new ActivatedCarbonFilterMonitoring(); } + if (clusterId == BooleanSensorConfiguration.ID) { + return new BooleanSensorConfiguration(); + } + if (clusterId == ValveConfigurationAndControl.ID) { + return new ValveConfigurationAndControl(); + } if (clusterId == DemandResponseLoadControl.ID) { return new DemandResponseLoadControl(); } @@ -679,7 +688,7 @@ public enum Attribute { NameSupport(4L), LastConfiguredBy(5L), SceneTableSize(6L), - RemainingCapacity(7L), + FabricSceneInfo(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -2347,6 +2356,8 @@ public enum Attribute { UniqueID(18L), CapabilityMinima(19L), ProductAppearance(20L), + SpecificationVersion(21L), + MaxPathsPerInvoke(22L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -6288,6 +6299,128 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } + public static class OvenMode implements BaseCluster { + public static final long ID = 73L; + public long getID() { + return ID; + } + + public enum Attribute { + SupportedModes(0L), + CurrentMode(1L), + StartUpMode(2L), + OnMode(3L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event {; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + ChangeToMode(0L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ChangeToModeCommandField {NewMode(0),; + private final int id; + ChangeToModeCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ChangeToModeCommandField value(int id) throws NoSuchFieldError { + for (ChangeToModeCommandField field : ChangeToModeCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } public static class ModeSelect implements BaseCluster { public static final long ID = 80L; public long getID() { @@ -8400,6 +8533,279 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } + public static class BooleanSensorConfiguration implements BaseCluster { + public static final long ID = 128L; + public long getID() { + return ID; + } + + public enum Attribute { + SensitivityLevel(0L), + AlarmsActive(1L), + AlarmsSuppressed(2L), + AlarmsEnabled(3L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + AlarmsStateChanged(0L), + SensorFault(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + SuppressRequest(0L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum SuppressRequestCommandField {AlarmsToSuppress(0),; + private final int id; + SuppressRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SuppressRequestCommandField value(int id) throws NoSuchFieldError { + for (SuppressRequestCommandField field : SuppressRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } + public static class ValveConfigurationAndControl implements BaseCluster { + public static final long ID = 129L; + public long getID() { + return ID; + } + + public enum Attribute { + OpenDuration(0L), + AutoCloseTime(1L), + RemainingDuration(2L), + CurrentState(3L), + TargetState(4L), + StartUpState(5L), + CurrentLevel(6L), + TargetLevel(7L), + OpenLevel(8L), + ValveFault(9L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + ValveStateChanged(0L), + ValveFault(1L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Open(0L), + Close(1L), + SetLevel(2L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum OpenCommandField {OpenDuration(0),; + private final int id; + OpenCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static OpenCommandField value(int id) throws NoSuchFieldError { + for (OpenCommandField field : OpenCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetLevelCommandField {Level(0),OpenDuration(1),; + private final int id; + SetLevelCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetLevelCommandField value(int id) throws NoSuchFieldError { + for (SetLevelCommandField field : SetLevelCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } public static class DemandResponseLoadControl implements BaseCluster { public static final long ID = 150L; public long getID() { @@ -8407,15 +8813,14 @@ public long getID() { } public enum Attribute { - DeviceClass(0L), - LoadControlPrograms(1L), - NumberOfLoadControlPrograms(2L), - Events(3L), - ActiveEvents(4L), - NumberOfEventsPerProgram(5L), - NumberOfTransistions(6L), - DefaultRandomStart(7L), - DefaultRandomDuration(8L), + LoadControlPrograms(0L), + NumberOfLoadControlPrograms(1L), + Events(2L), + ActiveEvents(3L), + NumberOfEventsPerProgram(4L), + NumberOfTransitions(5L), + DefaultRandomStart(6L), + DefaultRandomDuration(7L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 8f86942fe67027..f536292566d6ec 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -750,6 +750,27 @@ public void onError(Exception ex) { } } + public static class DelegatedScenesClusterFabricSceneInfoAttributeCallback implements ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedScenesClusterGeneratedCommandListAttributeCallback implements ChipClusters.ScenesCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -6500,6 +6521,28 @@ public void onError(Exception error) { callback.onFailure(error); } } + + public static class DelegatedIcdManagementClusterStayActiveResponseCallback implements ChipClusters.IcdManagementCluster.StayActiveResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Long promisedActiveDuration) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo promisedActiveDurationResponseValue = new CommandResponseInfo("promisedActiveDuration", "Long"); + responseValues.put(promisedActiveDurationResponseValue, promisedActiveDuration); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedIcdManagementClusterRegisteredClientsAttributeCallback implements ChipClusters.IcdManagementCluster.RegisteredClientsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -6689,6 +6732,177 @@ public void onError(Exception ex) { } } + + public static class DelegatedOvenModeClusterChangeToModeResponseCallback implements ChipClusters.OvenModeCluster.ChangeToModeResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Optional statusText) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer"); + responseValues.put(statusResponseValue, status); + CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional"); + responseValues.put(statusTextResponseValue, statusText); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.OvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterStartUpModeAttributeCallback implements ChipClusters.OvenModeCluster.StartUpModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterOnModeAttributeCallback implements ChipClusters.OvenModeCluster.OnModeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterEventListAttributeCallback implements ChipClusters.OvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOvenModeClusterAttributeListAttributeCallback implements ChipClusters.OvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedModeSelectClusterStandardNamespaceAttributeCallback implements ChipClusters.ModeSelectCluster.StandardNamespaceAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -8363,7 +8577,345 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { + Map responseValues = new LinkedHashMap<>(); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Long value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + + public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { + Map responseValues = new LinkedHashMap<>(); + + // commandResponseState: Struct ErrorStateStruct + // Conversion from this type to Java is not properly implemented yet + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8371,10 +8923,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8384,7 +8936,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8392,10 +8944,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8405,7 +8957,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8413,9 +8965,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8426,7 +8978,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8434,10 +8986,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8447,8 +8999,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8456,20 +9007,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8477,9 +9028,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8490,7 +9041,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8498,10 +9049,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8511,7 +9062,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8519,10 +9070,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8532,7 +9083,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8540,10 +9091,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8553,7 +9104,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8561,10 +9112,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8574,7 +9125,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8595,7 +9146,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8616,7 +9167,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8637,7 +9188,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedHepaFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8658,8 +9209,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8667,20 +9217,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - - // commandResponseState: Struct ErrorStateStruct - // Conversion from this type to Java is not properly implemented yet + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @Override - public void onError(Exception error) { - callback.onFailure(error); + public void onError(Exception ex) { + callback.onFailure(ex); } } - public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedActivatedCarbonFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8688,9 +9238,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8701,7 +9251,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8709,10 +9259,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8722,7 +9272,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8730,10 +9280,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8743,7 +9293,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8751,9 +9301,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8764,7 +9314,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedActivatedCarbonFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8772,10 +9322,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -8785,7 +9335,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanSensorConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8806,7 +9356,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanSensorConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8827,7 +9377,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanSensorConfigurationClusterEventListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8848,7 +9398,7 @@ public void onError(Exception ex) { } } - public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedBooleanSensorConfigurationClusterAttributeListAttributeCallback implements ChipClusters.BooleanSensorConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8869,7 +9419,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterOpenDurationAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.OpenDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8890,7 +9440,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAutoCloseTimeAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AutoCloseTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8898,10 +9448,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8911,7 +9461,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterRemainingDurationAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.RemainingDurationAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8919,10 +9469,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8932,7 +9482,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterCurrentStateAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.CurrentStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8940,10 +9490,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8953,7 +9503,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterTargetStateAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.TargetStateAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8961,10 +9511,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8974,7 +9524,7 @@ public void onError(Exception ex) { } } - public static class DelegatedHepaFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.HepaFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterCurrentLevelAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.CurrentLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8982,10 +9532,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -8995,7 +9545,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterLastChangedTimeAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.LastChangedTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterTargetLevelAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.TargetLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9003,9 +9553,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Long value) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9016,7 +9566,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterReplacementProductListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.ReplacementProductListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterOpenLevelAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.OpenLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9024,10 +9574,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9037,7 +9587,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterGeneratedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9058,7 +9608,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterAcceptedCommandListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9079,7 +9629,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterEventListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterEventListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9100,7 +9650,7 @@ public void onError(Exception ex) { } } - public static class DelegatedActivatedCarbonFilterMonitoringClusterAttributeListAttributeCallback implements ChipClusters.ActivatedCarbonFilterMonitoringCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedValveConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.ValveConfigurationAndControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -17469,6 +18019,10 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.TimerCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("timer", timerClusterInfo); + ClusterInfo ovenModeClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.OvenModeCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("ovenMode", ovenModeClusterInfo); + ClusterInfo modeSelectClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ModeSelectCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("modeSelect", modeSelectClusterInfo); @@ -17541,6 +18095,14 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.ActivatedCarbonFilterMonitoringCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInfo); + ClusterInfo booleanSensorConfigurationClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.BooleanSensorConfigurationCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInfo); + + ClusterInfo valveConfigurationAndControlClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.ValveConfigurationAndControlCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("valveConfigurationAndControl", valveConfigurationAndControlClusterInfo); + ClusterInfo demandResponseLoadControlClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.DemandResponseLoadControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInfo); @@ -17755,6 +18317,7 @@ public void combineCommand(Map destination, Map destination, Map> getCommandMap() { InteractionInfo icdManagementstayActiveRequestInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.IcdManagementCluster) cluster) - .stayActiveRequest((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), + .stayActiveRequest((ChipClusters.IcdManagementCluster.StayActiveResponseCallback) callback + ); + }, + () -> new DelegatedIcdManagementClusterStayActiveResponseCallback(), icdManagementstayActiveRequestCommandParams - ); + ); icdManagementClusterInteractionInfoMap.put("stayActiveRequest", icdManagementstayActiveRequestInteractionInfo); commandMap.put("icdManagement", icdManagementClusterInteractionInfoMap); @@ -20131,6 +20696,28 @@ public Map> getCommandMap() { commandMap.put("timer", timerClusterInteractionInfoMap); + Map ovenModeClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map ovenModechangeToModeCommandParams = new LinkedHashMap(); + + CommandParameterInfo ovenModechangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); + ovenModechangeToModeCommandParams.put("newMode",ovenModechangeToModenewModeCommandParameterInfo); + InteractionInfo ovenModechangeToModeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster) + .changeToMode((ChipClusters.OvenModeCluster.ChangeToModeResponseCallback) callback + , (Integer) + commandArguments.get("newMode") + + ); + }, + () -> new DelegatedOvenModeClusterChangeToModeResponseCallback(), + ovenModechangeToModeCommandParams + ); + ovenModeClusterInteractionInfoMap.put("changeToMode", ovenModechangeToModeInteractionInfo); + + commandMap.put("ovenMode", ovenModeClusterInteractionInfoMap); + Map modeSelectClusterInteractionInfoMap = new LinkedHashMap<>(); Map modeSelectchangeToModeCommandParams = new LinkedHashMap(); @@ -20542,6 +21129,82 @@ public Map> getCommandMap() { commandMap.put("activatedCarbonFilterMonitoring", activatedCarbonFilterMonitoringClusterInteractionInfoMap); + Map booleanSensorConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map booleanSensorConfigurationsuppressRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo = new CommandParameterInfo("alarmsToSuppress", Integer.class, Integer.class); + booleanSensorConfigurationsuppressRequestCommandParams.put("alarmsToSuppress",booleanSensorConfigurationsuppressRequestalarmsToSuppressCommandParameterInfo); + InteractionInfo booleanSensorConfigurationsuppressRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster) + .suppressRequest((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("alarmsToSuppress") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + booleanSensorConfigurationsuppressRequestCommandParams + ); + booleanSensorConfigurationClusterInteractionInfoMap.put("suppressRequest", booleanSensorConfigurationsuppressRequestInteractionInfo); + + commandMap.put("booleanSensorConfiguration", booleanSensorConfigurationClusterInteractionInfoMap); + + Map valveConfigurationAndControlClusterInteractionInfoMap = new LinkedHashMap<>(); + + Map valveConfigurationAndControlopenCommandParams = new LinkedHashMap(); + + CommandParameterInfo valveConfigurationAndControlopenopenDurationCommandParameterInfo = new CommandParameterInfo("openDuration", Optional.class, Long.class); + valveConfigurationAndControlopenCommandParams.put("openDuration",valveConfigurationAndControlopenopenDurationCommandParameterInfo); + InteractionInfo valveConfigurationAndControlopenInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster) + .open((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("openDuration") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + valveConfigurationAndControlopenCommandParams + ); + valveConfigurationAndControlClusterInteractionInfoMap.put("open", valveConfigurationAndControlopenInteractionInfo); + + Map valveConfigurationAndControlcloseCommandParams = new LinkedHashMap(); + InteractionInfo valveConfigurationAndControlcloseInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster) + .close((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + valveConfigurationAndControlcloseCommandParams + ); + valveConfigurationAndControlClusterInteractionInfoMap.put("close", valveConfigurationAndControlcloseInteractionInfo); + + Map valveConfigurationAndControlsetLevelCommandParams = new LinkedHashMap(); + + CommandParameterInfo valveConfigurationAndControlsetLevellevelCommandParameterInfo = new CommandParameterInfo("level", Integer.class, Integer.class); + valveConfigurationAndControlsetLevelCommandParams.put("level",valveConfigurationAndControlsetLevellevelCommandParameterInfo); + + CommandParameterInfo valveConfigurationAndControlsetLevelopenDurationCommandParameterInfo = new CommandParameterInfo("openDuration", Optional.class, Long.class); + valveConfigurationAndControlsetLevelCommandParams.put("openDuration",valveConfigurationAndControlsetLevelopenDurationCommandParameterInfo); + InteractionInfo valveConfigurationAndControlsetLevelInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster) + .setLevel((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("level") + , (Optional) + commandArguments.get("openDuration") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + valveConfigurationAndControlsetLevelCommandParams + ); + valveConfigurationAndControlClusterInteractionInfoMap.put("setLevel", valveConfigurationAndControlsetLevelInteractionInfo); + + commandMap.put("valveConfigurationAndControl", valveConfigurationAndControlClusterInteractionInfoMap); + Map demandResponseLoadControlClusterInteractionInfoMap = new LinkedHashMap<>(); Map demandResponseLoadControlregisterLoadControlProgramRequestCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 4e1b64b42e125f..cb820da9f950dc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -276,17 +276,17 @@ private static Map readScenesInteractionInfo() { readScenesSceneTableSizeCommandParams ); result.put("readSceneTableSizeAttribute", readScenesSceneTableSizeAttributeInteractionInfo); - Map readScenesRemainingCapacityCommandParams = new LinkedHashMap(); - InteractionInfo readScenesRemainingCapacityAttributeInteractionInfo = new InteractionInfo( + Map readScenesFabricSceneInfoCommandParams = new LinkedHashMap(); + InteractionInfo readScenesFabricSceneInfoAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster).readRemainingCapacityAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.ScenesCluster) cluster).readFabricSceneInfoAttribute( + (ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readScenesRemainingCapacityCommandParams + () -> new ClusterInfoMapping.DelegatedScenesClusterFabricSceneInfoAttributeCallback(), + readScenesFabricSceneInfoCommandParams ); - result.put("readRemainingCapacityAttribute", readScenesRemainingCapacityAttributeInteractionInfo); + result.put("readFabricSceneInfoAttribute", readScenesFabricSceneInfoAttributeInteractionInfo); Map readScenesGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readScenesGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -1680,6 +1680,28 @@ private static Map readBasicInformationInteractionInfo( readBasicInformationUniqueIDCommandParams ); result.put("readUniqueIDAttribute", readBasicInformationUniqueIDAttributeInteractionInfo); + Map readBasicInformationSpecificationVersionCommandParams = new LinkedHashMap(); + InteractionInfo readBasicInformationSpecificationVersionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BasicInformationCluster) cluster).readSpecificationVersionAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readBasicInformationSpecificationVersionCommandParams + ); + result.put("readSpecificationVersionAttribute", readBasicInformationSpecificationVersionAttributeInteractionInfo); + Map readBasicInformationMaxPathsPerInvokeCommandParams = new LinkedHashMap(); + InteractionInfo readBasicInformationMaxPathsPerInvokeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BasicInformationCluster) cluster).readMaxPathsPerInvokeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBasicInformationMaxPathsPerInvokeCommandParams + ); + result.put("readMaxPathsPerInvokeAttribute", readBasicInformationMaxPathsPerInvokeAttributeInteractionInfo); Map readBasicInformationGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readBasicInformationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -6100,6 +6122,120 @@ private static Map readTimerInteractionInfo() { return result; } + private static Map readOvenModeInteractionInfo() { + Map result = new LinkedHashMap<>();Map readOvenModeSupportedModesCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeSupportedModesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readSupportedModesAttribute( + (ChipClusters.OvenModeCluster.SupportedModesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterSupportedModesAttributeCallback(), + readOvenModeSupportedModesCommandParams + ); + result.put("readSupportedModesAttribute", readOvenModeSupportedModesAttributeInteractionInfo); + Map readOvenModeCurrentModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeCurrentModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readCurrentModeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOvenModeCurrentModeCommandParams + ); + result.put("readCurrentModeAttribute", readOvenModeCurrentModeAttributeInteractionInfo); + Map readOvenModeStartUpModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readStartUpModeAttribute( + (ChipClusters.OvenModeCluster.StartUpModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterStartUpModeAttributeCallback(), + readOvenModeStartUpModeCommandParams + ); + result.put("readStartUpModeAttribute", readOvenModeStartUpModeAttributeInteractionInfo); + Map readOvenModeOnModeCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readOnModeAttribute( + (ChipClusters.OvenModeCluster.OnModeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterOnModeAttributeCallback(), + readOvenModeOnModeCommandParams + ); + result.put("readOnModeAttribute", readOvenModeOnModeAttributeInteractionInfo); + Map readOvenModeGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.OvenModeCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterGeneratedCommandListAttributeCallback(), + readOvenModeGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readOvenModeGeneratedCommandListAttributeInteractionInfo); + Map readOvenModeAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.OvenModeCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterAcceptedCommandListAttributeCallback(), + readOvenModeAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readOvenModeAcceptedCommandListAttributeInteractionInfo); + Map readOvenModeEventListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readEventListAttribute( + (ChipClusters.OvenModeCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterEventListAttributeCallback(), + readOvenModeEventListCommandParams + ); + result.put("readEventListAttribute", readOvenModeEventListAttributeInteractionInfo); + Map readOvenModeAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readAttributeListAttribute( + (ChipClusters.OvenModeCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedOvenModeClusterAttributeListAttributeCallback(), + readOvenModeAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readOvenModeAttributeListAttributeInteractionInfo); + Map readOvenModeFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readOvenModeFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readOvenModeFeatureMapAttributeInteractionInfo); + Map readOvenModeClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readOvenModeClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readOvenModeClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readOvenModeClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readModeSelectInteractionInfo() { Map result = new LinkedHashMap<>();Map readModeSelectDescriptionCommandParams = new LinkedHashMap(); InteractionInfo readModeSelectDescriptionAttributeInteractionInfo = new InteractionInfo( @@ -8284,19 +8420,302 @@ private static Map readActivatedCarbonFilterMonitoringI return result; } - private static Map readDemandResponseLoadControlInteractionInfo() { - Map result = new LinkedHashMap<>();Map readDemandResponseLoadControlDeviceClassCommandParams = new LinkedHashMap(); - InteractionInfo readDemandResponseLoadControlDeviceClassAttributeInteractionInfo = new InteractionInfo( + private static Map readBooleanSensorConfigurationInteractionInfo() { + Map result = new LinkedHashMap<>();Map readBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readSensitivityLevelAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationSensitivityLevelCommandParams + ); + result.put("readSensitivityLevelAttribute", readBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo); + Map readBooleanSensorConfigurationAlarmsActiveCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DemandResponseLoadControlCluster) cluster).readDeviceClassAttribute( + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsActiveAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationAlarmsActiveCommandParams + ); + result.put("readAlarmsActiveAttribute", readBooleanSensorConfigurationAlarmsActiveAttributeInteractionInfo); + Map readBooleanSensorConfigurationAlarmsSuppressedCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsSuppressedAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationAlarmsSuppressedCommandParams + ); + result.put("readAlarmsSuppressedAttribute", readBooleanSensorConfigurationAlarmsSuppressedAttributeInteractionInfo); + Map readBooleanSensorConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAlarmsEnabledAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationAlarmsEnabledCommandParams + ); + result.put("readAlarmsEnabledAttribute", readBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo); + Map readBooleanSensorConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.BooleanSensorConfigurationCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterGeneratedCommandListAttributeCallback(), + readBooleanSensorConfigurationGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readBooleanSensorConfigurationGeneratedCommandListAttributeInteractionInfo); + Map readBooleanSensorConfigurationAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.BooleanSensorConfigurationCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterAcceptedCommandListAttributeCallback(), + readBooleanSensorConfigurationAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readBooleanSensorConfigurationAcceptedCommandListAttributeInteractionInfo); + Map readBooleanSensorConfigurationEventListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readEventListAttribute( + (ChipClusters.BooleanSensorConfigurationCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterEventListAttributeCallback(), + readBooleanSensorConfigurationEventListCommandParams + ); + result.put("readEventListAttribute", readBooleanSensorConfigurationEventListAttributeInteractionInfo); + Map readBooleanSensorConfigurationAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readAttributeListAttribute( + (ChipClusters.BooleanSensorConfigurationCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanSensorConfigurationClusterAttributeListAttributeCallback(), + readBooleanSensorConfigurationAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readBooleanSensorConfigurationAttributeListAttributeInteractionInfo); + Map readBooleanSensorConfigurationFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readBooleanSensorConfigurationFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readBooleanSensorConfigurationFeatureMapAttributeInteractionInfo); + Map readBooleanSensorConfigurationClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readBooleanSensorConfigurationClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readBooleanSensorConfigurationClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readBooleanSensorConfigurationClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readValveConfigurationAndControlInteractionInfo() { + Map result = new LinkedHashMap<>();Map readValveConfigurationAndControlOpenDurationCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlOpenDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readOpenDurationAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.OpenDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterOpenDurationAttributeCallback(), + readValveConfigurationAndControlOpenDurationCommandParams + ); + result.put("readOpenDurationAttribute", readValveConfigurationAndControlOpenDurationAttributeInteractionInfo); + Map readValveConfigurationAndControlAutoCloseTimeCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAutoCloseTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAutoCloseTimeAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AutoCloseTimeAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAutoCloseTimeAttributeCallback(), + readValveConfigurationAndControlAutoCloseTimeCommandParams + ); + result.put("readAutoCloseTimeAttribute", readValveConfigurationAndControlAutoCloseTimeAttributeInteractionInfo); + Map readValveConfigurationAndControlRemainingDurationCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlRemainingDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readRemainingDurationAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.RemainingDurationAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterRemainingDurationAttributeCallback(), + readValveConfigurationAndControlRemainingDurationCommandParams + ); + result.put("readRemainingDurationAttribute", readValveConfigurationAndControlRemainingDurationAttributeInteractionInfo); + Map readValveConfigurationAndControlCurrentStateCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlCurrentStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readCurrentStateAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.CurrentStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterCurrentStateAttributeCallback(), + readValveConfigurationAndControlCurrentStateCommandParams + ); + result.put("readCurrentStateAttribute", readValveConfigurationAndControlCurrentStateAttributeInteractionInfo); + Map readValveConfigurationAndControlTargetStateCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlTargetStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readTargetStateAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.TargetStateAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterTargetStateAttributeCallback(), + readValveConfigurationAndControlTargetStateCommandParams + ); + result.put("readTargetStateAttribute", readValveConfigurationAndControlTargetStateAttributeInteractionInfo); + Map readValveConfigurationAndControlStartUpStateCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlStartUpStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readStartUpStateAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlStartUpStateCommandParams + ); + result.put("readStartUpStateAttribute", readValveConfigurationAndControlStartUpStateAttributeInteractionInfo); + Map readValveConfigurationAndControlCurrentLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlCurrentLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readCurrentLevelAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.CurrentLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterCurrentLevelAttributeCallback(), + readValveConfigurationAndControlCurrentLevelCommandParams + ); + result.put("readCurrentLevelAttribute", readValveConfigurationAndControlCurrentLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlTargetLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlTargetLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readTargetLevelAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.TargetLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterTargetLevelAttributeCallback(), + readValveConfigurationAndControlTargetLevelCommandParams + ); + result.put("readTargetLevelAttribute", readValveConfigurationAndControlTargetLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlOpenLevelCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlOpenLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readOpenLevelAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.OpenLevelAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterOpenLevelAttributeCallback(), + readValveConfigurationAndControlOpenLevelCommandParams + ); + result.put("readOpenLevelAttribute", readValveConfigurationAndControlOpenLevelAttributeInteractionInfo); + Map readValveConfigurationAndControlValveFaultCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlValveFaultAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readValveFaultAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlValveFaultCommandParams + ); + result.put("readValveFaultAttribute", readValveConfigurationAndControlValveFaultAttributeInteractionInfo); + Map readValveConfigurationAndControlGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterGeneratedCommandListAttributeCallback(), + readValveConfigurationAndControlGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readValveConfigurationAndControlGeneratedCommandListAttributeInteractionInfo); + Map readValveConfigurationAndControlAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAcceptedCommandListAttributeCallback(), + readValveConfigurationAndControlAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readValveConfigurationAndControlAcceptedCommandListAttributeInteractionInfo); + Map readValveConfigurationAndControlEventListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readEventListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterEventListAttributeCallback(), + readValveConfigurationAndControlEventListCommandParams + ); + result.put("readEventListAttribute", readValveConfigurationAndControlEventListAttributeInteractionInfo); + Map readValveConfigurationAndControlAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readAttributeListAttribute( + (ChipClusters.ValveConfigurationAndControlCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedValveConfigurationAndControlClusterAttributeListAttributeCallback(), + readValveConfigurationAndControlAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readValveConfigurationAndControlAttributeListAttributeInteractionInfo); + Map readValveConfigurationAndControlFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readFeatureMapAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readDemandResponseLoadControlDeviceClassCommandParams + readValveConfigurationAndControlFeatureMapCommandParams ); - result.put("readDeviceClassAttribute", readDemandResponseLoadControlDeviceClassAttributeInteractionInfo); - Map readDemandResponseLoadControlLoadControlProgramsCommandParams = new LinkedHashMap(); + result.put("readFeatureMapAttribute", readValveConfigurationAndControlFeatureMapAttributeInteractionInfo); + Map readValveConfigurationAndControlClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readValveConfigurationAndControlClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readValveConfigurationAndControlClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readValveConfigurationAndControlClusterRevisionAttributeInteractionInfo); + + return result; + } + private static Map readDemandResponseLoadControlInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDemandResponseLoadControlLoadControlProgramsCommandParams = new LinkedHashMap(); InteractionInfo readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.DemandResponseLoadControlCluster) cluster).readLoadControlProgramsAttribute( @@ -8351,17 +8770,17 @@ private static Map readDemandResponseLoadControlInterac readDemandResponseLoadControlNumberOfEventsPerProgramCommandParams ); result.put("readNumberOfEventsPerProgramAttribute", readDemandResponseLoadControlNumberOfEventsPerProgramAttributeInteractionInfo); - Map readDemandResponseLoadControlNumberOfTransistionsCommandParams = new LinkedHashMap(); - InteractionInfo readDemandResponseLoadControlNumberOfTransistionsAttributeInteractionInfo = new InteractionInfo( + Map readDemandResponseLoadControlNumberOfTransitionsCommandParams = new LinkedHashMap(); + InteractionInfo readDemandResponseLoadControlNumberOfTransitionsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfTransistionsAttribute( + ((ChipClusters.DemandResponseLoadControlCluster) cluster).readNumberOfTransitionsAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readDemandResponseLoadControlNumberOfTransistionsCommandParams + readDemandResponseLoadControlNumberOfTransitionsCommandParams ); - result.put("readNumberOfTransistionsAttribute", readDemandResponseLoadControlNumberOfTransistionsAttributeInteractionInfo); + result.put("readNumberOfTransitionsAttribute", readDemandResponseLoadControlNumberOfTransitionsAttributeInteractionInfo); Map readDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap(); InteractionInfo readDemandResponseLoadControlDefaultRandomStartAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -18002,6 +18421,7 @@ public Map> getReadAttributeMap() { put("booleanState", readBooleanStateInteractionInfo()); put("icdManagement", readIcdManagementInteractionInfo()); put("timer", readTimerInteractionInfo()); + put("ovenMode", readOvenModeInteractionInfo()); put("modeSelect", readModeSelectInteractionInfo()); put("laundryWasherMode", readLaundryWasherModeInteractionInfo()); put("refrigeratorAndTemperatureControlledCabinetMode", readRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo()); @@ -18020,6 +18440,8 @@ public Map> getReadAttributeMap() { put("rvcOperationalState", readRvcOperationalStateInteractionInfo()); put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo()); put("activatedCarbonFilterMonitoring", readActivatedCarbonFilterMonitoringInteractionInfo()); + put("booleanSensorConfiguration", readBooleanSensorConfigurationInteractionInfo()); + put("valveConfigurationAndControl", readValveConfigurationAndControlInteractionInfo()); put("demandResponseLoadControl", readDemandResponseLoadControlInteractionInfo()); put("doorLock", readDoorLockInteractionInfo()); put("windowCovering", readWindowCoveringInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 2f14aa26764e42..aaf6fc85bba1d7 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -726,6 +726,52 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("icdManagement", writeIcdManagementInteractionInfo); Map writeTimerInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("timer", writeTimerInteractionInfo); + Map writeOvenModeInteractionInfo = new LinkedHashMap<>(); + Map writeOvenModeStartUpModeCommandParams = new LinkedHashMap(); + CommandParameterInfo ovenModestartUpModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeOvenModeStartUpModeCommandParams.put( + "value", + ovenModestartUpModeCommandParameterInfo + ); + InteractionInfo writeOvenModeStartUpModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).writeStartUpModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeOvenModeStartUpModeCommandParams + ); + writeOvenModeInteractionInfo.put("writeStartUpModeAttribute", writeOvenModeStartUpModeAttributeInteractionInfo); + Map writeOvenModeOnModeCommandParams = new LinkedHashMap(); + CommandParameterInfo ovenModeonModeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeOvenModeOnModeCommandParams.put( + "value", + ovenModeonModeCommandParameterInfo + ); + InteractionInfo writeOvenModeOnModeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OvenModeCluster) cluster).writeOnModeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeOvenModeOnModeCommandParams + ); + writeOvenModeInteractionInfo.put("writeOnModeAttribute", writeOvenModeOnModeAttributeInteractionInfo); + writeAttributeMap.put("ovenMode", writeOvenModeInteractionInfo); Map writeModeSelectInteractionInfo = new LinkedHashMap<>(); Map writeModeSelectStartUpModeCommandParams = new LinkedHashMap(); CommandParameterInfo modeSelectstartUpModeCommandParameterInfo = @@ -1092,6 +1138,120 @@ public Map> getWriteAttributeMap() { ); writeActivatedCarbonFilterMonitoringInteractionInfo.put("writeLastChangedTimeAttribute", writeActivatedCarbonFilterMonitoringLastChangedTimeAttributeInteractionInfo); writeAttributeMap.put("activatedCarbonFilterMonitoring", writeActivatedCarbonFilterMonitoringInteractionInfo); + Map writeBooleanSensorConfigurationInteractionInfo = new LinkedHashMap<>(); + Map writeBooleanSensorConfigurationSensitivityLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo booleanSensorConfigurationsensitivityLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeBooleanSensorConfigurationSensitivityLevelCommandParams.put( + "value", + booleanSensorConfigurationsensitivityLevelCommandParameterInfo + ); + InteractionInfo writeBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeSensitivityLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeBooleanSensorConfigurationSensitivityLevelCommandParams + ); + writeBooleanSensorConfigurationInteractionInfo.put("writeSensitivityLevelAttribute", writeBooleanSensorConfigurationSensitivityLevelAttributeInteractionInfo); + Map writeBooleanSensorConfigurationAlarmsEnabledCommandParams = new LinkedHashMap(); + CommandParameterInfo booleanSensorConfigurationalarmsEnabledCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeBooleanSensorConfigurationAlarmsEnabledCommandParams.put( + "value", + booleanSensorConfigurationalarmsEnabledCommandParameterInfo + ); + InteractionInfo writeBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.BooleanSensorConfigurationCluster) cluster).writeAlarmsEnabledAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeBooleanSensorConfigurationAlarmsEnabledCommandParams + ); + writeBooleanSensorConfigurationInteractionInfo.put("writeAlarmsEnabledAttribute", writeBooleanSensorConfigurationAlarmsEnabledAttributeInteractionInfo); + writeAttributeMap.put("booleanSensorConfiguration", writeBooleanSensorConfigurationInteractionInfo); + Map writeValveConfigurationAndControlInteractionInfo = new LinkedHashMap<>(); + Map writeValveConfigurationAndControlOpenDurationCommandParams = new LinkedHashMap(); + CommandParameterInfo valveConfigurationAndControlopenDurationCommandParameterInfo = + new CommandParameterInfo( + "value", + Long.class, + Long.class + ); + writeValveConfigurationAndControlOpenDurationCommandParams.put( + "value", + valveConfigurationAndControlopenDurationCommandParameterInfo + ); + InteractionInfo writeValveConfigurationAndControlOpenDurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).writeOpenDurationAttribute( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeValveConfigurationAndControlOpenDurationCommandParams + ); + writeValveConfigurationAndControlInteractionInfo.put("writeOpenDurationAttribute", writeValveConfigurationAndControlOpenDurationAttributeInteractionInfo); + Map writeValveConfigurationAndControlStartUpStateCommandParams = new LinkedHashMap(); + CommandParameterInfo valveConfigurationAndControlstartUpStateCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeValveConfigurationAndControlStartUpStateCommandParams.put( + "value", + valveConfigurationAndControlstartUpStateCommandParameterInfo + ); + InteractionInfo writeValveConfigurationAndControlStartUpStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).writeStartUpStateAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeValveConfigurationAndControlStartUpStateCommandParams + ); + writeValveConfigurationAndControlInteractionInfo.put("writeStartUpStateAttribute", writeValveConfigurationAndControlStartUpStateAttributeInteractionInfo); + Map writeValveConfigurationAndControlOpenLevelCommandParams = new LinkedHashMap(); + CommandParameterInfo valveConfigurationAndControlopenLevelCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeValveConfigurationAndControlOpenLevelCommandParams.put( + "value", + valveConfigurationAndControlopenLevelCommandParameterInfo + ); + InteractionInfo writeValveConfigurationAndControlOpenLevelAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ValveConfigurationAndControlCluster) cluster).writeOpenLevelAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeValveConfigurationAndControlOpenLevelCommandParams + ); + writeValveConfigurationAndControlInteractionInfo.put("writeOpenLevelAttribute", writeValveConfigurationAndControlOpenLevelAttributeInteractionInfo); + writeAttributeMap.put("valveConfigurationAndControl", writeValveConfigurationAndControlInteractionInfo); Map writeDemandResponseLoadControlInteractionInfo = new LinkedHashMap<>(); Map writeDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap(); CommandParameterInfo demandResponseLoadControldefaultRandomStartCommandParameterInfo = diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt new file mode 100644 index 00000000000000..c51a8e06724875 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + val alarmsActive: UInt, + val alarmsSuppressed: Optional +) { + override fun toString(): String = buildString { + append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n") + append("\talarmsActive : $alarmsActive\n") + append("\talarmsSuppressed : $alarmsSuppressed\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARMS_ACTIVE), alarmsActive) + if (alarmsSuppressed.isPresent) { + val optalarmsSuppressed = alarmsSuppressed.get() + put(ContextSpecificTag(TAG_ALARMS_SUPPRESSED), optalarmsSuppressed) + } + endStructure() + } + } + + companion object { + private const val TAG_ALARMS_ACTIVE = 0 + private const val TAG_ALARMS_SUPPRESSED = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BooleanSensorConfigurationClusterAlarmsStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val alarmsActive = tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_ACTIVE)) + val alarmsSuppressed = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + alarmsActive, + alarmsSuppressed + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt new file mode 100644 index 00000000000000..cb432d975e1275 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ValveConfigurationAndControlClusterValveFaultEvent(val valveFault: UInt) { + override fun toString(): String = buildString { + append("ValveConfigurationAndControlClusterValveFaultEvent {\n") + append("\tvalveFault : $valveFault\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VALVE_FAULT), valveFault) + endStructure() + } + } + + companion object { + private const val TAG_VALVE_FAULT = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ValveConfigurationAndControlClusterValveFaultEvent { + tlvReader.enterStructure(tlvTag) + val valveFault = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_FAULT)) + + tlvReader.exitContainer() + + return ValveConfigurationAndControlClusterValveFaultEvent(valveFault) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt new file mode 100644 index 00000000000000..d015f73b2e61b5 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.eventstructs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ValveConfigurationAndControlClusterValveStateChangedEvent(val valveState: UInt) { + override fun toString(): String = buildString { + append("ValveConfigurationAndControlClusterValveStateChangedEvent {\n") + append("\tvalveState : $valveState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VALVE_STATE), valveState) + endStructure() + } + } + + companion object { + private const val TAG_VALVE_STATE = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ValveConfigurationAndControlClusterValveStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val valveState = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_STATE)) + + tlvReader.exitContainer() + + return ValveConfigurationAndControlClusterValveStateChangedEvent(valveState) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index aaf9b5a5d48257..3efc1df1f73f16 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -61,6 +61,8 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", @@ -74,6 +76,7 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", @@ -103,6 +106,7 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", @@ -147,6 +151,8 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..0df558d3935e26 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OvenModeClusterModeOptionStruct( + val label: String, + val mode: UInt, + val modeTags: List +) { + override fun toString(): String = buildString { + append("OvenModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUInt(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(OvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return OvenModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..df0465b2c3055d --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("OvenModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return OvenModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt new file mode 100644 index 00000000000000..066ade4d02a12f --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ScenesClusterSceneInfoStruct( + val sceneCount: UInt, + val currentScene: UInt, + val currentGroup: UInt, + val sceneValid: Boolean, + val remainingCapacity: UInt, + val fabricIndex: UInt +) { + override fun toString(): String = buildString { + append("ScenesClusterSceneInfoStruct {\n") + append("\tsceneCount : $sceneCount\n") + append("\tcurrentScene : $currentScene\n") + append("\tcurrentGroup : $currentGroup\n") + append("\tsceneValid : $sceneValid\n") + append("\tremainingCapacity : $remainingCapacity\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SCENE_COUNT), sceneCount) + put(ContextSpecificTag(TAG_CURRENT_SCENE), currentScene) + put(ContextSpecificTag(TAG_CURRENT_GROUP), currentGroup) + put(ContextSpecificTag(TAG_SCENE_VALID), sceneValid) + put(ContextSpecificTag(TAG_REMAINING_CAPACITY), remainingCapacity) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_SCENE_COUNT = 0 + private const val TAG_CURRENT_SCENE = 1 + private const val TAG_CURRENT_GROUP = 2 + private const val TAG_SCENE_VALID = 3 + private const val TAG_REMAINING_CAPACITY = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterSceneInfoStruct { + tlvReader.enterStructure(tlvTag) + val sceneCount = tlvReader.getUInt(ContextSpecificTag(TAG_SCENE_COUNT)) + val currentScene = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_SCENE)) + val currentGroup = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENT_GROUP)) + val sceneValid = tlvReader.getBoolean(ContextSpecificTag(TAG_SCENE_VALID)) + val remainingCapacity = tlvReader.getUInt(ContextSpecificTag(TAG_REMAINING_CAPACITY)) + val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return ScenesClusterSceneInfoStruct( + sceneCount, + currentScene, + currentGroup, + sceneValid, + remainingCapacity, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt index c1a0a36efd002f..9cfb4657ad3cc0 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt @@ -250,6 +250,22 @@ class BasicInformationCluster( // Implementation needs to be added here } + suspend fun readSpecificationVersionAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeSpecificationVersionAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readMaxPathsPerInvokeAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeMaxPathsPerInvokeAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { // Implementation needs to be added here } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt new file mode 100644 index 00000000000000..068aa709815206 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt @@ -0,0 +1,153 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package matter.devicecontroller.cluster.clusters + +import matter.controller.MatterController +import matter.devicecontroller.cluster.structs.* + +class BooleanSensorConfigurationCluster( + private val controller: MatterController, + private val endpointId: UShort +) { + class GeneratedCommandListAttribute(val value: List) + + class AcceptedCommandListAttribute(val value: List) + + class EventListAttribute(val value: List) + + class AttributeListAttribute(val value: List) + + suspend fun suppressRequest(alarmsToSuppress: UInt, timedInvokeTimeoutMs: Int? = null) { + val commandId = 0L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun readSensitivityLevelAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun writeSensitivityLevelAttribute(value: UInt, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeSensitivityLevelAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readAlarmsActiveAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribeAlarmsActiveAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readAlarmsSuppressedAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribeAlarmsSuppressedAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readAlarmsEnabledAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun writeAlarmsEnabledAttribute(value: UInt, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeAlarmsEnabledAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readEventListAttribute(): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int + ): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun readFeatureMapAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readClusterRevisionAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + + companion object { + const val CLUSTER_ID: UInt = 128u + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt index f2e3ce480e1eb4..2f61d6f7b0c5db 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/DemandResponseLoadControlCluster.kt @@ -105,14 +105,6 @@ class DemandResponseLoadControlCluster( } } - suspend fun readDeviceClassAttribute(): UInt { - // Implementation needs to be added here - } - - suspend fun subscribeDeviceClassAttribute(minInterval: Int, maxInterval: Int): UInt { - // Implementation needs to be added here - } - suspend fun readLoadControlProgramsAttribute(): LoadControlProgramsAttribute { // Implementation needs to be added here } @@ -165,11 +157,11 @@ class DemandResponseLoadControlCluster( // Implementation needs to be added here } - suspend fun readNumberOfTransistionsAttribute(): UByte { + suspend fun readNumberOfTransitionsAttribute(): UByte { // Implementation needs to be added here } - suspend fun subscribeNumberOfTransistionsAttribute(minInterval: Int, maxInterval: Int): UByte { + suspend fun subscribeNumberOfTransitionsAttribute(minInterval: Int, maxInterval: Int): UByte { // Implementation needs to be added here } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt index 18ff22b9bdd66d..c70094f9e08ec9 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/IcdManagementCluster.kt @@ -26,6 +26,8 @@ class IcdManagementCluster( ) { class RegisterClientResponse(val ICDCounter: UInt) + class StayActiveResponse(val promisedActiveDuration: UInt) + class RegisteredClientsAttribute( val value: List? ) @@ -68,7 +70,7 @@ class IcdManagementCluster( } } - suspend fun stayActiveRequest(timedInvokeTimeoutMs: Int? = null) { + suspend fun stayActiveRequest(timedInvokeTimeoutMs: Int? = null): StayActiveResponse { val commandId = 3L if (timedInvokeTimeoutMs != null) { diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OvenModeCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OvenModeCluster.kt new file mode 100644 index 00000000000000..267bd10448cca1 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OvenModeCluster.kt @@ -0,0 +1,167 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package matter.devicecontroller.cluster.clusters + +import matter.controller.MatterController +import matter.devicecontroller.cluster.structs.* + +class OvenModeCluster(private val controller: MatterController, private val endpointId: UShort) { + class ChangeToModeResponse(val status: UInt, val statusText: String?) + + class SupportedModesAttribute(val value: List) + + class StartUpModeAttribute(val value: UByte?) + + class OnModeAttribute(val value: UByte?) + + class GeneratedCommandListAttribute(val value: List) + + class AcceptedCommandListAttribute(val value: List) + + class EventListAttribute(val value: List) + + class AttributeListAttribute(val value: List) + + suspend fun changeToMode( + newMode: UByte, + timedInvokeTimeoutMs: Int? = null + ): ChangeToModeResponse { + val commandId = 0L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun readSupportedModesAttribute(): SupportedModesAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeSupportedModesAttribute( + minInterval: Int, + maxInterval: Int + ): SupportedModesAttribute { + // Implementation needs to be added here + } + + suspend fun readCurrentModeAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun subscribeCurrentModeAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readStartUpModeAttribute(): StartUpModeAttribute { + // Implementation needs to be added here + } + + suspend fun writeStartUpModeAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeStartUpModeAttribute( + minInterval: Int, + maxInterval: Int + ): StartUpModeAttribute { + // Implementation needs to be added here + } + + suspend fun readOnModeAttribute(): OnModeAttribute { + // Implementation needs to be added here + } + + suspend fun writeOnModeAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeOnModeAttribute(minInterval: Int, maxInterval: Int): OnModeAttribute { + // Implementation needs to be added here + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readEventListAttribute(): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int + ): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun readFeatureMapAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readClusterRevisionAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + + companion object { + const val CLUSTER_ID: UInt = 73u + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt index 9e5918c4255b88..4baf50cd57f18a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ScenesCluster.kt @@ -64,6 +64,8 @@ class ScenesCluster(private val controller: MatterController, private val endpoi class LastConfiguredByAttribute(val value: ULong?) + class FabricSceneInfoAttribute(val value: List) + class GeneratedCommandListAttribute(val value: List) class AcceptedCommandListAttribute(val value: List) @@ -279,11 +281,20 @@ class ScenesCluster(private val controller: MatterController, private val endpoi // Implementation needs to be added here } - suspend fun readRemainingCapacityAttribute(): UByte { + suspend fun readFabricSceneInfoAttribute(): FabricSceneInfoAttribute { + // Implementation needs to be added here + } + + suspend fun readFabricSceneInfoAttributeWithFabricFilter( + isFabricFiltered: Boolean + ): FabricSceneInfoAttribute { // Implementation needs to be added here } - suspend fun subscribeRemainingCapacityAttribute(minInterval: Int, maxInterval: Int): UByte { + suspend fun subscribeFabricSceneInfoAttribute( + minInterval: Int, + maxInterval: Int + ): FabricSceneInfoAttribute { // Implementation needs to be added here } diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ValveConfigurationAndControlCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ValveConfigurationAndControlCluster.kt new file mode 100644 index 00000000000000..bdcc7781467968 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ValveConfigurationAndControlCluster.kt @@ -0,0 +1,266 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package matter.devicecontroller.cluster.clusters + +import matter.controller.MatterController +import matter.devicecontroller.cluster.structs.* + +class ValveConfigurationAndControlCluster( + private val controller: MatterController, + private val endpointId: UShort +) { + class OpenDurationAttribute(val value: UInt?) + + class AutoCloseTimeAttribute(val value: ULong?) + + class RemainingDurationAttribute(val value: UInt?) + + class CurrentStateAttribute(val value: UInt?) + + class TargetStateAttribute(val value: UInt?) + + class CurrentLevelAttribute(val value: UByte?) + + class TargetLevelAttribute(val value: UByte?) + + class OpenLevelAttribute(val value: UByte?) + + class GeneratedCommandListAttribute(val value: List) + + class AcceptedCommandListAttribute(val value: List) + + class EventListAttribute(val value: List) + + class AttributeListAttribute(val value: List) + + suspend fun open(openDuration: UInt?, timedInvokeTimeoutMs: Int? = null) { + val commandId = 0L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun close(timedInvokeTimeoutMs: Int? = null) { + val commandId = 1L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun setLevel(level: UByte, openDuration: UInt?, timedInvokeTimeoutMs: Int? = null) { + val commandId = 2L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + + suspend fun readOpenDurationAttribute(): OpenDurationAttribute { + // Implementation needs to be added here + } + + suspend fun writeOpenDurationAttribute(value: UInt, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeOpenDurationAttribute( + minInterval: Int, + maxInterval: Int + ): OpenDurationAttribute { + // Implementation needs to be added here + } + + suspend fun readAutoCloseTimeAttribute(): AutoCloseTimeAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAutoCloseTimeAttribute( + minInterval: Int, + maxInterval: Int + ): AutoCloseTimeAttribute { + // Implementation needs to be added here + } + + suspend fun readRemainingDurationAttribute(): RemainingDurationAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeRemainingDurationAttribute( + minInterval: Int, + maxInterval: Int + ): RemainingDurationAttribute { + // Implementation needs to be added here + } + + suspend fun readCurrentStateAttribute(): CurrentStateAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeCurrentStateAttribute( + minInterval: Int, + maxInterval: Int + ): CurrentStateAttribute { + // Implementation needs to be added here + } + + suspend fun readTargetStateAttribute(): TargetStateAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeTargetStateAttribute( + minInterval: Int, + maxInterval: Int + ): TargetStateAttribute { + // Implementation needs to be added here + } + + suspend fun readStartUpStateAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun writeStartUpStateAttribute(value: UInt, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeStartUpStateAttribute(minInterval: Int, maxInterval: Int): UByte { + // Implementation needs to be added here + } + + suspend fun readCurrentLevelAttribute(): CurrentLevelAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeCurrentLevelAttribute( + minInterval: Int, + maxInterval: Int + ): CurrentLevelAttribute { + // Implementation needs to be added here + } + + suspend fun readTargetLevelAttribute(): TargetLevelAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeTargetLevelAttribute( + minInterval: Int, + maxInterval: Int + ): TargetLevelAttribute { + // Implementation needs to be added here + } + + suspend fun readOpenLevelAttribute(): OpenLevelAttribute { + // Implementation needs to be added here + } + + suspend fun writeOpenLevelAttribute(value: UByte, timedWriteTimeoutMs: Int? = null) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeOpenLevelAttribute(minInterval: Int, maxInterval: Int): OpenLevelAttribute { + // Implementation needs to be added here + } + + suspend fun readValveFaultAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeValveFaultAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeGeneratedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): GeneratedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAcceptedCommandListAttribute( + minInterval: Int, + maxInterval: Int + ): AcceptedCommandListAttribute { + // Implementation needs to be added here + } + + suspend fun readEventListAttribute(): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeEventListAttribute(minInterval: Int, maxInterval: Int): EventListAttribute { + // Implementation needs to be added here + } + + suspend fun readAttributeListAttribute(): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun subscribeAttributeListAttribute( + minInterval: Int, + maxInterval: Int + ): AttributeListAttribute { + // Implementation needs to be added here + } + + suspend fun readFeatureMapAttribute(): UInt { + // Implementation needs to be added here + } + + suspend fun subscribeFeatureMapAttribute(minInterval: Int, maxInterval: Int): UInt { + // Implementation needs to be added here + } + + suspend fun readClusterRevisionAttribute(): UShort { + // Implementation needs to be added here + } + + suspend fun subscribeClusterRevisionAttribute(minInterval: Int, maxInterval: Int): UShort { + // Implementation needs to be added here + } + + companion object { + const val CLUSTER_ID: UInt = 129u + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt new file mode 100644 index 00000000000000..bf64761f255688 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt @@ -0,0 +1,74 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + val alarmsActive: UInt, + val alarmsSuppressed: Optional +) { + override fun toString(): String = buildString { + append("BooleanSensorConfigurationClusterAlarmsStateChangedEvent {\n") + append("\talarmsActive : $alarmsActive\n") + append("\talarmsSuppressed : $alarmsSuppressed\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_ALARMS_ACTIVE), alarmsActive) + if (alarmsSuppressed.isPresent) { + val optalarmsSuppressed = alarmsSuppressed.get() + put(ContextSpecificTag(TAG_ALARMS_SUPPRESSED), optalarmsSuppressed) + } + endStructure() + } + } + + companion object { + private const val TAG_ALARMS_ACTIVE = 0 + private const val TAG_ALARMS_SUPPRESSED = 1 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): BooleanSensorConfigurationClusterAlarmsStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val alarmsActive = tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_ACTIVE)) + val alarmsSuppressed = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_ALARMS_SUPPRESSED))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return BooleanSensorConfigurationClusterAlarmsStateChangedEvent( + alarmsActive, + alarmsSuppressed + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt new file mode 100644 index 00000000000000..6aa0f2c8ea44bf --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ValveConfigurationAndControlClusterValveFaultEvent(val valveFault: UInt) { + override fun toString(): String = buildString { + append("ValveConfigurationAndControlClusterValveFaultEvent {\n") + append("\tvalveFault : $valveFault\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VALVE_FAULT), valveFault) + endStructure() + } + } + + companion object { + private const val TAG_VALVE_FAULT = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ValveConfigurationAndControlClusterValveFaultEvent { + tlvReader.enterStructure(tlvTag) + val valveFault = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_FAULT)) + + tlvReader.exitContainer() + + return ValveConfigurationAndControlClusterValveFaultEvent(valveFault) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt new file mode 100644 index 00000000000000..37e58c25cea495 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.eventstructs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ValveConfigurationAndControlClusterValveStateChangedEvent(val valveState: UInt) { + override fun toString(): String = buildString { + append("ValveConfigurationAndControlClusterValveStateChangedEvent {\n") + append("\tvalveState : $valveState\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_VALVE_STATE), valveState) + endStructure() + } + } + + companion object { + private const val TAG_VALVE_STATE = 0 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ValveConfigurationAndControlClusterValveStateChangedEvent { + tlvReader.enterStructure(tlvTag) + val valveState = tlvReader.getUInt(ContextSpecificTag(TAG_VALVE_STATE)) + + tlvReader.exitContainer() + + return ValveConfigurationAndControlClusterValveStateChangedEvent(valveState) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index 54dbdd6875c852..c53547a0049d91 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -61,6 +61,8 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterErrorStateStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OperationalStateClusterOperationalStateStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OtaSoftwareUpdateRequestorClusterProviderLocation.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatChargeFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterBatFaultChangeType.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/PowerSourceClusterWiredFaultChangeType.kt", @@ -74,6 +76,7 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/RvcRunModeClusterModeTagStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterAttributeValuePair.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterExtensionFieldSet.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", @@ -103,6 +106,7 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterLeaveEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BasicInformationClusterStartUpEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanSensorConfigurationClusterAlarmsStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BooleanStateClusterStateChangeEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt", @@ -147,6 +151,8 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/TimeSynchronizationClusterTimeZoneStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestEventEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/UnitTestingClusterTestFabricScopedEventEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveFaultEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/ValveConfigurationAndControlClusterValveStateChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterAssociationFailureEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterConnectionStatusEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/eventstructs/WiFiNetworkDiagnosticsClusterDisconnectionEvent.kt", @@ -167,6 +173,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BasicInformationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BinaryInputBasicCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BindingCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanSensorConfigurationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BooleanStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/CarbonDioxideConcentrationMeasurementCluster.kt", @@ -215,6 +222,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OperationalStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OtaSoftwareUpdateRequestorCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OvenModeCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/OzoneConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm10ConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/Pm1ConcentrationMeasurementCluster.kt", @@ -252,6 +260,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitLocalizationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UnitTestingCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/UserLabelCluster.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ValveConfigurationAndControlCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WakeOnLanCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WiFiNetworkDiagnosticsCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/WindowCoveringCluster.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt index 811e87bdc7c429..363970d31ad65a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/DemandResponseLoadControlClusterPowerSavingsControlStruct.kt @@ -22,7 +22,7 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings: UInt) { +class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings: UByte) { override fun toString(): String = buildString { append("DemandResponseLoadControlClusterPowerSavingsControlStruct {\n") append("\tpowerSavings : $powerSavings\n") @@ -45,7 +45,7 @@ class DemandResponseLoadControlClusterPowerSavingsControlStruct(val powerSavings tlvReader: TlvReader ): DemandResponseLoadControlClusterPowerSavingsControlStruct { tlvReader.enterStructure(tlvTag) - val powerSavings = tlvReader.getUInt(ContextSpecificTag(TAG_POWER_SAVINGS)) + val powerSavings = tlvReader.getUByte(ContextSpecificTag(TAG_POWER_SAVINGS)) tlvReader.exitContainer() diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt new file mode 100644 index 00000000000000..de09bc2413be77 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeOptionStruct.kt @@ -0,0 +1,76 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OvenModeClusterModeOptionStruct( + val label: String, + val mode: UByte, + val modeTags: List +) { + override fun toString(): String = buildString { + append("OvenModeClusterModeOptionStruct {\n") + append("\tlabel : $label\n") + append("\tmode : $mode\n") + append("\tmodeTags : $modeTags\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_LABEL), label) + put(ContextSpecificTag(TAG_MODE), mode) + startArray(ContextSpecificTag(TAG_MODE_TAGS)) + for (item in modeTags.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + endStructure() + } + } + + companion object { + private const val TAG_LABEL = 0 + private const val TAG_MODE = 1 + private const val TAG_MODE_TAGS = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeOptionStruct { + tlvReader.enterStructure(tlvTag) + val label = tlvReader.getString(ContextSpecificTag(TAG_LABEL)) + val mode = tlvReader.getUByte(ContextSpecificTag(TAG_MODE)) + val modeTags = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_MODE_TAGS)) + while (!tlvReader.isEndOfContainer()) { + add(OvenModeClusterModeTagStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + + tlvReader.exitContainer() + + return OvenModeClusterModeOptionStruct(label, mode, modeTags) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt new file mode 100644 index 00000000000000..f957f7073fa77a --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/OvenModeClusterModeTagStruct.kt @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import java.util.Optional +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class OvenModeClusterModeTagStruct(val mfgCode: Optional, val value: UInt) { + override fun toString(): String = buildString { + append("OvenModeClusterModeTagStruct {\n") + append("\tmfgCode : $mfgCode\n") + append("\tvalue : $value\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (mfgCode.isPresent) { + val optmfgCode = mfgCode.get() + put(ContextSpecificTag(TAG_MFG_CODE), optmfgCode) + } + put(ContextSpecificTag(TAG_VALUE), value) + endStructure() + } + } + + companion object { + private const val TAG_MFG_CODE = 0 + private const val TAG_VALUE = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OvenModeClusterModeTagStruct { + tlvReader.enterStructure(tlvTag) + val mfgCode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_MFG_CODE))) { + Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_MFG_CODE))) + } else { + Optional.empty() + } + val value = tlvReader.getUInt(ContextSpecificTag(TAG_VALUE)) + + tlvReader.exitContainer() + + return OvenModeClusterModeTagStruct(mfgCode, value) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt new file mode 100644 index 00000000000000..7d21ccd8c87802 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt @@ -0,0 +1,86 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ScenesClusterSceneInfoStruct( + val sceneCount: UByte, + val currentScene: UByte, + val currentGroup: UShort, + val sceneValid: Boolean, + val remainingCapacity: UByte, + val fabricIndex: UByte +) { + override fun toString(): String = buildString { + append("ScenesClusterSceneInfoStruct {\n") + append("\tsceneCount : $sceneCount\n") + append("\tcurrentScene : $currentScene\n") + append("\tcurrentGroup : $currentGroup\n") + append("\tsceneValid : $sceneValid\n") + append("\tremainingCapacity : $remainingCapacity\n") + append("\tfabricIndex : $fabricIndex\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SCENE_COUNT), sceneCount) + put(ContextSpecificTag(TAG_CURRENT_SCENE), currentScene) + put(ContextSpecificTag(TAG_CURRENT_GROUP), currentGroup) + put(ContextSpecificTag(TAG_SCENE_VALID), sceneValid) + put(ContextSpecificTag(TAG_REMAINING_CAPACITY), remainingCapacity) + put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + endStructure() + } + } + + companion object { + private const val TAG_SCENE_COUNT = 0 + private const val TAG_CURRENT_SCENE = 1 + private const val TAG_CURRENT_GROUP = 2 + private const val TAG_SCENE_VALID = 3 + private const val TAG_REMAINING_CAPACITY = 4 + private const val TAG_FABRIC_INDEX = 254 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ScenesClusterSceneInfoStruct { + tlvReader.enterStructure(tlvTag) + val sceneCount = tlvReader.getUByte(ContextSpecificTag(TAG_SCENE_COUNT)) + val currentScene = tlvReader.getUByte(ContextSpecificTag(TAG_CURRENT_SCENE)) + val currentGroup = tlvReader.getUShort(ContextSpecificTag(TAG_CURRENT_GROUP)) + val sceneValid = tlvReader.getBoolean(ContextSpecificTag(TAG_SCENE_VALID)) + val remainingCapacity = tlvReader.getUByte(ContextSpecificTag(TAG_REMAINING_CAPACITY)) + val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + + tlvReader.exitContainer() + + return ScenesClusterSceneInfoStruct( + sceneCount, + currentScene, + currentGroup, + sceneValid, + remainingCapacity, + fabricIndex + ) + } + } +} diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 2d8fe197e143f4..e3ec8f8a1559de 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -492,8 +492,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::RemainingCapacity::Id: { - using TypeInfo = Attributes::RemainingCapacity::TypeInfo; + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -501,11 +501,79 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); + return nullptr; + } + jmethodID sceneInfoStructStructCtor_1 = + env->GetMethodID(sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/" + "Integer;Ljava/lang/Integer;)V"); + if (sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -3555,6 +3623,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value_primaryColor); return value; } + case Attributes::SpecificationVersion::Id: { + using TypeInfo = Attributes::SpecificationVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::MaxPathsPerInvoke::Id: { + using TypeInfo = Attributes::MaxPathsPerInvoke::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12886,45 +12986,10 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ModeSelect::Id: { - using namespace app::Clusters::ModeSelect; + case app::Clusters::OvenMode::Id: { + using namespace app::Clusters::OvenMode; switch (aPath.mAttributeId) { - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); - return value; - } - case Attributes::StandardNamespace::Id: { - using TypeInfo = Attributes::StandardNamespace::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12950,21 +13015,31 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -12973,46 +13048,45 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", - semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); return nullptr; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, - newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13217,10 +13291,45 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::LaundryWasherMode::Id: { - using namespace app::Clusters::LaundryWasherMode; + case app::Clusters::ModeSelect::Id: { + using namespace app::Clusters::ModeSelect; switch (aPath.mAttributeId) { + case Attributes::Description::Id: { + using TypeInfo = Attributes::Description::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); + return value; + } + case Attributes::StandardNamespace::Id: { + using TypeInfo = Attributes::StandardNamespace::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } case Attributes::SupportedModes::Id: { using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13246,31 +13355,21 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), - newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, - newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -13279,46 +13378,46 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", + semanticTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); return nullptr; } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) + jmethodID semanticTagStructStructCtor_3 = + env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (semanticTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); return nullptr; } - newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, + newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", - modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return nullptr; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -13523,8 +13622,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { - using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; + case app::Clusters::LaundryWasherMode::Id: { + using namespace app::Clusters::LaundryWasherMode; switch (aPath.mAttributeId) { case Attributes::SupportedModes::Id: { @@ -13587,23 +13686,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, - "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); return nullptr; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); return nullptr; } @@ -13614,22 +13707,18 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); return nullptr; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find " - "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); return nullptr; } @@ -13839,12 +13928,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::LaundryWasherControls::Id: { - using namespace app::Clusters::LaundryWasherControls; + case app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id: { + using namespace app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode; switch (aPath.mAttributeId) { - case Attributes::SpinSpeeds::Id: { - using TypeInfo = Attributes::SpinSpeeds::TypeInfo; + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13859,13 +13948,120 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), + newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), jninewElement_2_mfgCodeInsideOptional, + newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, + "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + return nullptr; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, + "Could not find " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + return nullptr; + } + + newElement_2 = env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + return nullptr; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID( + modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find " + "ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::SpinSpeedCurrent::Id: { - using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::StartUpMode::Id: { + using TypeInfo = Attributes::StartUpMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13887,8 +14083,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::NumberOfRinses::Id: { - using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + case Attributes::OnMode::Id: { + using TypeInfo = Attributes::OnMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -13896,35 +14092,17 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::SupportedRinses::Id: { - using TypeInfo = Attributes::SupportedRinses::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = nullptr; } - jobject value; - chip::JniReferences::GetInstance().CreateArrayList(value); - - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) + else { - auto & entry_0 = iter_value_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); } return value; } @@ -14066,12 +14244,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::RvcRunMode::Id: { - using namespace app::Clusters::RvcRunMode; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mAttributeId) { - case Attributes::SupportedModes::Id: { - using TypeInfo = Attributes::SupportedModes::TypeInfo; + case Attributes::SpinSpeeds::Id: { + using TypeInfo = Attributes::SpinSpeeds::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -14086,17 +14264,244 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), - newElement_0_modeCtorSignature.c_str(), - jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::SpinSpeedCurrent::Id: { + using TypeInfo = Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::NumberOfRinses::Id: { + using TypeInfo = Attributes::NumberOfRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::RvcRunMode::Id: { + using namespace app::Clusters::RvcRunMode; + switch (aPath.mAttributeId) + { + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_modeClassName.c_str(), + newElement_0_modeCtorSignature.c_str(), + jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); while (iter_newElement_0_modeTags_2.Next()) @@ -17831,12 +18236,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::DemandResponseLoadControl::Id: { - using namespace app::Clusters::DemandResponseLoadControl; + case app::Clusters::BooleanSensorConfiguration::Id: { + using namespace app::Clusters::BooleanSensorConfiguration; switch (aPath.mAttributeId) { - case Attributes::DeviceClass::Id: { - using TypeInfo = Attributes::DeviceClass::TypeInfo; + case Attributes::SensitivityLevel::Id: { + using TypeInfo = Attributes::SensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -17844,13 +18249,561 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AlarmsActive::Id: { + using TypeInfo = Attributes::AlarmsActive::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::AlarmsSuppressed::Id: { + using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); return value; } + case Attributes::AlarmsEnabled::Id: { + using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::ValveConfigurationAndControl::Id: { + using namespace app::Clusters::ValveConfigurationAndControl; + switch (aPath.mAttributeId) + { + case Attributes::OpenDuration::Id: { + using TypeInfo = Attributes::OpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::AutoCloseTime::Id: { + using TypeInfo = Attributes::AutoCloseTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::RemainingDuration::Id: { + using TypeInfo = Attributes::RemainingDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::TargetState::Id: { + using TypeInfo = Attributes::TargetState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::StartUpState::Id: { + using TypeInfo = Attributes::StartUpState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::TargetLevel::Id: { + using TypeInfo = Attributes::TargetLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::OpenLevel::Id: { + using TypeInfo = Attributes::OpenLevel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + } + return value; + } + case Attributes::ValveFault::Id: { + using TypeInfo = Attributes::ValveFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case app::Clusters::DemandResponseLoadControl::Id: { + using namespace app::Clusters::DemandResponseLoadControl; + switch (aPath.mAttributeId) + { case Attributes::LoadControlPrograms::Id: { using TypeInfo = Attributes::LoadControlPrograms::TypeInfo; TypeInfo::DecodableType cppValue; @@ -19028,8 +19981,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::NumberOfTransistions::Id: { - using TypeInfo = Attributes::NumberOfTransistions::TypeInfo; + case Attributes::NumberOfTransitions::Id: { + using TypeInfo = Attributes::NumberOfTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 2c4046a73920c0..64ece3857a36fb 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -44,6 +44,9 @@ typedef void (*GroupsEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesFabricSceneInfoListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, @@ -479,6 +482,17 @@ typedef void (*TimerEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimerAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeSupportedModesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeAcceptedCommandListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*OvenModeAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectSupportedModesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -675,6 +689,22 @@ typedef void (*ActivatedCarbonFilterMonitoringEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActivatedCarbonFilterMonitoringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanSensorConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanSensorConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanSensorConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanSensorConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ValveConfigurationAndControlAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DemandResponseLoadControlLoadControlProgramsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 9d3dbec50b8c25..f4783540b51d53 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2222,6 +2222,126 @@ JNI_METHOD(void, UserLabelCluster, writeLabelListAttribute) onFailure.release(); } +JNI_METHOD(void, OvenModeCluster, writeStartUpModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::OvenMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OvenModeCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, OvenModeCluster, writeOnModeAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::OvenMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + OvenModeCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ModeSelectCluster, writeStartUpModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -3108,6 +3228,282 @@ JNI_METHOD(void, ActivatedCarbonFilterMonitoringCluster, writeLastChangedTimeAtt onFailure.release(); } +JNI_METHOD(void, BooleanSensorConfigurationCluster, writeSensitivityLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BooleanSensorConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, BooleanSensorConfigurationCluster, writeAlarmsEnabledAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + BooleanSensorConfigurationCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ValveConfigurationAndControlCluster, writeOpenDurationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().LongToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ValveConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ValveConfigurationAndControlCluster, writeStartUpStateAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::ValveConfigurationAndControl::Attributes::StartUpState::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ValveConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ValveConfigurationAndControlCluster, writeOpenLevelAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenLevel::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + if (value == nullptr) + { + cppValue.SetNull(); + } + else + { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ValveConfigurationAndControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, DemandResponseLoadControlCluster, writeDefaultRandomStartAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index f00d93faa06214..9a0482f90238ac 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2489,6 +2489,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::OvenMode::Id: { + using namespace app::Clusters::OvenMode; + switch (aPath.mEventId) + { + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::ModeSelect::Id: { using namespace app::Clusters::ModeSelect; switch (aPath.mEventId) @@ -3457,6 +3467,180 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::BooleanSensorConfiguration::Id: { + using namespace app::Clusters::BooleanSensorConfiguration; + switch (aPath.mEventId) + { + case Events::AlarmsStateChanged::Id: { + Events::AlarmsStateChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_alarmsActive; + std::string value_alarmsActiveClassName = "java/lang/Integer"; + std::string value_alarmsActiveCtorSignature = "(I)V"; + jint jnivalue_alarmsActive = static_cast(cppValue.alarmsActive.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(value_alarmsActiveClassName.c_str(), + value_alarmsActiveCtorSignature.c_str(), + jnivalue_alarmsActive, value_alarmsActive); + + jobject value_alarmsSuppressed; + if (!cppValue.alarmsSuppressed.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_alarmsSuppressed); + } + else + { + jobject value_alarmsSuppressedInsideOptional; + std::string value_alarmsSuppressedInsideOptionalClassName = "java/lang/Integer"; + std::string value_alarmsSuppressedInsideOptionalCtorSignature = "(I)V"; + jint jnivalue_alarmsSuppressedInsideOptional = static_cast(cppValue.alarmsSuppressed.Value().Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_alarmsSuppressedInsideOptionalClassName.c_str(), + value_alarmsSuppressedInsideOptionalCtorSignature.c_str(), jnivalue_alarmsSuppressedInsideOptional, + value_alarmsSuppressedInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(value_alarmsSuppressedInsideOptional, value_alarmsSuppressed); + } + + jclass alarmsStateChangedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent", + alarmsStateChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent"); + return nullptr; + } + jmethodID alarmsStateChangedStructCtor = + env->GetMethodID(alarmsStateChangedStructClass, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (alarmsStateChangedStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$BooleanSensorConfigurationClusterAlarmsStateChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(alarmsStateChangedStructClass, alarmsStateChangedStructCtor, value_alarmsActive, + value_alarmsSuppressed); + + return value; + } + case Events::SensorFault::Id: { + Events::SensorFault::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jclass sensorFaultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent", + sensorFaultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent"); + return nullptr; + } + jmethodID sensorFaultStructCtor = env->GetMethodID(sensorFaultStructClass, "", "()V"); + if (sensorFaultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$BooleanSensorConfigurationClusterSensorFaultEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(sensorFaultStructClass, sensorFaultStructCtor); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case app::Clusters::ValveConfigurationAndControl::Id: { + using namespace app::Clusters::ValveConfigurationAndControl; + switch (aPath.mEventId) + { + case Events::ValveStateChanged::Id: { + Events::ValveStateChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_valveState; + std::string value_valveStateClassName = "java/lang/Integer"; + std::string value_valveStateCtorSignature = "(I)V"; + jint jnivalue_valveState = static_cast(cppValue.valveState); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_valveStateClassName.c_str(), value_valveStateCtorSignature.c_str(), jnivalue_valveState, value_valveState); + + jclass valveStateChangedStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent", + valveStateChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent"); + return nullptr; + } + jmethodID valveStateChangedStructCtor = + env->GetMethodID(valveStateChangedStructClass, "", "(Ljava/lang/Integer;)V"); + if (valveStateChangedStructCtor == nullptr) + { + ChipLogError( + Zcl, "Could not find ChipEventStructs$ValveConfigurationAndControlClusterValveStateChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(valveStateChangedStructClass, valveStateChangedStructCtor, value_valveState); + + return value; + } + case Events::ValveFault::Id: { + Events::ValveFault::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_valveFault; + std::string value_valveFaultClassName = "java/lang/Integer"; + std::string value_valveFaultCtorSignature = "(I)V"; + jint jnivalue_valveFault = static_cast(cppValue.valveFault.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_valveFaultClassName.c_str(), value_valveFaultCtorSignature.c_str(), jnivalue_valveFault, value_valveFault); + + jclass valveFaultStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent", + valveFaultStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent"); + return nullptr; + } + jmethodID valveFaultStructCtor = env->GetMethodID(valveFaultStructClass, "", "(Ljava/lang/Integer;)V"); + if (valveFaultStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$ValveConfigurationAndControlClusterValveFaultEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(valveFaultStructClass, valveFaultStructCtor, value_valveFault); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::DemandResponseLoadControl::Id: { using namespace app::Clusters::DemandResponseLoadControl; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index c5809884403bc2..918f36641e0ea3 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -3043,6 +3043,141 @@ void CHIPIcdManagementClusterRegisterClientResponseCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, ICDCounter); } +CHIPIcdManagementClusterStayActiveResponseCallback::CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPIcdManagementClusterStayActiveResponseCallback::~CHIPIcdManagementClusterStayActiveResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPIcdManagementClusterStayActiveResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject PromisedActiveDuration; + std::string PromisedActiveDurationClassName = "java/lang/Long"; + std::string PromisedActiveDurationCtorSignature = "(J)V"; + jlong jniPromisedActiveDuration = static_cast(dataResponse.promisedActiveDuration); + chip::JniReferences::GetInstance().CreateBoxedObject(PromisedActiveDurationClassName.c_str(), + PromisedActiveDurationCtorSignature.c_str(), + jniPromisedActiveDuration, PromisedActiveDuration); + + env->CallVoidMethod(javaCallbackRef, javaMethod, PromisedActiveDuration); +} +CHIPOvenModeClusterChangeToModeResponseCallback::CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback) : + Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOvenModeClusterChangeToModeResponseCallback::~CHIPOvenModeClusterChangeToModeResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPOvenModeClusterChangeToModeResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/Optional;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject Status; + std::string StatusClassName = "java/lang/Integer"; + std::string StatusCtorSignature = "(I)V"; + jint jniStatus = static_cast(dataResponse.status); + chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), jniStatus, + Status); + jobject StatusText; + if (!dataResponse.statusText.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, StatusText); + } + else + { + jobject StatusTextInsideOptional; + LogErrorOnFailure( + chip::JniReferences::GetInstance().CharToStringUTF(dataResponse.statusText.Value(), StatusTextInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(StatusTextInsideOptional, StatusText); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, StatusText); +} CHIPLaundryWasherModeClusterChangeToModeResponseCallback::CHIPLaundryWasherModeClusterChangeToModeResponseCallback( jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 98afa14307e711..10a51c524cda8b 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -494,6 +494,36 @@ class CHIPIcdManagementClusterRegisterClientResponseCallback jobject javaCallbackRef; }; +class CHIPIcdManagementClusterStayActiveResponseCallback + : public Callback::Callback +{ +public: + CHIPIcdManagementClusterStayActiveResponseCallback(jobject javaCallback); + + ~CHIPIcdManagementClusterStayActiveResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + +class CHIPOvenModeClusterChangeToModeResponseCallback + : public Callback::Callback +{ +public: + CHIPOvenModeClusterChangeToModeResponseCallback(jobject javaCallback); + + ~CHIPOvenModeClusterChangeToModeResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPLaundryWasherModeClusterChangeToModeResponseCallback : public Callback::Callback { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index a432363b6915a8..b9daa797c64049 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -657,6 +657,135 @@ void CHIPScenesLastConfiguredByAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPScenesFabricSceneInfoAttributeCallback::CHIPScenesFabricSceneInfoAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPScenesFabricSceneInfoAttributeCallback::~CHIPScenesFabricSceneInfoAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_sceneCount; + std::string newElement_0_sceneCountClassName = "java/lang/Integer"; + std::string newElement_0_sceneCountCtorSignature = "(I)V"; + jint jninewElement_0_sceneCount = static_cast(entry_0.sceneCount); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneCountClassName.c_str(), + newElement_0_sceneCountCtorSignature.c_str(), + jninewElement_0_sceneCount, newElement_0_sceneCount); + jobject newElement_0_currentScene; + std::string newElement_0_currentSceneClassName = "java/lang/Integer"; + std::string newElement_0_currentSceneCtorSignature = "(I)V"; + jint jninewElement_0_currentScene = static_cast(entry_0.currentScene); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentSceneClassName.c_str(), + newElement_0_currentSceneCtorSignature.c_str(), + jninewElement_0_currentScene, newElement_0_currentScene); + jobject newElement_0_currentGroup; + std::string newElement_0_currentGroupClassName = "java/lang/Integer"; + std::string newElement_0_currentGroupCtorSignature = "(I)V"; + jint jninewElement_0_currentGroup = static_cast(entry_0.currentGroup); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_currentGroupClassName.c_str(), + newElement_0_currentGroupCtorSignature.c_str(), + jninewElement_0_currentGroup, newElement_0_currentGroup); + jobject newElement_0_sceneValid; + std::string newElement_0_sceneValidClassName = "java/lang/Boolean"; + std::string newElement_0_sceneValidCtorSignature = "(Z)V"; + jboolean jninewElement_0_sceneValid = static_cast(entry_0.sceneValid); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_sceneValidClassName.c_str(), + newElement_0_sceneValidCtorSignature.c_str(), + jninewElement_0_sceneValid, newElement_0_sceneValid); + jobject newElement_0_remainingCapacity; + std::string newElement_0_remainingCapacityClassName = "java/lang/Integer"; + std::string newElement_0_remainingCapacityCtorSignature = "(I)V"; + jint jninewElement_0_remainingCapacity = static_cast(entry_0.remainingCapacity); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_remainingCapacityClassName.c_str(), newElement_0_remainingCapacityCtorSignature.c_str(), + jninewElement_0_remainingCapacity, newElement_0_remainingCapacity); + jobject newElement_0_fabricIndex; + std::string newElement_0_fabricIndexClassName = "java/lang/Integer"; + std::string newElement_0_fabricIndexCtorSignature = "(I)V"; + jint jninewElement_0_fabricIndex = static_cast(entry_0.fabricIndex); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIndexClassName.c_str(), + newElement_0_fabricIndexCtorSignature.c_str(), + jninewElement_0_fabricIndex, newElement_0_fabricIndex); + + jclass sceneInfoStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ScenesClusterSceneInfoStruct", + sceneInfoStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesClusterSceneInfoStruct"); + return; + } + jmethodID sceneInfoStructStructCtor_1 = env->GetMethodID(sceneInfoStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/" + "lang/Boolean;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (sceneInfoStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ScenesClusterSceneInfoStruct constructor"); + return; + } + + newElement_0 = env->NewObject(sceneInfoStructStructClass_1, sceneInfoStructStructCtor_1, newElement_0_sceneCount, + newElement_0_currentScene, newElement_0_currentGroup, newElement_0_sceneValid, + newElement_0_remainingCapacity, newElement_0_fabricIndex); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) @@ -19825,75 +19954,8 @@ void CHIPTimerAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); - - // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. - javaCallbackRef = cppCallback.get()->javaCallbackRef; - VerifyOrReturn(javaCallbackRef != nullptr, - ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); - - jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); - } - - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); -} - -CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeSupportedModesAttributeCallback::CHIPOvenModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19909,7 +19971,7 @@ CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttri } } -CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +CHIPOvenModeSupportedModesAttributeCallback::~CHIPOvenModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -19920,9 +19982,9 @@ CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( +void CHIPOvenModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -19931,8 +19993,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -19959,21 +20021,30 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_semanticTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); - while (iter_newElement_0_semanticTags_2.Next()) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) { - auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeCtorSignature = "(I)V"; - jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), - newElement_2_mfgCodeCtorSignature.c_str(), - jninewElement_2_mfgCode, newElement_2_mfgCode); + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -19982,45 +20053,45 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass semanticTagStructStructClass_3; + jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeTagStruct"); return; } - jmethodID semanticTagStructStructCtor_3 = - env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (semanticTagStructStructCtor_3 == nullptr) + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeTagStruct constructor"); return; } - newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, - newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$OvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$OvenModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OvenModeClusterModeOptionStruct constructor"); return; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_semanticTags); + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20028,8 +20099,8 @@ void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeStartUpModeAttributeCallback::CHIPOvenModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20045,7 +20116,7 @@ CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCa } } -CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() +CHIPOvenModeStartUpModeAttributeCallback::~CHIPOvenModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20056,7 +20127,7 @@ CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPOvenModeStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20064,8 +20135,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20093,8 +20164,8 @@ void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, cons env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeOnModeAttributeCallback::CHIPOvenModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20110,7 +20181,7 @@ CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(job } } -CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() +CHIPOvenModeOnModeAttributeCallback::~CHIPOvenModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20121,7 +20192,7 @@ CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPOvenModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20129,8 +20200,8 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20158,9 +20229,9 @@ void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeGeneratedCommandListAttributeCallback::CHIPOvenModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20176,7 +20247,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedComm } } -CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() +CHIPOvenModeGeneratedCommandListAttributeCallback::~CHIPOvenModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20187,7 +20258,7 @@ CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPOvenModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20197,8 +20268,8 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20229,9 +20300,9 @@ void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeAcceptedCommandListAttributeCallback::CHIPOvenModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20247,7 +20318,7 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedComman } } -CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() +CHIPOvenModeAcceptedCommandListAttributeCallback::~CHIPOvenModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20258,8 +20329,8 @@ CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAcceptedCommandListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20268,8 +20339,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20300,8 +20371,8 @@ void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeEventListAttributeCallback::CHIPOvenModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20317,7 +20388,7 @@ CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallba } } -CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() +CHIPOvenModeEventListAttributeCallback::~CHIPOvenModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20328,8 +20399,8 @@ CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20338,8 +20409,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20370,8 +20441,8 @@ void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPOvenModeAttributeListAttributeCallback::CHIPOvenModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20387,7 +20458,7 @@ CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttribu } } -CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() +CHIPOvenModeAttributeListAttributeCallback::~CHIPOvenModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20398,8 +20469,8 @@ CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOvenModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20408,8 +20479,8 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20440,10 +20511,9 @@ void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectStandardNamespaceAttributeCallback::CHIPModeSelectStandardNamespaceAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20459,7 +20529,7 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSuppo } } -CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() +CHIPModeSelectStandardNamespaceAttributeCallback::~CHIPModeSelectStandardNamespaceAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20470,10 +20540,75 @@ CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( +void CHIPModeSelectStandardNamespaceAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPModeSelectSupportedModesAttributeCallback::CHIPModeSelectSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPModeSelectSupportedModesAttributeCallback::~CHIPModeSelectSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPModeSelectSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & - list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20482,8 +20617,8 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20510,30 +20645,21 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( jint jninewElement_0_mode = static_cast(entry_0.mode); chip::JniReferences::GetInstance().CreateBoxedObject( newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + jobject newElement_0_semanticTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_semanticTags); - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) + auto iter_newElement_0_semanticTags_2 = entry_0.semanticTags.begin(); + while (iter_newElement_0_semanticTags_2.Next()) { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + auto & entry_2 = iter_newElement_0_semanticTags_2.GetValue(); jobject newElement_2; jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } + std::string newElement_2_mfgCodeClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeCtorSignature = "(I)V"; + jint jninewElement_2_mfgCode = static_cast(entry_2.mfgCode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_mfgCodeClassName.c_str(), + newElement_2_mfgCodeCtorSignature.c_str(), + jninewElement_2_mfgCode, newElement_2_mfgCode); jobject newElement_2_value; std::string newElement_2_valueClassName = "java/lang/Integer"; std::string newElement_2_valueCtorSignature = "(I)V"; @@ -20542,45 +20668,45 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( newElement_2_valueCtorSignature.c_str(), jninewElement_2_value, newElement_2_value); - jclass modeTagStructStructClass_3; + jclass semanticTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterSemanticTagStruct", semanticTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterSemanticTagStruct"); return; } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) + jmethodID semanticTagStructStructCtor_3 = + env->GetMethodID(semanticTagStructStructClass_3, "", "(Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (semanticTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterSemanticTagStruct constructor"); return; } - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + newElement_2 = env->NewObject(semanticTagStructStructClass_3, semanticTagStructStructCtor_3, newElement_2_mfgCode, + newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_semanticTags, newElement_2); } jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ModeSelectClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ModeSelectClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ModeSelectClusterModeOptionStruct constructor"); return; } newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + newElement_0_mode, newElement_0_semanticTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -20588,9 +20714,8 @@ void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectStartUpModeAttributeCallback::CHIPModeSelectStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20606,7 +20731,7 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpM } } -CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() +CHIPModeSelectStartUpModeAttributeCallback::~CHIPModeSelectStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20617,8 +20742,7 @@ CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPModeSelectStartUpModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20626,8 +20750,8 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20655,8 +20779,8 @@ void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectOnModeAttributeCallback::CHIPModeSelectOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20672,7 +20796,7 @@ CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttribu } } -CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() +CHIPModeSelectOnModeAttributeCallback::~CHIPModeSelectOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20683,7 +20807,7 @@ CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPModeSelectOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20691,8 +20815,8 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20720,10 +20844,9 @@ void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, co env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectGeneratedCommandListAttributeCallback::CHIPModeSelectGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20739,7 +20862,7 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherMod } } -CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() +CHIPModeSelectGeneratedCommandListAttributeCallback::~CHIPModeSelectGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20750,7 +20873,7 @@ CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPModeSelectGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20760,8 +20883,8 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20792,10 +20915,9 @@ void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPModeSelectAcceptedCommandListAttributeCallback::CHIPModeSelectAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20811,7 +20933,7 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherMode } } -CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() +CHIPModeSelectAcceptedCommandListAttributeCallback::~CHIPModeSelectAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20822,7 +20944,7 @@ CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPModeSelectAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -20832,8 +20954,8 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20864,9 +20986,8 @@ void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectEventListAttributeCallback::CHIPModeSelectEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20882,7 +21003,7 @@ CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListA } } -CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() +CHIPModeSelectEventListAttributeCallback::~CHIPModeSelectEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20893,8 +21014,8 @@ CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20903,8 +21024,8 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -20935,9 +21056,8 @@ void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPModeSelectAttributeListAttributeCallback::CHIPModeSelectAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20953,7 +21073,7 @@ CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttrib } } -CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() +CHIPModeSelectAttributeListAttributeCallback::~CHIPModeSelectAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -20964,8 +21084,8 @@ CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPModeSelectAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -20974,8 +21094,8 @@ void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21006,10 +21126,9 @@ void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherModeSupportedModesAttributeCallback::CHIPLaundryWasherModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21026,8 +21145,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() +CHIPLaundryWasherModeSupportedModesAttributeCallback::~CHIPLaundryWasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21038,10 +21156,10 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallba env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21050,9 +21168,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21113,21 +21230,17 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", - modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError( - Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeTagStruct"); return; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeTagStruct constructor"); return; } @@ -21138,21 +21251,17 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", - modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$LaundryWasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$LaundryWasherModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$LaundryWasherModeClusterModeOptionStruct constructor"); return; } @@ -21165,11 +21274,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeC env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPLaundryWasherModeStartUpModeAttributeCallback::CHIPLaundryWasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21185,8 +21292,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback( } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() +CHIPLaundryWasherModeStartUpModeAttributeCallback::~CHIPLaundryWasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21197,8 +21303,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21206,9 +21312,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21236,11 +21341,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCall env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPLaundryWasherModeOnModeAttributeCallback::CHIPLaundryWasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21256,8 +21358,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobje } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() +CHIPLaundryWasherModeOnModeAttributeCallback::~CHIPLaundryWasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21268,8 +21369,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21277,9 +21377,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21307,10 +21406,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CHIPLaundryWasherModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21327,8 +21425,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() +CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::~CHIPLaundryWasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21339,7 +21436,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21349,11 +21446,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21384,10 +21478,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttr env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CHIPLaundryWasherModeAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21404,8 +21497,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() +CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::~CHIPLaundryWasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21416,7 +21508,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21426,11 +21518,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback( - reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21461,11 +21550,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttri env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), - keepAlive(keepAlive) +CHIPLaundryWasherModeEventListAttributeCallback::CHIPLaundryWasherModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21481,8 +21568,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jo } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() +CHIPLaundryWasherModeEventListAttributeCallback::~CHIPLaundryWasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21493,8 +21579,8 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21503,9 +21589,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21536,11 +21621,9 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallba env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback( - CallbackFn, this), - keepAlive(keepAlive) +CHIPLaundryWasherModeAttributeListAttributeCallback::CHIPLaundryWasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21556,8 +21639,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac } } -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::~ -CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() +CHIPLaundryWasherModeAttributeListAttributeCallback::~CHIPLaundryWasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21568,7 +21650,7 @@ CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( +void CHIPLaundryWasherModeAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21578,9 +21660,8 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21611,9 +21692,10 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21630,7 +21712,8 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsS } } -CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21641,8 +21724,10 @@ CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControls env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21651,8 +21736,9 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21671,7 +21757,93 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct", + modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct", + modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$RefrigeratorAndTemperatureControlledCabinetModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -21679,9 +21851,10 @@ void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21698,7 +21871,8 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherCon } } -CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21709,8 +21883,8 @@ CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherCo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeStartUpModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21718,8 +21892,9 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21747,9 +21922,10 @@ void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21766,7 +21942,8 @@ CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherCont } } -CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21777,9 +21954,8 @@ CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21787,9 +21963,9 @@ void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21797,32 +21973,30 @@ void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Integer"; - std::string newElement_0CtorSignature = "(I)V"; - jint jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), - jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21839,7 +22013,8 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWashe } } -CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21850,7 +22025,7 @@ CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWash env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21860,8 +22035,11 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21892,9 +22070,10 @@ void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21911,7 +22090,8 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasher } } -CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21922,7 +22102,7 @@ CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWashe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21932,8 +22112,11 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback( + reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21964,9 +22147,11 @@ void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21982,7 +22167,8 @@ CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEv } } -CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21993,7 +22179,7 @@ CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsE env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22003,8 +22189,9 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22035,9 +22222,10 @@ void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback:: +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback( + CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -22054,7 +22242,8 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherContro } } -CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::~ +CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22065,7 +22254,7 @@ CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherContr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22075,8 +22264,9 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22107,8 +22297,10 @@ void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22124,7 +22316,7 @@ CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttri } } -CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22135,9 +22327,8 @@ CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22146,8 +22337,8 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22166,85 +22357,7 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22252,8 +22365,10 @@ void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22269,7 +22384,7 @@ CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(job } } -CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22280,7 +22395,8 @@ CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22288,8 +22404,8 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22317,9 +22433,10 @@ void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chi env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22335,7 +22452,7 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedComm } } -CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22346,8 +22463,9 @@ CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22356,8 +22474,8 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22376,11 +22494,11 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + jint jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), + jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -22388,9 +22506,10 @@ void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22406,7 +22525,7 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedComman } } -CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22417,7 +22536,7 @@ CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22427,8 +22546,8 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22459,8 +22578,10 @@ void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22476,7 +22597,7 @@ CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallba } } -CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22487,8 +22608,8 @@ CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22497,8 +22618,8 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22529,8 +22650,9 @@ void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22546,7 +22668,7 @@ CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttribu } } -CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() +CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22557,8 +22679,8 @@ CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22567,8 +22689,8 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22599,9 +22721,10 @@ void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22617,7 +22740,7 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesA } } -CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() +CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22628,9 +22751,79 @@ CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModes env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcRunModeSupportedModesAttributeCallback::CHIPRvcRunModeSupportedModesAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcRunModeSupportedModesAttributeCallback::~CHIPRvcRunModeSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcRunModeSupportedModesAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList & list) + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22639,8 +22832,8 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22701,17 +22894,17 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( jclass modeTagStructStructClass_3; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeTagStruct", modeTagStructStructClass_3); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeTagStruct"); return; } jmethodID modeTagStructStructCtor_3 = env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); if (modeTagStructStructCtor_3 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeTagStruct constructor"); return; } @@ -22722,17 +22915,17 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( jclass modeOptionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$RvcRunModeClusterModeOptionStruct", modeOptionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$RvcRunModeClusterModeOptionStruct"); return; } jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); if (modeOptionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$RvcRunModeClusterModeOptionStruct constructor"); return; } @@ -22745,8 +22938,8 @@ void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeOnModeAttributeCallback::CHIPRvcRunModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22762,7 +22955,7 @@ CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback } } -CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() +CHIPRvcRunModeOnModeAttributeCallback::~CHIPRvcRunModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22773,7 +22966,7 @@ CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallbac env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRvcRunModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22781,8 +22974,8 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22810,10 +23003,9 @@ void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const c env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeGeneratedCommandListAttributeCallback::CHIPRvcRunModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22829,7 +23021,7 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGenerated } } -CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() +CHIPRvcRunModeGeneratedCommandListAttributeCallback::~CHIPRvcRunModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22840,7 +23032,7 @@ CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRvcRunModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22850,8 +23042,8 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22882,10 +23074,9 @@ void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcRunModeAcceptedCommandListAttributeCallback::CHIPRvcRunModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22901,7 +23092,7 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCo } } -CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() +CHIPRvcRunModeAcceptedCommandListAttributeCallback::~CHIPRvcRunModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22912,7 +23103,7 @@ CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRvcRunModeAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -22922,8 +23113,8 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -22954,8 +23145,8 @@ void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeEventListAttributeCallback::CHIPRvcRunModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22971,7 +23162,7 @@ CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCa } } -CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() +CHIPRvcRunModeEventListAttributeCallback::~CHIPRvcRunModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -22982,8 +23173,8 @@ CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -22992,8 +23183,8 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23024,9 +23215,8 @@ void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcRunModeAttributeListAttributeCallback::CHIPRvcRunModeAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23042,7 +23232,7 @@ CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAtt } } -CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() +CHIPRvcRunModeAttributeListAttributeCallback::~CHIPRvcRunModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23053,8 +23243,8 @@ CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcRunModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23063,8 +23253,8 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23095,10 +23285,9 @@ void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcCleanModeSupportedModesAttributeCallback::CHIPRvcCleanModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23114,8 +23303,7 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCa } } -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::~ -CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() +CHIPRvcCleanModeSupportedModesAttributeCallback::~CHIPRvcCleanModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23126,8 +23314,9 @@ CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23136,8 +23325,8 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23156,18 +23345,94 @@ void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::Callback { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); -CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcCleanModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcCleanModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcCleanModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcCleanModeOnModeAttributeCallback::CHIPRvcCleanModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23183,7 +23448,7 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureCont } } -CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() +CHIPRvcCleanModeOnModeAttributeCallback::~CHIPRvcCleanModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23194,8 +23459,7 @@ CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureCon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23203,9 +23467,8 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23213,32 +23476,29 @@ void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CHIPRvcCleanModeGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23255,7 +23515,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureContr } } -CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() +CHIPRvcCleanModeGeneratedCommandListAttributeCallback::~CHIPRvcCleanModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23266,7 +23526,7 @@ CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureCont env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRvcCleanModeGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -23276,8 +23536,8 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23308,9 +23568,10 @@ void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CHIPRvcCleanModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23326,7 +23587,7 @@ CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventLis } } -CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() +CHIPRvcCleanModeAcceptedCommandListAttributeCallback::~CHIPRvcCleanModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23337,8 +23598,8 @@ CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23347,8 +23608,8 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23379,10 +23640,8 @@ void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcCleanModeEventListAttributeCallback::CHIPRvcCleanModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23398,7 +23657,7 @@ CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttr } } -CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() +CHIPRvcCleanModeEventListAttributeCallback::~CHIPRvcCleanModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23409,8 +23668,8 @@ CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAtt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23419,8 +23678,8 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23451,10 +23710,9 @@ void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcCleanModeAttributeListAttributeCallback::CHIPRvcCleanModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23470,7 +23728,7 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlar } } -CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() +CHIPRvcCleanModeAttributeListAttributeCallback::~CHIPRvcCleanModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23481,8 +23739,8 @@ CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAla env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcCleanModeAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23491,8 +23749,8 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23523,9 +23781,9 @@ void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback:: +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -23542,7 +23800,8 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarm } } -CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::~ +CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23553,8 +23812,8 @@ CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlSupportedTemperatureLevelsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23563,8 +23822,8 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23583,11 +23842,7 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0, newElement_0)); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23595,9 +23850,10 @@ void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlGeneratedCommandListAttributeCallback::CHIPTemperatureControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23613,7 +23869,7 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListA } } -CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() +CHIPTemperatureControlGeneratedCommandListAttributeCallback::~CHIPTemperatureControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23624,8 +23880,8 @@ CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23634,8 +23890,8 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23666,9 +23922,10 @@ void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlAcceptedCommandListAttributeCallback::CHIPTemperatureControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23684,7 +23941,7 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttrib } } -CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() +CHIPTemperatureControlAcceptedCommandListAttributeCallback::~CHIPTemperatureControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23695,8 +23952,8 @@ CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23705,8 +23962,8 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23737,9 +23994,9 @@ void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlEventListAttributeCallback::CHIPTemperatureControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23755,7 +24012,7 @@ CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedMo } } -CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() +CHIPTemperatureControlEventListAttributeCallback::~CHIPTemperatureControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23766,9 +24023,8 @@ CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedM env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPTemperatureControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23777,8 +24033,8 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23797,85 +24053,11 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -23883,9 +24065,10 @@ void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPTemperatureControlAttributeListAttributeCallback::CHIPTemperatureControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23901,7 +24084,7 @@ CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAtt } } -CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() +CHIPTemperatureControlAttributeListAttributeCallback::~CHIPTemperatureControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23912,8 +24095,8 @@ CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTemperatureControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23921,8 +24104,9 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23930,28 +24114,33 @@ void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23967,7 +24156,7 @@ CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCall } } -CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() +CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::~CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -23978,7 +24167,8 @@ CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCal env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) +void CHIPRefrigeratorAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -23986,8 +24176,9 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -23995,29 +24186,32 @@ void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24034,7 +24228,7 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGener } } -CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() +CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::~CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24045,7 +24239,7 @@ CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPRefrigeratorAlarmAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -24055,8 +24249,8 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24087,10 +24281,9 @@ void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRefrigeratorAlarmEventListAttributeCallback::CHIPRefrigeratorAlarmEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24106,7 +24299,7 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAccept } } -CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() +CHIPRefrigeratorAlarmEventListAttributeCallback::~CHIPRefrigeratorAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24117,8 +24310,8 @@ CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24127,8 +24320,8 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24159,8 +24352,9 @@ void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRefrigeratorAlarmAttributeListAttributeCallback::CHIPRefrigeratorAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24176,7 +24370,7 @@ CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttribu } } -CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() +CHIPRefrigeratorAlarmAttributeListAttributeCallback::~CHIPRefrigeratorAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24187,8 +24381,8 @@ CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRefrigeratorAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24197,8 +24391,8 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24229,9 +24423,9 @@ void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeSupportedModesAttributeCallback::CHIPDishwasherModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24247,7 +24441,7 @@ CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeLis } } -CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() +CHIPDishwasherModeSupportedModesAttributeCallback::~CHIPDishwasherModeSupportedModesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24258,8 +24452,9 @@ CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24268,8 +24463,8 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24288,21 +24483,95 @@ void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); - } - - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); -} + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); -CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$DishwasherModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$DishwasherModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$DishwasherModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherModeStartUpModeAttributeCallback::CHIPDishwasherModeStartUpModeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24318,7 +24587,7 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedComm } } -CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() +CHIPDishwasherModeStartUpModeAttributeCallback::~CHIPDishwasherModeStartUpModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24329,8 +24598,8 @@ CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCom env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeStartUpModeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24338,9 +24607,8 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24348,32 +24616,28 @@ void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeOnModeAttributeCallback::CHIPDishwasherModeOnModeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24389,7 +24653,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedComman } } -CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() +CHIPDishwasherModeOnModeAttributeCallback::~CHIPDishwasherModeOnModeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24400,8 +24664,7 @@ CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedComma env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeOnModeAttributeCallback::CallbackFn(void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24409,9 +24672,8 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24419,31 +24681,30 @@ void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeGeneratedCommandListAttributeCallback::CHIPDishwasherModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24459,7 +24720,7 @@ CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallba } } -CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() +CHIPDishwasherModeGeneratedCommandListAttributeCallback::~CHIPDishwasherModeGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24470,8 +24731,8 @@ CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24480,8 +24741,8 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24512,8 +24773,10 @@ void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherModeAcceptedCommandListAttributeCallback::CHIPDishwasherModeAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24529,7 +24792,7 @@ CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttribu } } -CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() +CHIPDishwasherModeAcceptedCommandListAttributeCallback::~CHIPDishwasherModeAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24540,8 +24803,8 @@ CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24550,8 +24813,8 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24582,10 +24845,8 @@ void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeEventListAttributeCallback::CHIPDishwasherModeEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24601,7 +24862,7 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGenerated } } -CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() +CHIPDishwasherModeEventListAttributeCallback::~CHIPDishwasherModeEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24612,8 +24873,8 @@ CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGenerate env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24622,8 +24883,8 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24654,10 +24915,9 @@ void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherModeAttributeListAttributeCallback::CHIPDishwasherModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24673,7 +24933,7 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCo } } -CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() +CHIPDishwasherModeAttributeListAttributeCallback::~CHIPDishwasherModeAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24684,8 +24944,8 @@ CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24694,8 +24954,8 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24726,8 +24986,9 @@ void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityGeneratedCommandListAttributeCallback::CHIPAirQualityGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24743,7 +25004,7 @@ CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCa } } -CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() +CHIPAirQualityGeneratedCommandListAttributeCallback::~CHIPAirQualityGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24754,8 +25015,8 @@ CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24764,8 +25025,8 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24796,9 +25057,9 @@ void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPAirQualityAcceptedCommandListAttributeCallback::CHIPAirQualityAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24814,7 +25075,7 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAtt } } -CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() +CHIPAirQualityAcceptedCommandListAttributeCallback::~CHIPAirQualityAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24825,9 +25086,9 @@ CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) -{ +void CHIPAirQualityAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -24835,8 +25096,8 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24867,10 +25128,8 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAirQualityEventListAttributeCallback::CHIPAirQualityEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24886,7 +25145,7 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGen } } -CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() +CHIPAirQualityEventListAttributeCallback::~CHIPAirQualityEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24897,8 +25156,8 @@ CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGe env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24907,8 +25166,8 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24939,10 +25198,8 @@ void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPAirQualityAttributeListAttributeCallback::CHIPAirQualityAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24958,7 +25215,7 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcce } } -CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() +CHIPAirQualityAttributeListAttributeCallback::~CHIPAirQualityAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -24969,8 +25226,8 @@ CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcc env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPAirQualityAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -24979,8 +25236,8 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25011,8 +25268,10 @@ void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25028,7 +25287,7 @@ CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttri } } -CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() +CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::~CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25039,8 +25298,8 @@ CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25049,8 +25308,8 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25081,9 +25340,10 @@ void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25099,7 +25359,7 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeL } } -CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() +CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::~CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25110,8 +25370,8 @@ CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttribute env->DeleteGlobalRef(javaCallbackRef); } -void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25120,8 +25380,8 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25152,10 +25412,8 @@ void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSmokeCoAlarmEventListAttributeCallback::CHIPSmokeCoAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25171,7 +25429,7 @@ CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSuppo } } -CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() +CHIPSmokeCoAlarmEventListAttributeCallback::~CHIPSmokeCoAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25182,10 +25440,8 @@ CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupp env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList & - list) +void CHIPSmokeCoAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25194,8 +25450,8 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25214,85 +25470,11 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_label; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); - jobject newElement_0_mode; - std::string newElement_0_modeClassName = "java/lang/Integer"; - std::string newElement_0_modeCtorSignature = "(I)V"; - jint jninewElement_0_mode = static_cast(entry_0.mode); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); - jobject newElement_0_modeTags; - chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); - - auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); - while (iter_newElement_0_modeTags_2.Next()) - { - auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); - jobject newElement_2; - jobject newElement_2_mfgCode; - if (!entry_2.mfgCode.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); - } - else - { - jobject newElement_2_mfgCodeInsideOptional; - std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), - jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); - } - jobject newElement_2_value; - std::string newElement_2_valueClassName = "java/lang/Integer"; - std::string newElement_2_valueCtorSignature = "(I)V"; - jint jninewElement_2_value = static_cast(entry_2.value); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), - newElement_2_valueCtorSignature.c_str(), - jninewElement_2_value, newElement_2_value); - - jclass modeTagStructStructClass_3; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); - return; - } - jmethodID modeTagStructStructCtor_3 = - env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); - if (modeTagStructStructCtor_3 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); - return; - } - - newElement_2 = - env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); - chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); - } - - jclass modeOptionStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); - return; - } - jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", - "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); - if (modeOptionStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); - return; - } - - newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, - newElement_0_mode, newElement_0_modeTags); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -25300,10 +25482,9 @@ void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPSmokeCoAlarmAttributeListAttributeCallback::CHIPSmokeCoAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25319,7 +25500,7 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenMod } } -CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() +CHIPSmokeCoAlarmAttributeListAttributeCallback::~CHIPSmokeCoAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25330,8 +25511,8 @@ CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25340,8 +25521,8 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25372,9 +25553,9 @@ void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25391,7 +25572,7 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenMode } } -CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25402,7 +25583,7 @@ CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenMod env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25412,8 +25593,8 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25444,9 +25625,10 @@ void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25462,7 +25644,7 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListA } } -CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25473,8 +25655,8 @@ CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25483,8 +25665,8 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25515,9 +25697,8 @@ void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25533,7 +25714,7 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttrib } } -CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() +CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25544,8 +25725,8 @@ CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttri env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25554,8 +25735,8 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25586,10 +25767,9 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25605,7 +25785,7 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOven } } -CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() +CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25616,8 +25796,8 @@ CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25626,8 +25806,8 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25658,9 +25838,1652 @@ void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CHIPMicrowaveOvenModeSupportedModesAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenModeSupportedModesAttributeCallback::~CHIPMicrowaveOvenModeSupportedModesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenModeSupportedModesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_label; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.label, newElement_0_label)); + jobject newElement_0_mode; + std::string newElement_0_modeClassName = "java/lang/Integer"; + std::string newElement_0_modeCtorSignature = "(I)V"; + jint jninewElement_0_mode = static_cast(entry_0.mode); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_modeClassName.c_str(), newElement_0_modeCtorSignature.c_str(), jninewElement_0_mode, newElement_0_mode); + jobject newElement_0_modeTags; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_modeTags); + + auto iter_newElement_0_modeTags_2 = entry_0.modeTags.begin(); + while (iter_newElement_0_modeTags_2.Next()) + { + auto & entry_2 = iter_newElement_0_modeTags_2.GetValue(); + jobject newElement_2; + jobject newElement_2_mfgCode; + if (!entry_2.mfgCode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_mfgCode); + } + else + { + jobject newElement_2_mfgCodeInsideOptional; + std::string newElement_2_mfgCodeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_mfgCodeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_mfgCodeInsideOptional = static_cast(entry_2.mfgCode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_mfgCodeInsideOptionalClassName.c_str(), newElement_2_mfgCodeInsideOptionalCtorSignature.c_str(), + jninewElement_2_mfgCodeInsideOptional, newElement_2_mfgCodeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_mfgCodeInsideOptional, newElement_2_mfgCode); + } + jobject newElement_2_value; + std::string newElement_2_valueClassName = "java/lang/Integer"; + std::string newElement_2_valueCtorSignature = "(I)V"; + jint jninewElement_2_value = static_cast(entry_2.value); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_valueClassName.c_str(), + newElement_2_valueCtorSignature.c_str(), + jninewElement_2_value, newElement_2_value); + + jclass modeTagStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeTagStruct", modeTagStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeTagStruct"); + return; + } + jmethodID modeTagStructStructCtor_3 = + env->GetMethodID(modeTagStructStructClass_3, "", "(Ljava/util/Optional;Ljava/lang/Integer;)V"); + if (modeTagStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeTagStruct constructor"); + return; + } + + newElement_2 = + env->NewObject(modeTagStructStructClass_3, modeTagStructStructCtor_3, newElement_2_mfgCode, newElement_2_value); + chip::JniReferences::GetInstance().AddToList(newElement_0_modeTags, newElement_2); + } + + jclass modeOptionStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$MicrowaveOvenModeClusterModeOptionStruct", modeOptionStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$MicrowaveOvenModeClusterModeOptionStruct"); + return; + } + jmethodID modeOptionStructStructCtor_1 = env->GetMethodID(modeOptionStructStructClass_1, "", + "(Ljava/lang/String;Ljava/lang/Integer;Ljava/util/ArrayList;)V"); + if (modeOptionStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$MicrowaveOvenModeClusterModeOptionStruct constructor"); + return; + } + + newElement_0 = env->NewObject(modeOptionStructStructClass_1, modeOptionStructStructCtor_1, newElement_0_label, + newElement_0_mode, newElement_0_modeTags); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenModeGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenModeAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenModeEventListAttributeCallback::CHIPMicrowaveOvenModeEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenModeEventListAttributeCallback::~CHIPMicrowaveOvenModeEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenModeEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenModeAttributeListAttributeCallback::CHIPMicrowaveOvenModeAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenModeAttributeListAttributeCallback::~CHIPMicrowaveOvenModeAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::~CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + if (list.IsNull()) + { + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); + return; + } + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + if (list.IsNull()) + { + arrayListObj = nullptr; + } + else + { + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_1 = list.Value().begin(); + while (iter_arrayListObj_1.Next()) + { + auto & entry_1 = iter_arrayListObj_1.GetValue(); + jobject newElement_1; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); + } + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_operationalStateID; + std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; + std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; + jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), + jninewElement_0_operationalStateID, newElement_0_operationalStateID); + jobject newElement_0_operationalStateLabel; + if (!entry_0.operationalStateLabel.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); + } + else + { + jobject newElement_0_operationalStateLabelInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), + newElement_0_operationalStateLabelInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, + newElement_0_operationalStateLabel); + } + + jclass operationalStateStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", + operationalStateStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); + return; + } + jmethodID operationalStateStructStructCtor_1 = + env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); + if (operationalStateStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); + return; + } + + newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, + newElement_0_operationalStateID, newElement_0_operationalStateLabel); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -25677,7 +27500,7 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CHIPMicrowaveOvenC } } -CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback() +CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25688,7 +27511,7 @@ CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::~CHIPMicrowaveOven env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -25698,8 +27521,8 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25730,9 +27553,10 @@ void CHIPMicrowaveOvenControlAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25748,7 +27572,7 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::CHIPMicrowaveOvenControlEven } } -CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEventListAttributeCallback() +CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25759,8 +27583,8 @@ CHIPMicrowaveOvenControlEventListAttributeCallback::~CHIPMicrowaveOvenControlEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25769,8 +27593,8 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25801,10 +27625,9 @@ void CHIPMicrowaveOvenControlEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControlAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25820,7 +27643,7 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::CHIPMicrowaveOvenControl } } -CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenControlAttributeListAttributeCallback() +CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25831,8 +27654,8 @@ CHIPMicrowaveOvenControlAttributeListAttributeCallback::~CHIPMicrowaveOvenContro env->DeleteGlobalRef(javaCallbackRef); } -void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25841,8 +27664,8 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25873,9 +27696,10 @@ void CHIPMicrowaveOvenControlAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25891,7 +27715,7 @@ CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAtt } } -CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAttributeCallback() +CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25902,8 +27726,8 @@ CHIPOperationalStatePhaseListAttributeCallback::~CHIPOperationalStatePhaseListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25912,8 +27736,8 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25925,31 +27749,29 @@ void CHIPOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25965,7 +27787,7 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::CHIPOperationalStateCurrentPh } } -CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentPhaseAttributeCallback() +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -25976,8 +27798,8 @@ CHIPOperationalStateCurrentPhaseAttributeCallback::~CHIPOperationalStateCurrentP env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -25985,8 +27807,8 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -25994,7 +27816,7 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -26004,19 +27826,20 @@ void CHIPOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * contex } else { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26032,7 +27855,7 @@ CHIPOperationalStateCountdownTimeAttributeCallback::CHIPOperationalStateCountdow } } -CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdownTimeAttributeCallback() +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26043,8 +27866,10 @@ CHIPOperationalStateCountdownTimeAttributeCallback::~CHIPOperationalStateCountdo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26052,8 +27877,9 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26061,29 +27887,57 @@ void CHIPOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + return; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + return; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateOperationalStateListAttributeCallback( +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26100,7 +27954,7 @@ CHIPOperationalStateOperationalStateListAttributeCallback::CHIPOperationalStateO } } -CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalStateOperationalStateListAttributeCallback() +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26111,10 +27965,8 @@ CHIPOperationalStateOperationalStateListAttributeCallback::~CHIPOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalState::Structs::OperationalStateStruct::DecodableType> & list) +void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26123,8 +27975,8 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26143,46 +27995,11 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalStateClusterOperationalStateStruct"); - return; - } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26190,9 +28007,9 @@ void CHIPOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateGeneratedCommandListAttributeCallback( +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26209,7 +28026,7 @@ CHIPOperationalStateGeneratedCommandListAttributeCallback::CHIPOperationalStateG } } -CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalStateGeneratedCommandListAttributeCallback() +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26220,7 +28037,7 @@ CHIPOperationalStateGeneratedCommandListAttributeCallback::~CHIPOperationalState env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26230,8 +28047,8 @@ void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26262,10 +28079,9 @@ void CHIPOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), - keepAlive(keepAlive) +CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26281,7 +28097,7 @@ CHIPOperationalStateAcceptedCommandListAttributeCallback::CHIPOperationalStateAc } } -CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateAcceptedCommandListAttributeCallback() +CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26292,8 +28108,8 @@ CHIPOperationalStateAcceptedCommandListAttributeCallback::~CHIPOperationalStateA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26302,8 +28118,8 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26334,9 +28150,10 @@ void CHIPOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26352,7 +28169,7 @@ CHIPOperationalStateEventListAttributeCallback::CHIPOperationalStateEventListAtt } } -CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAttributeCallback() +CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26363,8 +28180,8 @@ CHIPOperationalStateEventListAttributeCallback::~CHIPOperationalStateEventListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26373,8 +28190,8 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26405,9 +28222,10 @@ void CHIPOperationalStateEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26423,7 +28241,8 @@ CHIPOperationalStateAttributeListAttributeCallback::CHIPOperationalStateAttribut } } -CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttributeListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26434,8 +28253,8 @@ CHIPOperationalStateAttributeListAttributeCallback::~CHIPOperationalStateAttribu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26443,9 +28262,82 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, + this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26464,11 +28356,37 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return; + } + jmethodID replacementProductStructStructCtor_1 = + env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); + if (replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + return; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26476,9 +28394,10 @@ void CHIPOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26494,7 +28413,8 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::CHIPRvcOperationalStatePhaseL } } -CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhaseListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26505,8 +28425,8 @@ CHIPRvcOperationalStatePhaseListAttributeCallback::~CHIPRvcOperationalStatePhase env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable> & list) +void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26515,8 +28435,8 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26528,31 +28448,28 @@ void CHIPRvcOperationalStatePhaseListAttributeCallback::CallbackFn( VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject arrayListObj; - if (list.IsNull()) - { - arrayListObj = nullptr; - } - else - { - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - auto iter_arrayListObj_1 = list.Value().begin(); - while (iter_arrayListObj_1.Next()) - { - auto & entry_1 = iter_arrayListObj_1.GetValue(); - jobject newElement_1; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1, newElement_1)); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_1); - } + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } env->ExceptionClear(); env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCurrentPhaseAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26569,7 +28486,8 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CHIPRvcOperationalStateCur } } -CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCurrentPhaseAttributeCallback() +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26580,8 +28498,8 @@ CHIPRvcOperationalStateCurrentPhaseAttributeCallback::~CHIPRvcOperationalStateCu env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26589,8 +28507,9 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26598,29 +28517,32 @@ void CHIPRvcOperationalStateCurrentPhaseAttributeCallback::CallbackFn(void * con ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else - { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - jint jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCountdownTimeAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26637,7 +28559,7 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::CHIPRvcOperationalStateCo } } -CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateCountdownTimeAttributeCallback() +CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26648,8 +28570,8 @@ CHIPRvcOperationalStateCountdownTimeAttributeCallback::~CHIPRvcOperationalStateC env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26657,8 +28579,9 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26666,29 +28589,32 @@ void CHIPRvcOperationalStateCountdownTimeAttributeCallback::CallbackFn(void * co ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperationalStateOperationalStateListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26705,7 +28631,8 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationalStateOperationalStateListAttributeCallback() +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::~ +CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26716,10 +28643,8 @@ CHIPRvcOperationalStateOperationalStateListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> & list) +void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26728,8 +28653,8 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26748,46 +28673,11 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_operationalStateID; - std::string newElement_0_operationalStateIDClassName = "java/lang/Integer"; - std::string newElement_0_operationalStateIDCtorSignature = "(I)V"; - jint jninewElement_0_operationalStateID = static_cast(entry_0.operationalStateID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_operationalStateIDClassName.c_str(), newElement_0_operationalStateIDCtorSignature.c_str(), - jninewElement_0_operationalStateID, newElement_0_operationalStateID); - jobject newElement_0_operationalStateLabel; - if (!entry_0.operationalStateLabel.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_operationalStateLabel); - } - else - { - jobject newElement_0_operationalStateLabelInsideOptional; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.operationalStateLabel.Value(), - newElement_0_operationalStateLabelInsideOptional)); - chip::JniReferences::GetInstance().CreateOptional(newElement_0_operationalStateLabelInsideOptional, - newElement_0_operationalStateLabel); - } - - jclass operationalStateStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$RvcOperationalStateClusterOperationalStateStruct", - operationalStateStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$RvcOperationalStateClusterOperationalStateStruct"); - return; - } - jmethodID operationalStateStructStructCtor_1 = - env->GetMethodID(operationalStateStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/util/Optional;)V"); - if (operationalStateStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$RvcOperationalStateClusterOperationalStateStruct constructor"); - return; - } - - newElement_0 = env->NewObject(operationalStateStructStructClass_1, operationalStateStructStructCtor_1, - newElement_0_operationalStateID, newElement_0_operationalStateLabel); + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + jlong jninewElement_0 = static_cast(entry_0); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } @@ -26795,9 +28685,9 @@ void CHIPRvcOperationalStateOperationalStateListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperationalStateGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback:: +CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26814,7 +28704,8 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CHIPRvcOperational } } -CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationalStateGeneratedCommandListAttributeCallback() +CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::~ +CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26825,7 +28716,7 @@ CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::~CHIPRvcOperationa env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanSensorConfigurationGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26835,8 +28726,8 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26867,9 +28758,9 @@ void CHIPRvcOperationalStateGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalStateAcceptedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback:: +CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -26886,7 +28777,8 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CHIPRvcOperationalS } } -CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperationalStateAcceptedCommandListAttributeCallback() +CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::~ +CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26897,7 +28789,7 @@ CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::~CHIPRvcOperational env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPBooleanSensorConfigurationAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -26907,8 +28799,8 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -26939,9 +28831,10 @@ void CHIPRvcOperationalStateAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPBooleanSensorConfigurationEventListAttributeCallback::CHIPBooleanSensorConfigurationEventListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26957,7 +28850,7 @@ CHIPRvcOperationalStateEventListAttributeCallback::CHIPRvcOperationalStateEventL } } -CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEventListAttributeCallback() +CHIPBooleanSensorConfigurationEventListAttributeCallback::~CHIPBooleanSensorConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -26968,8 +28861,8 @@ CHIPRvcOperationalStateEventListAttributeCallback::~CHIPRvcOperationalStateEvent env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPBooleanSensorConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -26978,8 +28871,8 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27010,9 +28903,9 @@ void CHIPRvcOperationalStateEventListAttributeCallback::CallbackFn(void * contex env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CHIPBooleanSensorConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27029,7 +28922,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::CHIPRvcOperationalStateAt } } -CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateAttributeListAttributeCallback() +CHIPBooleanSensorConfigurationAttributeListAttributeCallback::~CHIPBooleanSensorConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27040,7 +28933,7 @@ CHIPRvcOperationalStateAttributeListAttributeCallback::~CHIPRvcOperationalStateA env->DeleteGlobalRef(javaCallbackRef); } -void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( +void CHIPBooleanSensorConfigurationAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27050,8 +28943,8 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27082,9 +28975,9 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( +CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CHIPValveConfigurationAndControlOpenDurationAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27101,7 +28994,7 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitori } } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() +CHIPValveConfigurationAndControlOpenDurationAttributeCallback::~CHIPValveConfigurationAndControlOpenDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27112,8 +29005,8 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlOpenDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27121,8 +29014,8 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27150,9 +29043,9 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( +CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27169,7 +29062,7 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterM } } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() +CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::~CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27180,10 +29073,8 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilter env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) +void CHIPValveConfigurationAndControlAutoCloseTimeAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27191,9 +29082,8 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27201,57 +29091,29 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); - return; - } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback:: +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27268,7 +29130,8 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMon } } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback::~ +CHIPValveConfigurationAndControlRemainingDurationAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27279,8 +29142,8 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPValveConfigurationAndControlRemainingDurationAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27288,9 +29151,8 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27298,32 +29160,29 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) - { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + jobject javaValue; + if (value.IsNull()) + { + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Long"; + std::string javaValueCtorSignature = "(J)V"; + jlong jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( +CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CHIPValveConfigurationAndControlCurrentStateAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27340,7 +29199,7 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMoni } } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPValveConfigurationAndControlCurrentStateAttributeCallback::~CHIPValveConfigurationAndControlCurrentStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27351,8 +29210,8 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPValveConfigurationAndControlCurrentStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27360,9 +29219,8 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27370,32 +29228,30 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPValveConfigurationAndControlTargetStateAttributeCallback::CHIPValveConfigurationAndControlTargetStateAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27411,7 +29267,7 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEven } } -CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() +CHIPValveConfigurationAndControlTargetStateAttributeCallback::~CHIPValveConfigurationAndControlTargetStateAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27422,8 +29278,8 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPValveConfigurationAndControlTargetStateAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27431,9 +29287,8 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27441,32 +29296,29 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CHIPValveConfigurationAndControlCurrentLevelAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27483,7 +29335,7 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoring } } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() +CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::~CHIPValveConfigurationAndControlCurrentLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27494,8 +29346,8 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitorin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::DecodableList & list) +void CHIPValveConfigurationAndControlCurrentLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27503,9 +29355,8 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27513,32 +29364,29 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - std::string newElement_0ClassName = "java/lang/Long"; - std::string newElement_0CtorSignature = "(J)V"; - jlong jninewElement_0 = static_cast(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CHIPValveConfigurationAndControlTargetLevelAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27555,8 +29403,7 @@ CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject java } } -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() +CHIPValveConfigurationAndControlTargetLevelAttributeCallback::~CHIPValveConfigurationAndControlTargetLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27567,8 +29414,8 @@ CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPValveConfigurationAndControlTargetLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27576,8 +29423,8 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::Callba jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27585,7 +29432,7 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::Callba ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Long;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); jobject javaValue; @@ -27595,20 +29442,19 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::Callba } else { - std::string javaValueClassName = "java/lang/Long"; - std::string javaValueCtorSignature = "(J)V"; - jlong jnijavaValue = static_cast(value.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - jnijavaValue, javaValue); + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPValveConfigurationAndControlOpenLevelAttributeCallback::CHIPValveConfigurationAndControlOpenLevelAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27625,8 +29471,7 @@ CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobje } } -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() +CHIPValveConfigurationAndControlOpenLevelAttributeCallback::~CHIPValveConfigurationAndControlOpenLevelAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27637,10 +29482,8 @@ CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( - void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) +void CHIPValveConfigurationAndControlOpenLevelAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -27648,10 +29491,8 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27659,58 +29500,29 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject arrayListObj; - chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); - - auto iter_arrayListObj_0 = list.begin(); - while (iter_arrayListObj_0.Next()) + jobject javaValue; + if (value.IsNull()) { - auto & entry_0 = iter_arrayListObj_0.GetValue(); - jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); - - jclass replacementProductStructStructClass_1; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); - return; - } - jmethodID replacementProductStructStructCtor_1 = - env->GetMethodID(replacementProductStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/String;)V"); - if (replacementProductStructStructCtor_1 == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); - return; - } - - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); - chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + javaValue = nullptr; + } + else + { + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + jint jnijavaValue = static_cast(value.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + jnijavaValue, javaValue); } - env->ExceptionClear(); - env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback:: +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27727,8 +29539,8 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject } } -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback::~ +CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27739,7 +29551,7 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPValveConfigurationAndControlGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27749,8 +29561,8 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27781,9 +29593,9 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback:: +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27800,8 +29612,8 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject } } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback::~ +CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27812,7 +29624,7 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPValveConfigurationAndControlAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27822,8 +29634,8 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27854,9 +29666,9 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback( +CHIPValveConfigurationAndControlEventListAttributeCallback::CHIPValveConfigurationAndControlEventListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27873,7 +29685,7 @@ CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CHIPActivatedCarb } } -CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback() +CHIPValveConfigurationAndControlEventListAttributeCallback::~CHIPValveConfigurationAndControlEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27884,7 +29696,7 @@ CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::~CHIPActivatedCar env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( +void CHIPValveConfigurationAndControlEventListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27894,8 +29706,8 @@ void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -27926,9 +29738,9 @@ void CHIPActivatedCarbonFilterMonitoringEventListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback:: -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPValveConfigurationAndControlAttributeListAttributeCallback::CHIPValveConfigurationAndControlAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -27945,8 +29757,7 @@ CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback(jobject javaCa } } -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::~ -CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() +CHIPValveConfigurationAndControlAttributeListAttributeCallback::~CHIPValveConfigurationAndControlAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -27957,7 +29768,7 @@ CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::CallbackFn( +void CHIPValveConfigurationAndControlAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -27967,8 +29778,8 @@ void CHIPActivatedCarbonFilterMonitoringAttributeListAttributeCallback::Callback VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java new file mode 100644 index 00000000000000..99db5abbfecc9f --- /dev/null +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -0,0 +1,40492 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP +package chip.devicecontroller; + +import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +public class ChipClusters { + + public interface DefaultClusterCallback { + void onSuccess(); + void onError(Exception error); + } + + public interface CharStringAttributeCallback { + /** Indicates a successful read for a CHAR_STRING attribute. */ + void onSuccess(String value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface OctetStringAttributeCallback { + /** Indicates a successful read for an OCTET_STRING attribute. */ + void onSuccess(byte[] value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface IntegerAttributeCallback { + void onSuccess(int value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface LongAttributeCallback { + void onSuccess(long value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface BooleanAttributeCallback { + void onSuccess(boolean value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface FloatAttributeCallback { + void onSuccess(float value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public interface DoubleAttributeCallback { + void onSuccess(double value); + void onError(Exception error); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public static abstract class BaseChipCluster { + protected long chipClusterPtr; + + public BaseChipCluster(long devicePtr, int endpointId) { + chipClusterPtr = initWithDevice(devicePtr, endpointId); + } + + /** + * Sets the timeout, in milliseconds, after which commands sent through this cluster will fail + * with a timeout (regardless of whether or not a response has been received). If set to an + * empty optional, the default timeout will be used. + */ + public void setCommandTimeout(Optional timeoutMillis) { + setCommandTimeout(chipClusterPtr, timeoutMillis); + } + + private native void setCommandTimeout(long clusterPtr, Optional timeoutMillis); + + /** Returns the current timeout (in milliseconds) for commands sent through this cluster. */ + public Optional getCommandTimeout() { + Optional timeout = getCommandTimeout(chipClusterPtr); + return timeout == null ? Optional.empty() : timeout; + } + + private native Optional getCommandTimeout(long clusterPtr); + + public abstract long initWithDevice(long devicePtr, int endpointId); + + public native void deleteCluster(long chipClusterPtr); + + @SuppressWarnings("deprecation") + protected void finalize() throws Throwable { + super.finalize(); + + if (chipClusterPtr != 0) { + deleteCluster(chipClusterPtr); + chipClusterPtr = 0; + } + } + } + + public static class IdentifyCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000003L; + + public IdentifyCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void identify(DefaultClusterCallback callback + , Integer identifyTime) { + identify(chipClusterPtr, callback, identifyTime, null); + } + + public void identify(DefaultClusterCallback callback + , Integer identifyTime + , int timedInvokeTimeoutMs) { + identify(chipClusterPtr, callback, identifyTime, timedInvokeTimeoutMs); + } + + public void triggerEffect(DefaultClusterCallback callback + , Integer effectIdentifier, Integer effectVariant) { + triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); + } + + public void triggerEffect(DefaultClusterCallback callback + , Integer effectIdentifier, Integer effectVariant + , int timedInvokeTimeoutMs) { + triggerEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); + } + private native void identify(long chipClusterPtr, DefaultClusterCallback Callback + , Integer identifyTime + , @Nullable Integer timedInvokeTimeoutMs); + private native void triggerEffect(long chipClusterPtr, DefaultClusterCallback Callback + , Integer effectIdentifier, Integer effectVariant + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readIdentifyTimeAttribute( + IntegerAttributeCallback callback + ) { + readIdentifyTimeAttribute(chipClusterPtr, callback); + } + public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeIdentifyTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeIdentifyTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeIdentifyTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeIdentifyTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readIdentifyTypeAttribute( + IntegerAttributeCallback callback + ) { + readIdentifyTypeAttribute(chipClusterPtr, callback); + } + public void subscribeIdentifyTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeIdentifyTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readIdentifyTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeIdentifyTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeIdentifyTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readIdentifyTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeIdentifyTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class GroupsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000004L; + + public GroupsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void addGroup(AddGroupResponseCallback callback + , Integer groupID, String groupName) { + addGroup(chipClusterPtr, callback, groupID, groupName, null); + } + + public void addGroup(AddGroupResponseCallback callback + , Integer groupID, String groupName + , int timedInvokeTimeoutMs) { + addGroup(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); + } + + public void viewGroup(ViewGroupResponseCallback callback + , Integer groupID) { + viewGroup(chipClusterPtr, callback, groupID, null); + } + + public void viewGroup(ViewGroupResponseCallback callback + , Integer groupID + , int timedInvokeTimeoutMs) { + viewGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); + } + + public void getGroupMembership(GetGroupMembershipResponseCallback callback + , ArrayList groupList) { + getGroupMembership(chipClusterPtr, callback, groupList, null); + } + + public void getGroupMembership(GetGroupMembershipResponseCallback callback + , ArrayList groupList + , int timedInvokeTimeoutMs) { + getGroupMembership(chipClusterPtr, callback, groupList, timedInvokeTimeoutMs); + } + + public void removeGroup(RemoveGroupResponseCallback callback + , Integer groupID) { + removeGroup(chipClusterPtr, callback, groupID, null); + } + + public void removeGroup(RemoveGroupResponseCallback callback + , Integer groupID + , int timedInvokeTimeoutMs) { + removeGroup(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); + } + + public void removeAllGroups(DefaultClusterCallback callback + ) { + removeAllGroups(chipClusterPtr, callback, null); + } + + public void removeAllGroups(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + removeAllGroups(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void addGroupIfIdentifying(DefaultClusterCallback callback + , Integer groupID, String groupName) { + addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, null); + } + + public void addGroupIfIdentifying(DefaultClusterCallback callback + , Integer groupID, String groupName + , int timedInvokeTimeoutMs) { + addGroupIfIdentifying(chipClusterPtr, callback, groupID, groupName, timedInvokeTimeoutMs); + } + private native void addGroup(long chipClusterPtr, AddGroupResponseCallback Callback + , Integer groupID, String groupName + , @Nullable Integer timedInvokeTimeoutMs); + private native void viewGroup(long chipClusterPtr, ViewGroupResponseCallback Callback + , Integer groupID + , @Nullable Integer timedInvokeTimeoutMs); + private native void getGroupMembership(long chipClusterPtr, GetGroupMembershipResponseCallback Callback + , ArrayList groupList + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeGroup(long chipClusterPtr, RemoveGroupResponseCallback Callback + , Integer groupID + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeAllGroups(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void addGroupIfIdentifying(long chipClusterPtr, DefaultClusterCallback Callback + , Integer groupID, String groupName + , @Nullable Integer timedInvokeTimeoutMs); + public interface AddGroupResponseCallback { + void onSuccess(Integer status, Integer groupID); + + void onError(Exception error); + } + + public interface ViewGroupResponseCallback { + void onSuccess(Integer status, Integer groupID, String groupName); + + void onError(Exception error); + } + + public interface GetGroupMembershipResponseCallback { + void onSuccess(@Nullable Integer capacity, ArrayList groupList); + + void onError(Exception error); + } + + public interface RemoveGroupResponseCallback { + void onSuccess(Integer status, Integer groupID); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readNameSupportAttribute( + IntegerAttributeCallback callback + ) { + readNameSupportAttribute(chipClusterPtr, callback); + } + public void subscribeNameSupportAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNameSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readNameSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNameSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ScenesCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000005L; + + public ScenesCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void addScene(AddSceneResponseCallback callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { + addScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, null); + } + + public void addScene(AddSceneResponseCallback callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets + , int timedInvokeTimeoutMs) { + addScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, timedInvokeTimeoutMs); + } + + public void viewScene(ViewSceneResponseCallback callback + , Integer groupID, Integer sceneID) { + viewScene(chipClusterPtr, callback, groupID, sceneID, null); + } + + public void viewScene(ViewSceneResponseCallback callback + , Integer groupID, Integer sceneID + , int timedInvokeTimeoutMs) { + viewScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); + } + + public void removeScene(RemoveSceneResponseCallback callback + , Integer groupID, Integer sceneID) { + removeScene(chipClusterPtr, callback, groupID, sceneID, null); + } + + public void removeScene(RemoveSceneResponseCallback callback + , Integer groupID, Integer sceneID + , int timedInvokeTimeoutMs) { + removeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); + } + + public void removeAllScenes(RemoveAllScenesResponseCallback callback + , Integer groupID) { + removeAllScenes(chipClusterPtr, callback, groupID, null); + } + + public void removeAllScenes(RemoveAllScenesResponseCallback callback + , Integer groupID + , int timedInvokeTimeoutMs) { + removeAllScenes(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); + } + + public void storeScene(StoreSceneResponseCallback callback + , Integer groupID, Integer sceneID) { + storeScene(chipClusterPtr, callback, groupID, sceneID, null); + } + + public void storeScene(StoreSceneResponseCallback callback + , Integer groupID, Integer sceneID + , int timedInvokeTimeoutMs) { + storeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); + } + + public void recallScene(DefaultClusterCallback callback + , Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { + recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, null); + } + + public void recallScene(DefaultClusterCallback callback + , Integer groupID, Integer sceneID, @Nullable Optional transitionTime + , int timedInvokeTimeoutMs) { + recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, timedInvokeTimeoutMs); + } + + public void getSceneMembership(GetSceneMembershipResponseCallback callback + , Integer groupID) { + getSceneMembership(chipClusterPtr, callback, groupID, null); + } + + public void getSceneMembership(GetSceneMembershipResponseCallback callback + , Integer groupID + , int timedInvokeTimeoutMs) { + getSceneMembership(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); + } + + public void enhancedAddScene(EnhancedAddSceneResponseCallback callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { + enhancedAddScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, null); + } + + public void enhancedAddScene(EnhancedAddSceneResponseCallback callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets + , int timedInvokeTimeoutMs) { + enhancedAddScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, timedInvokeTimeoutMs); + } + + public void enhancedViewScene(EnhancedViewSceneResponseCallback callback + , Integer groupID, Integer sceneID) { + enhancedViewScene(chipClusterPtr, callback, groupID, sceneID, null); + } + + public void enhancedViewScene(EnhancedViewSceneResponseCallback callback + , Integer groupID, Integer sceneID + , int timedInvokeTimeoutMs) { + enhancedViewScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); + } + + public void copyScene(CopySceneResponseCallback callback + , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo) { + copyScene(chipClusterPtr, callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, null); + } + + public void copyScene(CopySceneResponseCallback callback + , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo + , int timedInvokeTimeoutMs) { + copyScene(chipClusterPtr, callback, mode, groupIdentifierFrom, sceneIdentifierFrom, groupIdentifierTo, sceneIdentifierTo, timedInvokeTimeoutMs); + } + private native void addScene(long chipClusterPtr, AddSceneResponseCallback Callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets + , @Nullable Integer timedInvokeTimeoutMs); + private native void viewScene(long chipClusterPtr, ViewSceneResponseCallback Callback + , Integer groupID, Integer sceneID + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeScene(long chipClusterPtr, RemoveSceneResponseCallback Callback + , Integer groupID, Integer sceneID + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeAllScenes(long chipClusterPtr, RemoveAllScenesResponseCallback Callback + , Integer groupID + , @Nullable Integer timedInvokeTimeoutMs); + private native void storeScene(long chipClusterPtr, StoreSceneResponseCallback Callback + , Integer groupID, Integer sceneID + , @Nullable Integer timedInvokeTimeoutMs); + private native void recallScene(long chipClusterPtr, DefaultClusterCallback Callback + , Integer groupID, Integer sceneID, @Nullable Optional transitionTime + , @Nullable Integer timedInvokeTimeoutMs); + private native void getSceneMembership(long chipClusterPtr, GetSceneMembershipResponseCallback Callback + , Integer groupID + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedAddScene(long chipClusterPtr, EnhancedAddSceneResponseCallback Callback + , Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedViewScene(long chipClusterPtr, EnhancedViewSceneResponseCallback Callback + , Integer groupID, Integer sceneID + , @Nullable Integer timedInvokeTimeoutMs); + private native void copyScene(long chipClusterPtr, CopySceneResponseCallback Callback + , Integer mode, Integer groupIdentifierFrom, Integer sceneIdentifierFrom, Integer groupIdentifierTo, Integer sceneIdentifierTo + , @Nullable Integer timedInvokeTimeoutMs); + public interface AddSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); + + void onError(Exception error); + } + + public interface ViewSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); + + void onError(Exception error); + } + + public interface RemoveSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); + + void onError(Exception error); + } + + public interface RemoveAllScenesResponseCallback { + void onSuccess(Integer status, Integer groupID); + + void onError(Exception error); + } + + public interface StoreSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); + + void onError(Exception error); + } + + public interface GetSceneMembershipResponseCallback { + void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList); + + void onError(Exception error); + } + + public interface EnhancedAddSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); + + void onError(Exception error); + } + + public interface EnhancedViewSceneResponseCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); + + void onError(Exception error); + } + + public interface CopySceneResponseCallback { + void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom); + + void onError(Exception error); + } + + + public interface LastConfiguredByAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSceneCountAttribute( + IntegerAttributeCallback callback + ) { + readSceneCountAttribute(chipClusterPtr, callback); + } + public void subscribeSceneCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSceneCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentSceneAttribute( + IntegerAttributeCallback callback + ) { + readCurrentSceneAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentSceneAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentSceneAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentGroupAttribute( + IntegerAttributeCallback callback + ) { + readCurrentGroupAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentGroupAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentGroupAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSceneValidAttribute( + BooleanAttributeCallback callback + ) { + readSceneValidAttribute(chipClusterPtr, callback); + } + public void subscribeSceneValidAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSceneValidAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNameSupportAttribute( + IntegerAttributeCallback callback + ) { + readNameSupportAttribute(chipClusterPtr, callback); + } + public void subscribeNameSupportAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNameSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastConfiguredByAttribute( + LastConfiguredByAttributeCallback callback + ) { + readLastConfiguredByAttribute(chipClusterPtr, callback); + } + public void subscribeLastConfiguredByAttribute( + LastConfiguredByAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastConfiguredByAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSceneTableSizeAttribute( + IntegerAttributeCallback callback + ) { + readSceneTableSizeAttribute(chipClusterPtr, callback); + } + public void subscribeSceneTableSizeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSceneTableSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRemainingCapacityAttribute( + IntegerAttributeCallback callback + ) { + readRemainingCapacityAttribute(chipClusterPtr, callback); + } + public void subscribeRemainingCapacityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRemainingCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSceneCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSceneCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentSceneAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentSceneAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentGroupAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentGroupAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSceneValidAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeSceneValidAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNameSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNameSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLastConfiguredByAttribute(long chipClusterPtr, + LastConfiguredByAttributeCallback callback + ); + private native void subscribeLastConfiguredByAttribute(long chipClusterPtr, + LastConfiguredByAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSceneTableSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSceneTableSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRemainingCapacityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRemainingCapacityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OnOffCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000006L; + + public OnOffCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void off(DefaultClusterCallback callback + ) { + off(chipClusterPtr, callback, null); + } + + public void off(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + off(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void on(DefaultClusterCallback callback + ) { + on(chipClusterPtr, callback, null); + } + + public void on(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + on(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void toggle(DefaultClusterCallback callback + ) { + toggle(chipClusterPtr, callback, null); + } + + public void toggle(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + toggle(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void offWithEffect(DefaultClusterCallback callback + , Integer effectIdentifier, Integer effectVariant) { + offWithEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, null); + } + + public void offWithEffect(DefaultClusterCallback callback + , Integer effectIdentifier, Integer effectVariant + , int timedInvokeTimeoutMs) { + offWithEffect(chipClusterPtr, callback, effectIdentifier, effectVariant, timedInvokeTimeoutMs); + } + + public void onWithRecallGlobalScene(DefaultClusterCallback callback + ) { + onWithRecallGlobalScene(chipClusterPtr, callback, null); + } + + public void onWithRecallGlobalScene(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + onWithRecallGlobalScene(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void onWithTimedOff(DefaultClusterCallback callback + , Integer onOffControl, Integer onTime, Integer offWaitTime) { + onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, null); + } + + public void onWithTimedOff(DefaultClusterCallback callback + , Integer onOffControl, Integer onTime, Integer offWaitTime + , int timedInvokeTimeoutMs) { + onWithTimedOff(chipClusterPtr, callback, onOffControl, onTime, offWaitTime, timedInvokeTimeoutMs); + } + private native void off(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void on(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void toggle(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void offWithEffect(long chipClusterPtr, DefaultClusterCallback Callback + , Integer effectIdentifier, Integer effectVariant + , @Nullable Integer timedInvokeTimeoutMs); + private native void onWithRecallGlobalScene(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void onWithTimedOff(long chipClusterPtr, DefaultClusterCallback Callback + , Integer onOffControl, Integer onTime, Integer offWaitTime + , @Nullable Integer timedInvokeTimeoutMs); + + public interface StartUpOnOffAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readOnOffAttribute( + BooleanAttributeCallback callback + ) { + readOnOffAttribute(chipClusterPtr, callback); + } + public void subscribeOnOffAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOnOffAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGlobalSceneControlAttribute( + BooleanAttributeCallback callback + ) { + readGlobalSceneControlAttribute(chipClusterPtr, callback); + } + public void subscribeGlobalSceneControlAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeGlobalSceneControlAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnTimeAttribute( + IntegerAttributeCallback callback + ) { + readOnTimeAttribute(chipClusterPtr, callback); + } + public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOnTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOffWaitTimeAttribute( + IntegerAttributeCallback callback + ) { + readOffWaitTimeAttribute(chipClusterPtr, callback); + } + public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffWaitTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOffWaitTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOffWaitTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOffWaitTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpOnOffAttribute( + StartUpOnOffAttributeCallback callback + ) { + readStartUpOnOffAttribute(chipClusterPtr, callback); + } + public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpOnOffAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpOnOffAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpOnOffAttribute( + StartUpOnOffAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpOnOffAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readOnOffAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeOnOffAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGlobalSceneControlAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeGlobalSceneControlAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOnTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOnTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOffWaitTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOffWaitTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOffWaitTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpOnOffAttribute(long chipClusterPtr, + StartUpOnOffAttributeCallback callback + ); + + private native void writeStartUpOnOffAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpOnOffAttribute(long chipClusterPtr, + StartUpOnOffAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000007L; + + public OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSwitchTypeAttribute( + IntegerAttributeCallback callback + ) { + readSwitchTypeAttribute(chipClusterPtr, callback); + } + public void subscribeSwitchTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSwitchTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSwitchActionsAttribute( + IntegerAttributeCallback callback + ) { + readSwitchActionsAttribute(chipClusterPtr, callback); + } + public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { + writeSwitchActionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSwitchActionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSwitchActionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSwitchActionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSwitchTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSwitchTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSwitchActionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeSwitchActionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSwitchActionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class LevelControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000008L; + + public LevelControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void moveToLevel(DefaultClusterCallback callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToLevel(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToLevel(DefaultClusterCallback callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToLevel(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void move(DefaultClusterCallback callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { + move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void move(DefaultClusterCallback callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + move(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void step(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + step(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); + } + + public void step(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + step(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stop(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride) { + stop(chipClusterPtr, callback, optionsMask, optionsOverride, null); + } + + public void stop(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToLevelWithOnOff(DefaultClusterCallback callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToLevelWithOnOff(DefaultClusterCallback callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToLevelWithOnOff(chipClusterPtr, callback, level, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveWithOnOff(DefaultClusterCallback callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveWithOnOff(DefaultClusterCallback callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveWithOnOff(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stepWithOnOff(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); + } + + public void stepWithOnOff(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stepWithOnOff(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stopWithOnOff(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, null); + } + + public void stopWithOnOff(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stopWithOnOff(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToClosestFrequency(DefaultClusterCallback callback + , Integer frequency) { + moveToClosestFrequency(chipClusterPtr, callback, frequency, null); + } + + public void moveToClosestFrequency(DefaultClusterCallback callback + , Integer frequency + , int timedInvokeTimeoutMs) { + moveToClosestFrequency(chipClusterPtr, callback, frequency, timedInvokeTimeoutMs); + } + private native void moveToLevel(long chipClusterPtr, DefaultClusterCallback Callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void move(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void step(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stop(long chipClusterPtr, DefaultClusterCallback Callback + , Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToLevelWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback + , Integer level, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, @Nullable Integer rate, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stepWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, @Nullable Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stopWithOnOff(long chipClusterPtr, DefaultClusterCallback Callback + , Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToClosestFrequency(long chipClusterPtr, DefaultClusterCallback Callback + , Integer frequency + , @Nullable Integer timedInvokeTimeoutMs); + + public interface CurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OffTransitionTimeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DefaultMoveRateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpCurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readCurrentLevelAttribute( + CurrentLevelAttributeCallback callback + ) { + readCurrentLevelAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentLevelAttribute( + CurrentLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRemainingTimeAttribute( + IntegerAttributeCallback callback + ) { + readRemainingTimeAttribute(chipClusterPtr, callback); + } + public void subscribeRemainingTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRemainingTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinLevelAttribute( + IntegerAttributeCallback callback + ) { + readMinLevelAttribute(chipClusterPtr, callback); + } + public void subscribeMinLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxLevelAttribute( + IntegerAttributeCallback callback + ) { + readMaxLevelAttribute(chipClusterPtr, callback); + } + public void subscribeMaxLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentFrequencyAttribute( + IntegerAttributeCallback callback + ) { + readCurrentFrequencyAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentFrequencyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinFrequencyAttribute( + IntegerAttributeCallback callback + ) { + readMinFrequencyAttribute(chipClusterPtr, callback); + } + public void subscribeMinFrequencyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxFrequencyAttribute( + IntegerAttributeCallback callback + ) { + readMaxFrequencyAttribute(chipClusterPtr, callback); + } + public void subscribeMaxFrequencyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOptionsAttribute( + IntegerAttributeCallback callback + ) { + readOptionsAttribute(chipClusterPtr, callback); + } + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { + writeOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOptionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOptionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnOffTransitionTimeAttribute( + IntegerAttributeCallback callback + ) { + readOnOffTransitionTimeAttribute(chipClusterPtr, callback); + } + public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnOffTransitionTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOnOffTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnLevelAttribute( + OnLevelAttributeCallback callback + ) { + readOnLevelAttribute(chipClusterPtr, callback); + } + public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeOnLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnLevelAttribute( + OnLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnTransitionTimeAttribute( + OnTransitionTimeAttributeCallback callback + ) { + readOnTransitionTimeAttribute(chipClusterPtr, callback); + } + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnTransitionTimeAttribute( + OnTransitionTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOffTransitionTimeAttribute( + OffTransitionTimeAttributeCallback callback + ) { + readOffTransitionTimeAttribute(chipClusterPtr, callback); + } + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOffTransitionTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOffTransitionTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOffTransitionTimeAttribute( + OffTransitionTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOffTransitionTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDefaultMoveRateAttribute( + DefaultMoveRateAttributeCallback callback + ) { + readDefaultMoveRateAttribute(chipClusterPtr, callback); + } + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value) { + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDefaultMoveRateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeDefaultMoveRateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeDefaultMoveRateAttribute( + DefaultMoveRateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDefaultMoveRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpCurrentLevelAttribute( + StartUpCurrentLevelAttributeCallback callback + ) { + readStartUpCurrentLevelAttribute(chipClusterPtr, callback); + } + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpCurrentLevelAttribute( + StartUpCurrentLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readCurrentLevelAttribute(long chipClusterPtr, + CurrentLevelAttributeCallback callback + ); + private native void subscribeCurrentLevelAttribute(long chipClusterPtr, + CurrentLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRemainingTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRemainingTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOptionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOptionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOptionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOnOffTransitionTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOnOffTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnOffTransitionTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOnLevelAttribute(long chipClusterPtr, + OnLevelAttributeCallback callback + ); + + private native void writeOnLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnLevelAttribute(long chipClusterPtr, + OnLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnTransitionTimeAttribute(long chipClusterPtr, + OnTransitionTimeAttributeCallback callback + ); + + private native void writeOnTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnTransitionTimeAttribute(long chipClusterPtr, + OnTransitionTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOffTransitionTimeAttribute(long chipClusterPtr, + OffTransitionTimeAttributeCallback callback + ); + + private native void writeOffTransitionTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOffTransitionTimeAttribute(long chipClusterPtr, + OffTransitionTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDefaultMoveRateAttribute(long chipClusterPtr, + DefaultMoveRateAttributeCallback callback + ); + + private native void writeDefaultMoveRateAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeDefaultMoveRateAttribute(long chipClusterPtr, + DefaultMoveRateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readStartUpCurrentLevelAttribute(long chipClusterPtr, + StartUpCurrentLevelAttributeCallback callback + ); + + private native void writeStartUpCurrentLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpCurrentLevelAttribute(long chipClusterPtr, + StartUpCurrentLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BinaryInputBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000000FL; + + public BinaryInputBasicCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readActiveTextAttribute( + CharStringAttributeCallback callback + ) { + readActiveTextAttribute(chipClusterPtr, callback); + } + public void writeActiveTextAttribute(DefaultClusterCallback callback, String value) { + writeActiveTextAttribute(chipClusterPtr, callback, value, null); + } + + public void writeActiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeActiveTextAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeActiveTextAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void writeDescriptionAttribute(DefaultClusterCallback callback, String value) { + writeDescriptionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDescriptionAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeDescriptionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInactiveTextAttribute( + CharStringAttributeCallback callback + ) { + readInactiveTextAttribute(chipClusterPtr, callback); + } + public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value) { + writeInactiveTextAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeInactiveTextAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInactiveTextAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInactiveTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOutOfServiceAttribute( + BooleanAttributeCallback callback + ) { + readOutOfServiceAttribute(chipClusterPtr, callback); + } + public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { + writeOutOfServiceAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeOutOfServiceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOutOfServiceAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOutOfServiceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPolarityAttribute( + IntegerAttributeCallback callback + ) { + readPolarityAttribute(chipClusterPtr, callback); + } + public void subscribePolarityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePolarityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPresentValueAttribute( + BooleanAttributeCallback callback + ) { + readPresentValueAttribute(chipClusterPtr, callback); + } + public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { + writePresentValueAttribute(chipClusterPtr, callback, value, null); + } + + public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writePresentValueAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePresentValueAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePresentValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReliabilityAttribute( + IntegerAttributeCallback callback + ) { + readReliabilityAttribute(chipClusterPtr, callback); + } + public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value) { + writeReliabilityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeReliabilityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeReliabilityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReliabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStatusFlagsAttribute( + IntegerAttributeCallback callback + ) { + readStatusFlagsAttribute(chipClusterPtr, callback); + } + public void subscribeStatusFlagsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStatusFlagsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApplicationTypeAttribute( + LongAttributeCallback callback + ) { + readApplicationTypeAttribute(chipClusterPtr, callback); + } + public void subscribeApplicationTypeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApplicationTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readActiveTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeActiveTextAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeActiveTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeDescriptionAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInactiveTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeInactiveTextAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInactiveTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOutOfServiceAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeOutOfServiceAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOutOfServiceAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPolarityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePolarityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPresentValueAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writePresentValueAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePresentValueAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReliabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeReliabilityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeReliabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStatusFlagsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStatusFlagsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApplicationTypeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeApplicationTypeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class PulseWidthModulationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000001CL; + + public PulseWidthModulationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DescriptorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000001DL; + + public DescriptorCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface DeviceTypeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ServerListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ClientListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PartsListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TagListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDeviceTypeListAttribute( + DeviceTypeListAttributeCallback callback + ) { + readDeviceTypeListAttribute(chipClusterPtr, callback); + } + public void subscribeDeviceTypeListAttribute( + DeviceTypeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDeviceTypeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readServerListAttribute( + ServerListAttributeCallback callback + ) { + readServerListAttribute(chipClusterPtr, callback); + } + public void subscribeServerListAttribute( + ServerListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeServerListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClientListAttribute( + ClientListAttributeCallback callback + ) { + readClientListAttribute(chipClusterPtr, callback); + } + public void subscribeClientListAttribute( + ClientListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeClientListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPartsListAttribute( + PartsListAttributeCallback callback + ) { + readPartsListAttribute(chipClusterPtr, callback); + } + public void subscribePartsListAttribute( + PartsListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePartsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTagListAttribute( + TagListAttributeCallback callback + ) { + readTagListAttribute(chipClusterPtr, callback); + } + public void subscribeTagListAttribute( + TagListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTagListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDeviceTypeListAttribute(long chipClusterPtr, + DeviceTypeListAttributeCallback callback + ); + private native void subscribeDeviceTypeListAttribute(long chipClusterPtr, + DeviceTypeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readServerListAttribute(long chipClusterPtr, + ServerListAttributeCallback callback + ); + private native void subscribeServerListAttribute(long chipClusterPtr, + ServerListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readClientListAttribute(long chipClusterPtr, + ClientListAttributeCallback callback + ); + private native void subscribeClientListAttribute(long chipClusterPtr, + ClientListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPartsListAttribute(long chipClusterPtr, + PartsListAttributeCallback callback + ); + private native void subscribePartsListAttribute(long chipClusterPtr, + PartsListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTagListAttribute(long chipClusterPtr, + TagListAttributeCallback callback + ); + private native void subscribeTagListAttribute(long chipClusterPtr, + TagListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BindingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000001EL; + + public BindingCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface BindingAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readBindingAttribute( + BindingAttributeCallback callback + ) { + readBindingAttribute(chipClusterPtr, callback, true); + } + public void readBindingAttributeWithFabricFilter( + BindingAttributeCallback callback + , + boolean isFabricFiltered + ) { + readBindingAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value) { + writeBindingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBindingAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeBindingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBindingAttribute( + BindingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBindingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readBindingAttribute(long chipClusterPtr, + BindingAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeBindingAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBindingAttribute(long chipClusterPtr, + BindingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class AccessControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000001FL; + + public AccessControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface AclAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ExtensionAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readAclAttribute( + AclAttributeCallback callback + ) { + readAclAttribute(chipClusterPtr, callback, true); + } + public void readAclAttributeWithFabricFilter( + AclAttributeCallback callback + , + boolean isFabricFiltered + ) { + readAclAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value) { + writeAclAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAclAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeAclAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAclAttribute( + AclAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAclAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readExtensionAttribute( + ExtensionAttributeCallback callback + ) { + readExtensionAttribute(chipClusterPtr, callback, true); + } + public void readExtensionAttributeWithFabricFilter( + ExtensionAttributeCallback callback + , + boolean isFabricFiltered + ) { + readExtensionAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value) { + writeExtensionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeExtensionAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeExtensionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeExtensionAttribute( + ExtensionAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeExtensionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSubjectsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback + ) { + readSubjectsPerAccessControlEntryAttribute(chipClusterPtr, callback); + } + public void subscribeSubjectsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSubjectsPerAccessControlEntryAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTargetsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback + ) { + readTargetsPerAccessControlEntryAttribute(chipClusterPtr, callback); + } + public void subscribeTargetsPerAccessControlEntryAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTargetsPerAccessControlEntryAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAccessControlEntriesPerFabricAttribute( + IntegerAttributeCallback callback + ) { + readAccessControlEntriesPerFabricAttribute(chipClusterPtr, callback); + } + public void subscribeAccessControlEntriesPerFabricAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAccessControlEntriesPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readAclAttribute(long chipClusterPtr, + AclAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeAclAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAclAttribute(long chipClusterPtr, + AclAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readExtensionAttribute(long chipClusterPtr, + ExtensionAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeExtensionAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeExtensionAttribute(long chipClusterPtr, + ExtensionAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSubjectsPerAccessControlEntryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSubjectsPerAccessControlEntryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTargetsPerAccessControlEntryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTargetsPerAccessControlEntryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAccessControlEntriesPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAccessControlEntriesPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ActionsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000025L; + + public ActionsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void instantAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + instantAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void instantAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + instantAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void instantActionWithTransition(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Integer transitionTime) { + instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime, null); + } + + public void instantActionWithTransition(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Integer transitionTime + , int timedInvokeTimeoutMs) { + instantActionWithTransition(chipClusterPtr, callback, actionID, invokeID, transitionTime, timedInvokeTimeoutMs); + } + + public void startAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + startAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void startAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + startAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void startActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration) { + startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void startActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration + , int timedInvokeTimeoutMs) { + startActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); + } + + public void stopAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + stopAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void stopAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + stopAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void pauseAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + pauseAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void pauseAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + pauseAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void pauseActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration) { + pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void pauseActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration + , int timedInvokeTimeoutMs) { + pauseActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); + } + + public void resumeAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + resumeAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void resumeAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + resumeAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void enableAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + enableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void enableAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + enableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void enableActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration) { + enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void enableActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration + , int timedInvokeTimeoutMs) { + enableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); + } + + public void disableAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID) { + disableAction(chipClusterPtr, callback, actionID, invokeID, null); + } + + public void disableAction(DefaultClusterCallback callback + , Integer actionID, Optional invokeID + , int timedInvokeTimeoutMs) { + disableAction(chipClusterPtr, callback, actionID, invokeID, timedInvokeTimeoutMs); + } + + public void disableActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration) { + disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, null); + } + + public void disableActionWithDuration(DefaultClusterCallback callback + , Integer actionID, Optional invokeID, Long duration + , int timedInvokeTimeoutMs) { + disableActionWithDuration(chipClusterPtr, callback, actionID, invokeID, duration, timedInvokeTimeoutMs); + } + private native void instantAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void instantActionWithTransition(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID, Integer transitionTime + , @Nullable Integer timedInvokeTimeoutMs); + private native void startAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void startActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID, Long duration + , @Nullable Integer timedInvokeTimeoutMs); + private native void stopAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void pauseAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void pauseActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID, Long duration + , @Nullable Integer timedInvokeTimeoutMs); + private native void resumeAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void enableAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void enableActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID, Long duration + , @Nullable Integer timedInvokeTimeoutMs); + private native void disableAction(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID + , @Nullable Integer timedInvokeTimeoutMs); + private native void disableActionWithDuration(long chipClusterPtr, DefaultClusterCallback Callback + , Integer actionID, Optional invokeID, Long duration + , @Nullable Integer timedInvokeTimeoutMs); + + public interface ActionListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EndpointListsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readActionListAttribute( + ActionListAttributeCallback callback + ) { + readActionListAttribute(chipClusterPtr, callback); + } + public void subscribeActionListAttribute( + ActionListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActionListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEndpointListsAttribute( + EndpointListsAttributeCallback callback + ) { + readEndpointListsAttribute(chipClusterPtr, callback); + } + public void subscribeEndpointListsAttribute( + EndpointListsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEndpointListsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSetupURLAttribute( + CharStringAttributeCallback callback + ) { + readSetupURLAttribute(chipClusterPtr, callback); + } + public void subscribeSetupURLAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSetupURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readActionListAttribute(long chipClusterPtr, + ActionListAttributeCallback callback + ); + private native void subscribeActionListAttribute(long chipClusterPtr, + ActionListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEndpointListsAttribute(long chipClusterPtr, + EndpointListsAttributeCallback callback + ); + private native void subscribeEndpointListsAttribute(long chipClusterPtr, + EndpointListsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSetupURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeSetupURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BasicInformationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000028L; + + public BasicInformationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void mfgSpecificPing(DefaultClusterCallback callback + ) { + mfgSpecificPing(chipClusterPtr, callback, null); + } + + public void mfgSpecificPing(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + mfgSpecificPing(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void mfgSpecificPing(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDataModelRevisionAttribute( + IntegerAttributeCallback callback + ) { + readDataModelRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeDataModelRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDataModelRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVendorNameAttribute( + CharStringAttributeCallback callback + ) { + readVendorNameAttribute(chipClusterPtr, callback); + } + public void subscribeVendorNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVendorIDAttribute( + IntegerAttributeCallback callback + ) { + readVendorIDAttribute(chipClusterPtr, callback); + } + public void subscribeVendorIDAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductNameAttribute( + CharStringAttributeCallback callback + ) { + readProductNameAttribute(chipClusterPtr, callback); + } + public void subscribeProductNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductIDAttribute( + IntegerAttributeCallback callback + ) { + readProductIDAttribute(chipClusterPtr, callback); + } + public void subscribeProductIDAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNodeLabelAttribute( + CharStringAttributeCallback callback + ) { + readNodeLabelAttribute(chipClusterPtr, callback); + } + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNodeLabelAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNodeLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocationAttribute( + CharStringAttributeCallback callback + ) { + readLocationAttribute(chipClusterPtr, callback); + } + public void writeLocationAttribute(DefaultClusterCallback callback, String value) { + writeLocationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocationAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLocationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLocationAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLocationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHardwareVersionAttribute( + IntegerAttributeCallback callback + ) { + readHardwareVersionAttribute(chipClusterPtr, callback); + } + public void subscribeHardwareVersionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHardwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHardwareVersionStringAttribute( + CharStringAttributeCallback callback + ) { + readHardwareVersionStringAttribute(chipClusterPtr, callback); + } + public void subscribeHardwareVersionStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHardwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSoftwareVersionAttribute( + LongAttributeCallback callback + ) { + readSoftwareVersionAttribute(chipClusterPtr, callback); + } + public void subscribeSoftwareVersionAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSoftwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSoftwareVersionStringAttribute( + CharStringAttributeCallback callback + ) { + readSoftwareVersionStringAttribute(chipClusterPtr, callback); + } + public void subscribeSoftwareVersionStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSoftwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readManufacturingDateAttribute( + CharStringAttributeCallback callback + ) { + readManufacturingDateAttribute(chipClusterPtr, callback); + } + public void subscribeManufacturingDateAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeManufacturingDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPartNumberAttribute( + CharStringAttributeCallback callback + ) { + readPartNumberAttribute(chipClusterPtr, callback); + } + public void subscribePartNumberAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePartNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductURLAttribute( + CharStringAttributeCallback callback + ) { + readProductURLAttribute(chipClusterPtr, callback); + } + public void subscribeProductURLAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductLabelAttribute( + CharStringAttributeCallback callback + ) { + readProductLabelAttribute(chipClusterPtr, callback); + } + public void subscribeProductLabelAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSerialNumberAttribute( + CharStringAttributeCallback callback + ) { + readSerialNumberAttribute(chipClusterPtr, callback); + } + public void subscribeSerialNumberAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSerialNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalConfigDisabledAttribute( + BooleanAttributeCallback callback + ) { + readLocalConfigDisabledAttribute(chipClusterPtr, callback); + } + public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalConfigDisabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeLocalConfigDisabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLocalConfigDisabledAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLocalConfigDisabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReachableAttribute( + BooleanAttributeCallback callback + ) { + readReachableAttribute(chipClusterPtr, callback); + } + public void subscribeReachableAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReachableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUniqueIDAttribute( + CharStringAttributeCallback callback + ) { + readUniqueIDAttribute(chipClusterPtr, callback); + } + public void subscribeUniqueIDAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUniqueIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDataModelRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDataModelRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeProductIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNodeLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeNodeLabelAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNodeLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLocationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeLocationAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLocationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHardwareVersionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeHardwareVersionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHardwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeHardwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSoftwareVersionAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSoftwareVersionAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSoftwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeSoftwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readManufacturingDateAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeManufacturingDateAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPartNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribePartNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSerialNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeSerialNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLocalConfigDisabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeLocalConfigDisabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLocalConfigDisabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReachableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeReachableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUniqueIDAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeUniqueIDAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OtaSoftwareUpdateProviderCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000029L; + + public OtaSoftwareUpdateProviderCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void queryImage(QueryImageResponseCallback callback + , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider) { + queryImage(chipClusterPtr, callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, null); + } + + public void queryImage(QueryImageResponseCallback callback + , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider + , int timedInvokeTimeoutMs) { + queryImage(chipClusterPtr, callback, vendorID, productID, softwareVersion, protocolsSupported, hardwareVersion, location, requestorCanConsent, metadataForProvider, timedInvokeTimeoutMs); + } + + public void applyUpdateRequest(ApplyUpdateResponseCallback callback + , byte[] updateToken, Long newVersion) { + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, null); + } + + public void applyUpdateRequest(ApplyUpdateResponseCallback callback + , byte[] updateToken, Long newVersion + , int timedInvokeTimeoutMs) { + applyUpdateRequest(chipClusterPtr, callback, updateToken, newVersion, timedInvokeTimeoutMs); + } + + public void notifyUpdateApplied(DefaultClusterCallback callback + , byte[] updateToken, Long softwareVersion) { + notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, null); + } + + public void notifyUpdateApplied(DefaultClusterCallback callback + , byte[] updateToken, Long softwareVersion + , int timedInvokeTimeoutMs) { + notifyUpdateApplied(chipClusterPtr, callback, updateToken, softwareVersion, timedInvokeTimeoutMs); + } + private native void queryImage(long chipClusterPtr, QueryImageResponseCallback Callback + , Integer vendorID, Integer productID, Long softwareVersion, ArrayList protocolsSupported, Optional hardwareVersion, Optional location, Optional requestorCanConsent, Optional metadataForProvider + , @Nullable Integer timedInvokeTimeoutMs); + private native void applyUpdateRequest(long chipClusterPtr, ApplyUpdateResponseCallback Callback + , byte[] updateToken, Long newVersion + , @Nullable Integer timedInvokeTimeoutMs); + private native void notifyUpdateApplied(long chipClusterPtr, DefaultClusterCallback Callback + , byte[] updateToken, Long softwareVersion + , @Nullable Integer timedInvokeTimeoutMs); + public interface QueryImageResponseCallback { + void onSuccess(Integer status, Optional delayedActionTime, Optional imageURI, Optional softwareVersion, Optional softwareVersionString, Optional updateToken, Optional userConsentNeeded, Optional metadataForRequestor); + + void onError(Exception error); + } + + public interface ApplyUpdateResponseCallback { + void onSuccess(Integer action, Long delayedActionTime); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OtaSoftwareUpdateRequestorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002AL; + + public OtaSoftwareUpdateRequestorCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void announceOTAProvider(DefaultClusterCallback callback + , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint) { + announceOTAProvider(chipClusterPtr, callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, null); + } + + public void announceOTAProvider(DefaultClusterCallback callback + , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint + , int timedInvokeTimeoutMs) { + announceOTAProvider(chipClusterPtr, callback, providerNodeID, vendorID, announcementReason, metadataForNode, endpoint, timedInvokeTimeoutMs); + } + private native void announceOTAProvider(long chipClusterPtr, DefaultClusterCallback Callback + , Long providerNodeID, Integer vendorID, Integer announcementReason, Optional metadataForNode, Integer endpoint + , @Nullable Integer timedInvokeTimeoutMs); + + public interface DefaultOTAProvidersAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface UpdateStateProgressAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDefaultOTAProvidersAttribute( + DefaultOTAProvidersAttributeCallback callback + ) { + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, true); + } + public void readDefaultOTAProvidersAttributeWithFabricFilter( + DefaultOTAProvidersAttributeCallback callback + , + boolean isFabricFiltered + ) { + readDefaultOTAProvidersAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value) { + writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDefaultOTAProvidersAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeDefaultOTAProvidersAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeDefaultOTAProvidersAttribute( + DefaultOTAProvidersAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDefaultOTAProvidersAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUpdatePossibleAttribute( + BooleanAttributeCallback callback + ) { + readUpdatePossibleAttribute(chipClusterPtr, callback); + } + public void subscribeUpdatePossibleAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUpdatePossibleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUpdateStateAttribute( + IntegerAttributeCallback callback + ) { + readUpdateStateAttribute(chipClusterPtr, callback); + } + public void subscribeUpdateStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUpdateStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUpdateStateProgressAttribute( + UpdateStateProgressAttributeCallback callback + ) { + readUpdateStateProgressAttribute(chipClusterPtr, callback); + } + public void subscribeUpdateStateProgressAttribute( + UpdateStateProgressAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeUpdateStateProgressAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDefaultOTAProvidersAttribute(long chipClusterPtr, + DefaultOTAProvidersAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeDefaultOTAProvidersAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeDefaultOTAProvidersAttribute(long chipClusterPtr, + DefaultOTAProvidersAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readUpdatePossibleAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeUpdatePossibleAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUpdateStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeUpdateStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUpdateStateProgressAttribute(long chipClusterPtr, + UpdateStateProgressAttributeCallback callback + ); + private native void subscribeUpdateStateProgressAttribute(long chipClusterPtr, + UpdateStateProgressAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class LocalizationConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002BL; + + public LocalizationConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SupportedLocalesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readActiveLocaleAttribute( + CharStringAttributeCallback callback + ) { + readActiveLocaleAttribute(chipClusterPtr, callback); + } + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeActiveLocaleAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeActiveLocaleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeActiveLocaleAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveLocaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedLocalesAttribute( + SupportedLocalesAttributeCallback callback + ) { + readSupportedLocalesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedLocalesAttribute( + SupportedLocalesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedLocalesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readActiveLocaleAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeActiveLocaleAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeActiveLocaleAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedLocalesAttribute(long chipClusterPtr, + SupportedLocalesAttributeCallback callback + ); + private native void subscribeSupportedLocalesAttribute(long chipClusterPtr, + SupportedLocalesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TimeFormatLocalizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002CL; + + public TimeFormatLocalizationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SupportedCalendarTypesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readHourFormatAttribute( + IntegerAttributeCallback callback + ) { + readHourFormatAttribute(chipClusterPtr, callback); + } + public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value) { + writeHourFormatAttribute(chipClusterPtr, callback, value, null); + } + + public void writeHourFormatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeHourFormatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeHourFormatAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHourFormatAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveCalendarTypeAttribute( + IntegerAttributeCallback callback + ) { + readActiveCalendarTypeAttribute(chipClusterPtr, callback); + } + public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeActiveCalendarTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeActiveCalendarTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeActiveCalendarTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeActiveCalendarTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveCalendarTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedCalendarTypesAttribute( + SupportedCalendarTypesAttributeCallback callback + ) { + readSupportedCalendarTypesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedCalendarTypesAttribute( + SupportedCalendarTypesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedCalendarTypesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readHourFormatAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeHourFormatAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeHourFormatAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveCalendarTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeActiveCalendarTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeActiveCalendarTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedCalendarTypesAttribute(long chipClusterPtr, + SupportedCalendarTypesAttributeCallback callback + ); + private native void subscribeSupportedCalendarTypesAttribute(long chipClusterPtr, + SupportedCalendarTypesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class UnitLocalizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002DL; + + public UnitLocalizationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTemperatureUnitAttribute( + IntegerAttributeCallback callback + ) { + readTemperatureUnitAttribute(chipClusterPtr, callback); + } + public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value) { + writeTemperatureUnitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureUnitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureUnitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeTemperatureUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTemperatureUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTemperatureUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeTemperatureUnitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTemperatureUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class PowerSourceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002EL; + + public PowerSourceConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SourcesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSourcesAttribute( + SourcesAttributeCallback callback + ) { + readSourcesAttribute(chipClusterPtr, callback); + } + public void subscribeSourcesAttribute( + SourcesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSourcesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSourcesAttribute(long chipClusterPtr, + SourcesAttributeCallback callback + ); + private native void subscribeSourcesAttribute(long chipClusterPtr, + SourcesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class PowerSourceCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000002FL; + + public PowerSourceCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface WiredAssessedInputVoltageAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface WiredAssessedInputFrequencyAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface WiredAssessedCurrentAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveWiredFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BatVoltageAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BatPercentRemainingAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BatTimeRemainingAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveBatFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BatTimeToFullChargeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BatChargingCurrentAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveBatChargeFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EndpointListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readStatusAttribute( + IntegerAttributeCallback callback + ) { + readStatusAttribute(chipClusterPtr, callback); + } + public void subscribeStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOrderAttribute( + IntegerAttributeCallback callback + ) { + readOrderAttribute(chipClusterPtr, callback); + } + public void subscribeOrderAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOrderAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredAssessedInputVoltageAttribute( + WiredAssessedInputVoltageAttributeCallback callback + ) { + readWiredAssessedInputVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeWiredAssessedInputVoltageAttribute( + WiredAssessedInputVoltageAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeWiredAssessedInputVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredAssessedInputFrequencyAttribute( + WiredAssessedInputFrequencyAttributeCallback callback + ) { + readWiredAssessedInputFrequencyAttribute(chipClusterPtr, callback); + } + public void subscribeWiredAssessedInputFrequencyAttribute( + WiredAssessedInputFrequencyAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeWiredAssessedInputFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredCurrentTypeAttribute( + IntegerAttributeCallback callback + ) { + readWiredCurrentTypeAttribute(chipClusterPtr, callback); + } + public void subscribeWiredCurrentTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWiredCurrentTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredAssessedCurrentAttribute( + WiredAssessedCurrentAttributeCallback callback + ) { + readWiredAssessedCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeWiredAssessedCurrentAttribute( + WiredAssessedCurrentAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeWiredAssessedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredNominalVoltageAttribute( + LongAttributeCallback callback + ) { + readWiredNominalVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeWiredNominalVoltageAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWiredNominalVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredMaximumCurrentAttribute( + LongAttributeCallback callback + ) { + readWiredMaximumCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeWiredMaximumCurrentAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWiredMaximumCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiredPresentAttribute( + BooleanAttributeCallback callback + ) { + readWiredPresentAttribute(chipClusterPtr, callback); + } + public void subscribeWiredPresentAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWiredPresentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveWiredFaultsAttribute( + ActiveWiredFaultsAttributeCallback callback + ) { + readActiveWiredFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveWiredFaultsAttribute( + ActiveWiredFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveWiredFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatVoltageAttribute( + BatVoltageAttributeCallback callback + ) { + readBatVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeBatVoltageAttribute( + BatVoltageAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBatVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatPercentRemainingAttribute( + BatPercentRemainingAttributeCallback callback + ) { + readBatPercentRemainingAttribute(chipClusterPtr, callback); + } + public void subscribeBatPercentRemainingAttribute( + BatPercentRemainingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBatPercentRemainingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatTimeRemainingAttribute( + BatTimeRemainingAttributeCallback callback + ) { + readBatTimeRemainingAttribute(chipClusterPtr, callback); + } + public void subscribeBatTimeRemainingAttribute( + BatTimeRemainingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBatTimeRemainingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatChargeLevelAttribute( + IntegerAttributeCallback callback + ) { + readBatChargeLevelAttribute(chipClusterPtr, callback); + } + public void subscribeBatChargeLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatChargeLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatReplacementNeededAttribute( + BooleanAttributeCallback callback + ) { + readBatReplacementNeededAttribute(chipClusterPtr, callback); + } + public void subscribeBatReplacementNeededAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatReplacementNeededAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatReplaceabilityAttribute( + IntegerAttributeCallback callback + ) { + readBatReplaceabilityAttribute(chipClusterPtr, callback); + } + public void subscribeBatReplaceabilityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatReplaceabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatPresentAttribute( + BooleanAttributeCallback callback + ) { + readBatPresentAttribute(chipClusterPtr, callback); + } + public void subscribeBatPresentAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatPresentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveBatFaultsAttribute( + ActiveBatFaultsAttributeCallback callback + ) { + readActiveBatFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveBatFaultsAttribute( + ActiveBatFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveBatFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatReplacementDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readBatReplacementDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeBatReplacementDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatReplacementDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatCommonDesignationAttribute( + IntegerAttributeCallback callback + ) { + readBatCommonDesignationAttribute(chipClusterPtr, callback); + } + public void subscribeBatCommonDesignationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatCommonDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatANSIDesignationAttribute( + CharStringAttributeCallback callback + ) { + readBatANSIDesignationAttribute(chipClusterPtr, callback); + } + public void subscribeBatANSIDesignationAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatANSIDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatIECDesignationAttribute( + CharStringAttributeCallback callback + ) { + readBatIECDesignationAttribute(chipClusterPtr, callback); + } + public void subscribeBatIECDesignationAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatIECDesignationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatApprovedChemistryAttribute( + IntegerAttributeCallback callback + ) { + readBatApprovedChemistryAttribute(chipClusterPtr, callback); + } + public void subscribeBatApprovedChemistryAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatApprovedChemistryAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatCapacityAttribute( + LongAttributeCallback callback + ) { + readBatCapacityAttribute(chipClusterPtr, callback); + } + public void subscribeBatCapacityAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatQuantityAttribute( + IntegerAttributeCallback callback + ) { + readBatQuantityAttribute(chipClusterPtr, callback); + } + public void subscribeBatQuantityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatQuantityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatChargeStateAttribute( + IntegerAttributeCallback callback + ) { + readBatChargeStateAttribute(chipClusterPtr, callback); + } + public void subscribeBatChargeStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatChargeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatTimeToFullChargeAttribute( + BatTimeToFullChargeAttributeCallback callback + ) { + readBatTimeToFullChargeAttribute(chipClusterPtr, callback); + } + public void subscribeBatTimeToFullChargeAttribute( + BatTimeToFullChargeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBatTimeToFullChargeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatFunctionalWhileChargingAttribute( + BooleanAttributeCallback callback + ) { + readBatFunctionalWhileChargingAttribute(chipClusterPtr, callback); + } + public void subscribeBatFunctionalWhileChargingAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatFunctionalWhileChargingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatChargingCurrentAttribute( + BatChargingCurrentAttributeCallback callback + ) { + readBatChargingCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeBatChargingCurrentAttribute( + BatChargingCurrentAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBatChargingCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveBatChargeFaultsAttribute( + ActiveBatChargeFaultsAttributeCallback callback + ) { + readActiveBatChargeFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveBatChargeFaultsAttribute( + ActiveBatChargeFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveBatChargeFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEndpointListAttribute( + EndpointListAttributeCallback callback + ) { + readEndpointListAttribute(chipClusterPtr, callback); + } + public void subscribeEndpointListAttribute( + EndpointListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEndpointListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOrderAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOrderAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWiredAssessedInputVoltageAttribute(long chipClusterPtr, + WiredAssessedInputVoltageAttributeCallback callback + ); + private native void subscribeWiredAssessedInputVoltageAttribute(long chipClusterPtr, + WiredAssessedInputVoltageAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWiredAssessedInputFrequencyAttribute(long chipClusterPtr, + WiredAssessedInputFrequencyAttributeCallback callback + ); + private native void subscribeWiredAssessedInputFrequencyAttribute(long chipClusterPtr, + WiredAssessedInputFrequencyAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWiredCurrentTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeWiredCurrentTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWiredAssessedCurrentAttribute(long chipClusterPtr, + WiredAssessedCurrentAttributeCallback callback + ); + private native void subscribeWiredAssessedCurrentAttribute(long chipClusterPtr, + WiredAssessedCurrentAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWiredNominalVoltageAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeWiredNominalVoltageAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWiredMaximumCurrentAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeWiredMaximumCurrentAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWiredPresentAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeWiredPresentAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveWiredFaultsAttribute(long chipClusterPtr, + ActiveWiredFaultsAttributeCallback callback + ); + private native void subscribeActiveWiredFaultsAttribute(long chipClusterPtr, + ActiveWiredFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatVoltageAttribute(long chipClusterPtr, + BatVoltageAttributeCallback callback + ); + private native void subscribeBatVoltageAttribute(long chipClusterPtr, + BatVoltageAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatPercentRemainingAttribute(long chipClusterPtr, + BatPercentRemainingAttributeCallback callback + ); + private native void subscribeBatPercentRemainingAttribute(long chipClusterPtr, + BatPercentRemainingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatTimeRemainingAttribute(long chipClusterPtr, + BatTimeRemainingAttributeCallback callback + ); + private native void subscribeBatTimeRemainingAttribute(long chipClusterPtr, + BatTimeRemainingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatChargeLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatChargeLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatReplacementNeededAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeBatReplacementNeededAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatReplaceabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatReplaceabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatPresentAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeBatPresentAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveBatFaultsAttribute(long chipClusterPtr, + ActiveBatFaultsAttributeCallback callback + ); + private native void subscribeActiveBatFaultsAttribute(long chipClusterPtr, + ActiveBatFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatReplacementDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeBatReplacementDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatCommonDesignationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatCommonDesignationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatANSIDesignationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeBatANSIDesignationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatIECDesignationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeBatIECDesignationAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatApprovedChemistryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatApprovedChemistryAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatCapacityAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeBatCapacityAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatQuantityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatQuantityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatChargeStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatChargeStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatTimeToFullChargeAttribute(long chipClusterPtr, + BatTimeToFullChargeAttributeCallback callback + ); + private native void subscribeBatTimeToFullChargeAttribute(long chipClusterPtr, + BatTimeToFullChargeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBatFunctionalWhileChargingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeBatFunctionalWhileChargingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatChargingCurrentAttribute(long chipClusterPtr, + BatChargingCurrentAttributeCallback callback + ); + private native void subscribeBatChargingCurrentAttribute(long chipClusterPtr, + BatChargingCurrentAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readActiveBatChargeFaultsAttribute(long chipClusterPtr, + ActiveBatChargeFaultsAttributeCallback callback + ); + private native void subscribeActiveBatChargeFaultsAttribute(long chipClusterPtr, + ActiveBatChargeFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEndpointListAttribute(long chipClusterPtr, + EndpointListAttributeCallback callback + ); + private native void subscribeEndpointListAttribute(long chipClusterPtr, + EndpointListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class GeneralCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000030L; + + public GeneralCommissioningCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void armFailSafe(ArmFailSafeResponseCallback callback + , Integer expiryLengthSeconds, Long breadcrumb) { + armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, null); + } + + public void armFailSafe(ArmFailSafeResponseCallback callback + , Integer expiryLengthSeconds, Long breadcrumb + , int timedInvokeTimeoutMs) { + armFailSafe(chipClusterPtr, callback, expiryLengthSeconds, breadcrumb, timedInvokeTimeoutMs); + } + + public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback + , Integer newRegulatoryConfig, String countryCode, Long breadcrumb) { + setRegulatoryConfig(chipClusterPtr, callback, newRegulatoryConfig, countryCode, breadcrumb, null); + } + + public void setRegulatoryConfig(SetRegulatoryConfigResponseCallback callback + , Integer newRegulatoryConfig, String countryCode, Long breadcrumb + , int timedInvokeTimeoutMs) { + setRegulatoryConfig(chipClusterPtr, callback, newRegulatoryConfig, countryCode, breadcrumb, timedInvokeTimeoutMs); + } + + public void commissioningComplete(CommissioningCompleteResponseCallback callback + ) { + commissioningComplete(chipClusterPtr, callback, null); + } + + public void commissioningComplete(CommissioningCompleteResponseCallback callback + + , int timedInvokeTimeoutMs) { + commissioningComplete(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void armFailSafe(long chipClusterPtr, ArmFailSafeResponseCallback Callback + , Integer expiryLengthSeconds, Long breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void setRegulatoryConfig(long chipClusterPtr, SetRegulatoryConfigResponseCallback Callback + , Integer newRegulatoryConfig, String countryCode, Long breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void commissioningComplete(long chipClusterPtr, CommissioningCompleteResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface ArmFailSafeResponseCallback { + void onSuccess(Integer errorCode, String debugText); + + void onError(Exception error); + } + + public interface SetRegulatoryConfigResponseCallback { + void onSuccess(Integer errorCode, String debugText); + + void onError(Exception error); + } + + public interface CommissioningCompleteResponseCallback { + void onSuccess(Integer errorCode, String debugText); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readBreadcrumbAttribute( + LongAttributeCallback callback + ) { + readBreadcrumbAttribute(chipClusterPtr, callback); + } + public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value) { + writeBreadcrumbAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBreadcrumbAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBreadcrumbAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBreadcrumbAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBreadcrumbAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRegulatoryConfigAttribute( + IntegerAttributeCallback callback + ) { + readRegulatoryConfigAttribute(chipClusterPtr, callback); + } + public void subscribeRegulatoryConfigAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRegulatoryConfigAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocationCapabilityAttribute( + IntegerAttributeCallback callback + ) { + readLocationCapabilityAttribute(chipClusterPtr, callback); + } + public void subscribeLocationCapabilityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLocationCapabilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportsConcurrentConnectionAttribute( + BooleanAttributeCallback callback + ) { + readSupportsConcurrentConnectionAttribute(chipClusterPtr, callback); + } + public void subscribeSupportsConcurrentConnectionAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportsConcurrentConnectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readBreadcrumbAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeBreadcrumbAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBreadcrumbAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRegulatoryConfigAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRegulatoryConfigAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLocationCapabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLocationCapabilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportsConcurrentConnectionAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeSupportsConcurrentConnectionAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class NetworkCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000031L; + + public NetworkCommissioningCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void scanNetworks(ScanNetworksResponseCallback callback + , @Nullable Optional ssid, Optional breadcrumb) { + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, null); + } + + public void scanNetworks(ScanNetworksResponseCallback callback + , @Nullable Optional ssid, Optional breadcrumb + , int timedInvokeTimeoutMs) { + scanNetworks(chipClusterPtr, callback, ssid, breadcrumb, timedInvokeTimeoutMs); + } + + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback + , byte[] ssid, byte[] credentials, Optional breadcrumb) { + addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, null); + } + + public void addOrUpdateWiFiNetwork(NetworkConfigResponseCallback callback + , byte[] ssid, byte[] credentials, Optional breadcrumb + , int timedInvokeTimeoutMs) { + addOrUpdateWiFiNetwork(chipClusterPtr, callback, ssid, credentials, breadcrumb, timedInvokeTimeoutMs); + } + + public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback + , byte[] operationalDataset, Optional breadcrumb) { + addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, null); + } + + public void addOrUpdateThreadNetwork(NetworkConfigResponseCallback callback + , byte[] operationalDataset, Optional breadcrumb + , int timedInvokeTimeoutMs) { + addOrUpdateThreadNetwork(chipClusterPtr, callback, operationalDataset, breadcrumb, timedInvokeTimeoutMs); + } + + public void removeNetwork(NetworkConfigResponseCallback callback + , byte[] networkID, Optional breadcrumb) { + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void removeNetwork(NetworkConfigResponseCallback callback + , byte[] networkID, Optional breadcrumb + , int timedInvokeTimeoutMs) { + removeNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); + } + + public void connectNetwork(ConnectNetworkResponseCallback callback + , byte[] networkID, Optional breadcrumb) { + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, null); + } + + public void connectNetwork(ConnectNetworkResponseCallback callback + , byte[] networkID, Optional breadcrumb + , int timedInvokeTimeoutMs) { + connectNetwork(chipClusterPtr, callback, networkID, breadcrumb, timedInvokeTimeoutMs); + } + + public void reorderNetwork(NetworkConfigResponseCallback callback + , byte[] networkID, Integer networkIndex, Optional breadcrumb) { + reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, null); + } + + public void reorderNetwork(NetworkConfigResponseCallback callback + , byte[] networkID, Integer networkIndex, Optional breadcrumb + , int timedInvokeTimeoutMs) { + reorderNetwork(chipClusterPtr, callback, networkID, networkIndex, breadcrumb, timedInvokeTimeoutMs); + } + private native void scanNetworks(long chipClusterPtr, ScanNetworksResponseCallback Callback + , @Nullable Optional ssid, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void addOrUpdateWiFiNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback + , byte[] ssid, byte[] credentials, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void addOrUpdateThreadNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback + , byte[] operationalDataset, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback + , byte[] networkID, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void connectNetwork(long chipClusterPtr, ConnectNetworkResponseCallback Callback + , byte[] networkID, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + private native void reorderNetwork(long chipClusterPtr, NetworkConfigResponseCallback Callback + , byte[] networkID, Integer networkIndex, Optional breadcrumb + , @Nullable Integer timedInvokeTimeoutMs); + public interface ScanNetworksResponseCallback { + void onSuccess(Integer networkingStatus, Optional debugText, Optional> wiFiScanResults, Optional> threadScanResults); + + void onError(Exception error); + } + + public interface NetworkConfigResponseCallback { + void onSuccess(Integer networkingStatus, Optional debugText, Optional networkIndex); + + void onError(Exception error); + } + + public interface ConnectNetworkResponseCallback { + void onSuccess(Integer networkingStatus, Optional debugText, @Nullable Long errorValue); + + void onError(Exception error); + } + + + public interface NetworksAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LastNetworkingStatusAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LastNetworkIDAttributeCallback { + void onSuccess(@Nullable byte[] value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LastConnectErrorValueAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaxNetworksAttribute( + IntegerAttributeCallback callback + ) { + readMaxNetworksAttribute(chipClusterPtr, callback); + } + public void subscribeMaxNetworksAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNetworksAttribute( + NetworksAttributeCallback callback + ) { + readNetworksAttribute(chipClusterPtr, callback); + } + public void subscribeNetworksAttribute( + NetworksAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNetworksAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScanMaxTimeSecondsAttribute( + IntegerAttributeCallback callback + ) { + readScanMaxTimeSecondsAttribute(chipClusterPtr, callback); + } + public void subscribeScanMaxTimeSecondsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeScanMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readConnectMaxTimeSecondsAttribute( + IntegerAttributeCallback callback + ) { + readConnectMaxTimeSecondsAttribute(chipClusterPtr, callback); + } + public void subscribeConnectMaxTimeSecondsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeConnectMaxTimeSecondsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInterfaceEnabledAttribute( + BooleanAttributeCallback callback + ) { + readInterfaceEnabledAttribute(chipClusterPtr, callback); + } + public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value) { + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInterfaceEnabledAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeInterfaceEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInterfaceEnabledAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInterfaceEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastNetworkingStatusAttribute( + LastNetworkingStatusAttributeCallback callback + ) { + readLastNetworkingStatusAttribute(chipClusterPtr, callback); + } + public void subscribeLastNetworkingStatusAttribute( + LastNetworkingStatusAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastNetworkingStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastNetworkIDAttribute( + LastNetworkIDAttributeCallback callback + ) { + readLastNetworkIDAttribute(chipClusterPtr, callback); + } + public void subscribeLastNetworkIDAttribute( + LastNetworkIDAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastNetworkIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastConnectErrorValueAttribute( + LastConnectErrorValueAttributeCallback callback + ) { + readLastConnectErrorValueAttribute(chipClusterPtr, callback); + } + public void subscribeLastConnectErrorValueAttribute( + LastConnectErrorValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastConnectErrorValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaxNetworksAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxNetworksAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNetworksAttribute(long chipClusterPtr, + NetworksAttributeCallback callback + ); + private native void subscribeNetworksAttribute(long chipClusterPtr, + NetworksAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readScanMaxTimeSecondsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeScanMaxTimeSecondsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readConnectMaxTimeSecondsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeConnectMaxTimeSecondsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInterfaceEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeInterfaceEnabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInterfaceEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLastNetworkingStatusAttribute(long chipClusterPtr, + LastNetworkingStatusAttributeCallback callback + ); + private native void subscribeLastNetworkingStatusAttribute(long chipClusterPtr, + LastNetworkingStatusAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLastNetworkIDAttribute(long chipClusterPtr, + LastNetworkIDAttributeCallback callback + ); + private native void subscribeLastNetworkIDAttribute(long chipClusterPtr, + LastNetworkIDAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLastConnectErrorValueAttribute(long chipClusterPtr, + LastConnectErrorValueAttributeCallback callback + ); + private native void subscribeLastConnectErrorValueAttribute(long chipClusterPtr, + LastConnectErrorValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DiagnosticLogsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000032L; + + public DiagnosticLogsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void retrieveLogsRequest(RetrieveLogsResponseCallback callback + , Integer intent, Integer requestedProtocol, Optional transferFileDesignator) { + retrieveLogsRequest(chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, null); + } + + public void retrieveLogsRequest(RetrieveLogsResponseCallback callback + , Integer intent, Integer requestedProtocol, Optional transferFileDesignator + , int timedInvokeTimeoutMs) { + retrieveLogsRequest(chipClusterPtr, callback, intent, requestedProtocol, transferFileDesignator, timedInvokeTimeoutMs); + } + private native void retrieveLogsRequest(long chipClusterPtr, RetrieveLogsResponseCallback Callback + , Integer intent, Integer requestedProtocol, Optional transferFileDesignator + , @Nullable Integer timedInvokeTimeoutMs); + public interface RetrieveLogsResponseCallback { + void onSuccess(Integer status, byte[] logContent, Optional UTCTimeStamp, Optional timeSinceBoot); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class GeneralDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000033L; + + public GeneralDiagnosticsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void testEventTrigger(DefaultClusterCallback callback + , byte[] enableKey, Long eventTrigger) { + testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, null); + } + + public void testEventTrigger(DefaultClusterCallback callback + , byte[] enableKey, Long eventTrigger + , int timedInvokeTimeoutMs) { + testEventTrigger(chipClusterPtr, callback, enableKey, eventTrigger, timedInvokeTimeoutMs); + } + private native void testEventTrigger(long chipClusterPtr, DefaultClusterCallback Callback + , byte[] enableKey, Long eventTrigger + , @Nullable Integer timedInvokeTimeoutMs); + + public interface NetworkInterfacesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveHardwareFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveRadioFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveNetworkFaultsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readNetworkInterfacesAttribute( + NetworkInterfacesAttributeCallback callback + ) { + readNetworkInterfacesAttribute(chipClusterPtr, callback); + } + public void subscribeNetworkInterfacesAttribute( + NetworkInterfacesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNetworkInterfacesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRebootCountAttribute( + IntegerAttributeCallback callback + ) { + readRebootCountAttribute(chipClusterPtr, callback); + } + public void subscribeRebootCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRebootCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUpTimeAttribute( + LongAttributeCallback callback + ) { + readUpTimeAttribute(chipClusterPtr, callback); + } + public void subscribeUpTimeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUpTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTotalOperationalHoursAttribute( + LongAttributeCallback callback + ) { + readTotalOperationalHoursAttribute(chipClusterPtr, callback); + } + public void subscribeTotalOperationalHoursAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTotalOperationalHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBootReasonAttribute( + IntegerAttributeCallback callback + ) { + readBootReasonAttribute(chipClusterPtr, callback); + } + public void subscribeBootReasonAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBootReasonAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveHardwareFaultsAttribute( + ActiveHardwareFaultsAttributeCallback callback + ) { + readActiveHardwareFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveHardwareFaultsAttribute( + ActiveHardwareFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveHardwareFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveRadioFaultsAttribute( + ActiveRadioFaultsAttributeCallback callback + ) { + readActiveRadioFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveRadioFaultsAttribute( + ActiveRadioFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveRadioFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveNetworkFaultsAttribute( + ActiveNetworkFaultsAttributeCallback callback + ) { + readActiveNetworkFaultsAttribute(chipClusterPtr, callback); + } + public void subscribeActiveNetworkFaultsAttribute( + ActiveNetworkFaultsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveNetworkFaultsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTestEventTriggersEnabledAttribute( + BooleanAttributeCallback callback + ) { + readTestEventTriggersEnabledAttribute(chipClusterPtr, callback); + } + public void subscribeTestEventTriggersEnabledAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTestEventTriggersEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageWearCountAttribute( + LongAttributeCallback callback + ) { + readAverageWearCountAttribute(chipClusterPtr, callback); + } + public void subscribeAverageWearCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageWearCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readNetworkInterfacesAttribute(long chipClusterPtr, + NetworkInterfacesAttributeCallback callback + ); + private native void subscribeNetworkInterfacesAttribute(long chipClusterPtr, + NetworkInterfacesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRebootCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRebootCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUpTimeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeUpTimeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTotalOperationalHoursAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTotalOperationalHoursAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBootReasonAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBootReasonAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveHardwareFaultsAttribute(long chipClusterPtr, + ActiveHardwareFaultsAttributeCallback callback + ); + private native void subscribeActiveHardwareFaultsAttribute(long chipClusterPtr, + ActiveHardwareFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readActiveRadioFaultsAttribute(long chipClusterPtr, + ActiveRadioFaultsAttributeCallback callback + ); + private native void subscribeActiveRadioFaultsAttribute(long chipClusterPtr, + ActiveRadioFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readActiveNetworkFaultsAttribute(long chipClusterPtr, + ActiveNetworkFaultsAttributeCallback callback + ); + private native void subscribeActiveNetworkFaultsAttribute(long chipClusterPtr, + ActiveNetworkFaultsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTestEventTriggersEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeTestEventTriggersEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageWearCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageWearCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class SoftwareDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000034L; + + public SoftwareDiagnosticsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetWatermarks(DefaultClusterCallback callback + ) { + resetWatermarks(chipClusterPtr, callback, null); + } + + public void resetWatermarks(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetWatermarks(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetWatermarks(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface ThreadMetricsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readThreadMetricsAttribute( + ThreadMetricsAttributeCallback callback + ) { + readThreadMetricsAttribute(chipClusterPtr, callback); + } + public void subscribeThreadMetricsAttribute( + ThreadMetricsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeThreadMetricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentHeapFreeAttribute( + LongAttributeCallback callback + ) { + readCurrentHeapFreeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentHeapFreeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentHeapFreeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentHeapUsedAttribute( + LongAttributeCallback callback + ) { + readCurrentHeapUsedAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentHeapUsedAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentHeapUsedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentHeapHighWatermarkAttribute( + LongAttributeCallback callback + ) { + readCurrentHeapHighWatermarkAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentHeapHighWatermarkAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentHeapHighWatermarkAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readThreadMetricsAttribute(long chipClusterPtr, + ThreadMetricsAttributeCallback callback + ); + private native void subscribeThreadMetricsAttribute(long chipClusterPtr, + ThreadMetricsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentHeapFreeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeCurrentHeapFreeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentHeapUsedAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeCurrentHeapUsedAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentHeapHighWatermarkAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeCurrentHeapHighWatermarkAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ThreadNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000035L; + + public ThreadNetworkDiagnosticsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetCounts(DefaultClusterCallback callback + ) { + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface ChannelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface RoutingRoleAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NetworkNameAttributeCallback { + void onSuccess(@Nullable String value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PanIdAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ExtendedPanIdAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MeshLocalPrefixAttributeCallback { + void onSuccess(@Nullable byte[] value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NeighborTableAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface RouteTableAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PartitionIdAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface WeightingAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DataVersionAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StableDataVersionAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LeaderRouterIdAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveTimestampAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PendingTimestampAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DelayAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ChannelPage0MaskAttributeCallback { + void onSuccess(@Nullable byte[] value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ActiveNetworkFaultsListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readChannelAttribute( + ChannelAttributeCallback callback + ) { + readChannelAttribute(chipClusterPtr, callback); + } + public void subscribeChannelAttribute( + ChannelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeChannelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRoutingRoleAttribute( + RoutingRoleAttributeCallback callback + ) { + readRoutingRoleAttribute(chipClusterPtr, callback); + } + public void subscribeRoutingRoleAttribute( + RoutingRoleAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeRoutingRoleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNetworkNameAttribute( + NetworkNameAttributeCallback callback + ) { + readNetworkNameAttribute(chipClusterPtr, callback); + } + public void subscribeNetworkNameAttribute( + NetworkNameAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNetworkNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPanIdAttribute( + PanIdAttributeCallback callback + ) { + readPanIdAttribute(chipClusterPtr, callback); + } + public void subscribePanIdAttribute( + PanIdAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePanIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readExtendedPanIdAttribute( + ExtendedPanIdAttributeCallback callback + ) { + readExtendedPanIdAttribute(chipClusterPtr, callback); + } + public void subscribeExtendedPanIdAttribute( + ExtendedPanIdAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeExtendedPanIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeshLocalPrefixAttribute( + MeshLocalPrefixAttributeCallback callback + ) { + readMeshLocalPrefixAttribute(chipClusterPtr, callback); + } + public void subscribeMeshLocalPrefixAttribute( + MeshLocalPrefixAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeshLocalPrefixAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOverrunCountAttribute( + LongAttributeCallback callback + ) { + readOverrunCountAttribute(chipClusterPtr, callback); + } + public void subscribeOverrunCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNeighborTableAttribute( + NeighborTableAttributeCallback callback + ) { + readNeighborTableAttribute(chipClusterPtr, callback); + } + public void subscribeNeighborTableAttribute( + NeighborTableAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNeighborTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRouteTableAttribute( + RouteTableAttributeCallback callback + ) { + readRouteTableAttribute(chipClusterPtr, callback); + } + public void subscribeRouteTableAttribute( + RouteTableAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeRouteTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPartitionIdAttribute( + PartitionIdAttributeCallback callback + ) { + readPartitionIdAttribute(chipClusterPtr, callback); + } + public void subscribePartitionIdAttribute( + PartitionIdAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePartitionIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWeightingAttribute( + WeightingAttributeCallback callback + ) { + readWeightingAttribute(chipClusterPtr, callback); + } + public void subscribeWeightingAttribute( + WeightingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeWeightingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDataVersionAttribute( + DataVersionAttributeCallback callback + ) { + readDataVersionAttribute(chipClusterPtr, callback); + } + public void subscribeDataVersionAttribute( + DataVersionAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDataVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStableDataVersionAttribute( + StableDataVersionAttributeCallback callback + ) { + readStableDataVersionAttribute(chipClusterPtr, callback); + } + public void subscribeStableDataVersionAttribute( + StableDataVersionAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStableDataVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLeaderRouterIdAttribute( + LeaderRouterIdAttributeCallback callback + ) { + readLeaderRouterIdAttribute(chipClusterPtr, callback); + } + public void subscribeLeaderRouterIdAttribute( + LeaderRouterIdAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLeaderRouterIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDetachedRoleCountAttribute( + IntegerAttributeCallback callback + ) { + readDetachedRoleCountAttribute(chipClusterPtr, callback); + } + public void subscribeDetachedRoleCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDetachedRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readChildRoleCountAttribute( + IntegerAttributeCallback callback + ) { + readChildRoleCountAttribute(chipClusterPtr, callback); + } + public void subscribeChildRoleCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeChildRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRouterRoleCountAttribute( + IntegerAttributeCallback callback + ) { + readRouterRoleCountAttribute(chipClusterPtr, callback); + } + public void subscribeRouterRoleCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRouterRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLeaderRoleCountAttribute( + IntegerAttributeCallback callback + ) { + readLeaderRoleCountAttribute(chipClusterPtr, callback); + } + public void subscribeLeaderRoleCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLeaderRoleCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttachAttemptCountAttribute( + IntegerAttributeCallback callback + ) { + readAttachAttemptCountAttribute(chipClusterPtr, callback); + } + public void subscribeAttachAttemptCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAttachAttemptCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPartitionIdChangeCountAttribute( + IntegerAttributeCallback callback + ) { + readPartitionIdChangeCountAttribute(chipClusterPtr, callback); + } + public void subscribePartitionIdChangeCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePartitionIdChangeCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBetterPartitionAttachAttemptCountAttribute( + IntegerAttributeCallback callback + ) { + readBetterPartitionAttachAttemptCountAttribute(chipClusterPtr, callback); + } + public void subscribeBetterPartitionAttachAttemptCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBetterPartitionAttachAttemptCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readParentChangeCountAttribute( + IntegerAttributeCallback callback + ) { + readParentChangeCountAttribute(chipClusterPtr, callback); + } + public void subscribeParentChangeCountAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeParentChangeCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxTotalCountAttribute( + LongAttributeCallback callback + ) { + readTxTotalCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxTotalCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxTotalCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxUnicastCountAttribute( + LongAttributeCallback callback + ) { + readTxUnicastCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxUnicastCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxUnicastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxBroadcastCountAttribute( + LongAttributeCallback callback + ) { + readTxBroadcastCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxBroadcastCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxBroadcastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxAckRequestedCountAttribute( + LongAttributeCallback callback + ) { + readTxAckRequestedCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxAckRequestedCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxAckRequestedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxAckedCountAttribute( + LongAttributeCallback callback + ) { + readTxAckedCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxAckedCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxAckedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxNoAckRequestedCountAttribute( + LongAttributeCallback callback + ) { + readTxNoAckRequestedCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxNoAckRequestedCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxNoAckRequestedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxDataCountAttribute( + LongAttributeCallback callback + ) { + readTxDataCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxDataCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxDataCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxDataPollCountAttribute( + LongAttributeCallback callback + ) { + readTxDataPollCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxDataPollCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxDataPollCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxBeaconCountAttribute( + LongAttributeCallback callback + ) { + readTxBeaconCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxBeaconCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxBeaconCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxBeaconRequestCountAttribute( + LongAttributeCallback callback + ) { + readTxBeaconRequestCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxBeaconRequestCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxBeaconRequestCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxOtherCountAttribute( + LongAttributeCallback callback + ) { + readTxOtherCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxOtherCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxRetryCountAttribute( + LongAttributeCallback callback + ) { + readTxRetryCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxRetryCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxRetryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxDirectMaxRetryExpiryCountAttribute( + LongAttributeCallback callback + ) { + readTxDirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxDirectMaxRetryExpiryCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxDirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxIndirectMaxRetryExpiryCountAttribute( + LongAttributeCallback callback + ) { + readTxIndirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxIndirectMaxRetryExpiryCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxIndirectMaxRetryExpiryCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxErrCcaCountAttribute( + LongAttributeCallback callback + ) { + readTxErrCcaCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxErrCcaCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxErrCcaCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxErrAbortCountAttribute( + LongAttributeCallback callback + ) { + readTxErrAbortCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxErrAbortCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxErrAbortCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxErrBusyChannelCountAttribute( + LongAttributeCallback callback + ) { + readTxErrBusyChannelCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxErrBusyChannelCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxErrBusyChannelCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxTotalCountAttribute( + LongAttributeCallback callback + ) { + readRxTotalCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxTotalCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxTotalCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxUnicastCountAttribute( + LongAttributeCallback callback + ) { + readRxUnicastCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxUnicastCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxUnicastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxBroadcastCountAttribute( + LongAttributeCallback callback + ) { + readRxBroadcastCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxBroadcastCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxBroadcastCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxDataCountAttribute( + LongAttributeCallback callback + ) { + readRxDataCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxDataCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxDataCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxDataPollCountAttribute( + LongAttributeCallback callback + ) { + readRxDataPollCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxDataPollCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxDataPollCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxBeaconCountAttribute( + LongAttributeCallback callback + ) { + readRxBeaconCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxBeaconCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxBeaconCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxBeaconRequestCountAttribute( + LongAttributeCallback callback + ) { + readRxBeaconRequestCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxBeaconRequestCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxBeaconRequestCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxOtherCountAttribute( + LongAttributeCallback callback + ) { + readRxOtherCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxOtherCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxAddressFilteredCountAttribute( + LongAttributeCallback callback + ) { + readRxAddressFilteredCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxAddressFilteredCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxAddressFilteredCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxDestAddrFilteredCountAttribute( + LongAttributeCallback callback + ) { + readRxDestAddrFilteredCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxDestAddrFilteredCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxDestAddrFilteredCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxDuplicatedCountAttribute( + LongAttributeCallback callback + ) { + readRxDuplicatedCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxDuplicatedCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxDuplicatedCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrNoFrameCountAttribute( + LongAttributeCallback callback + ) { + readRxErrNoFrameCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrNoFrameCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrNoFrameCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrUnknownNeighborCountAttribute( + LongAttributeCallback callback + ) { + readRxErrUnknownNeighborCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrUnknownNeighborCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrUnknownNeighborCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrInvalidSrcAddrCountAttribute( + LongAttributeCallback callback + ) { + readRxErrInvalidSrcAddrCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrInvalidSrcAddrCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrInvalidSrcAddrCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrSecCountAttribute( + LongAttributeCallback callback + ) { + readRxErrSecCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrSecCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrSecCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrFcsCountAttribute( + LongAttributeCallback callback + ) { + readRxErrFcsCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrFcsCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrFcsCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRxErrOtherCountAttribute( + LongAttributeCallback callback + ) { + readRxErrOtherCountAttribute(chipClusterPtr, callback); + } + public void subscribeRxErrOtherCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRxErrOtherCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveTimestampAttribute( + ActiveTimestampAttributeCallback callback + ) { + readActiveTimestampAttribute(chipClusterPtr, callback); + } + public void subscribeActiveTimestampAttribute( + ActiveTimestampAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPendingTimestampAttribute( + PendingTimestampAttributeCallback callback + ) { + readPendingTimestampAttribute(chipClusterPtr, callback); + } + public void subscribePendingTimestampAttribute( + PendingTimestampAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePendingTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDelayAttribute( + DelayAttributeCallback callback + ) { + readDelayAttribute(chipClusterPtr, callback); + } + public void subscribeDelayAttribute( + DelayAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readChannelPage0MaskAttribute( + ChannelPage0MaskAttributeCallback callback + ) { + readChannelPage0MaskAttribute(chipClusterPtr, callback); + } + public void subscribeChannelPage0MaskAttribute( + ChannelPage0MaskAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeChannelPage0MaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveNetworkFaultsListAttribute( + ActiveNetworkFaultsListAttributeCallback callback + ) { + readActiveNetworkFaultsListAttribute(chipClusterPtr, callback); + } + public void subscribeActiveNetworkFaultsListAttribute( + ActiveNetworkFaultsListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeActiveNetworkFaultsListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readChannelAttribute(long chipClusterPtr, + ChannelAttributeCallback callback + ); + private native void subscribeChannelAttribute(long chipClusterPtr, + ChannelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRoutingRoleAttribute(long chipClusterPtr, + RoutingRoleAttributeCallback callback + ); + private native void subscribeRoutingRoleAttribute(long chipClusterPtr, + RoutingRoleAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNetworkNameAttribute(long chipClusterPtr, + NetworkNameAttributeCallback callback + ); + private native void subscribeNetworkNameAttribute(long chipClusterPtr, + NetworkNameAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPanIdAttribute(long chipClusterPtr, + PanIdAttributeCallback callback + ); + private native void subscribePanIdAttribute(long chipClusterPtr, + PanIdAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readExtendedPanIdAttribute(long chipClusterPtr, + ExtendedPanIdAttributeCallback callback + ); + private native void subscribeExtendedPanIdAttribute(long chipClusterPtr, + ExtendedPanIdAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMeshLocalPrefixAttribute(long chipClusterPtr, + MeshLocalPrefixAttributeCallback callback + ); + private native void subscribeMeshLocalPrefixAttribute(long chipClusterPtr, + MeshLocalPrefixAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOverrunCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeOverrunCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNeighborTableAttribute(long chipClusterPtr, + NeighborTableAttributeCallback callback + ); + private native void subscribeNeighborTableAttribute(long chipClusterPtr, + NeighborTableAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRouteTableAttribute(long chipClusterPtr, + RouteTableAttributeCallback callback + ); + private native void subscribeRouteTableAttribute(long chipClusterPtr, + RouteTableAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPartitionIdAttribute(long chipClusterPtr, + PartitionIdAttributeCallback callback + ); + private native void subscribePartitionIdAttribute(long chipClusterPtr, + PartitionIdAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWeightingAttribute(long chipClusterPtr, + WeightingAttributeCallback callback + ); + private native void subscribeWeightingAttribute(long chipClusterPtr, + WeightingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDataVersionAttribute(long chipClusterPtr, + DataVersionAttributeCallback callback + ); + private native void subscribeDataVersionAttribute(long chipClusterPtr, + DataVersionAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readStableDataVersionAttribute(long chipClusterPtr, + StableDataVersionAttributeCallback callback + ); + private native void subscribeStableDataVersionAttribute(long chipClusterPtr, + StableDataVersionAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLeaderRouterIdAttribute(long chipClusterPtr, + LeaderRouterIdAttributeCallback callback + ); + private native void subscribeLeaderRouterIdAttribute(long chipClusterPtr, + LeaderRouterIdAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDetachedRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDetachedRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readChildRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeChildRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRouterRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRouterRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLeaderRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLeaderRoleCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAttachAttemptCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAttachAttemptCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPartitionIdChangeCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePartitionIdChangeCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBetterPartitionAttachAttemptCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBetterPartitionAttachAttemptCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readParentChangeCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeParentChangeCountAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxTotalCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxTotalCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxUnicastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxUnicastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxBroadcastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxBroadcastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxAckRequestedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxAckRequestedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxAckedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxAckedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxNoAckRequestedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxNoAckRequestedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxDataCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxDataCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxDataPollCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxDataPollCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxBeaconCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxBeaconCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxBeaconRequestCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxBeaconRequestCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxRetryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxRetryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxDirectMaxRetryExpiryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxDirectMaxRetryExpiryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxIndirectMaxRetryExpiryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxIndirectMaxRetryExpiryCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxErrCcaCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxErrCcaCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxErrAbortCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxErrAbortCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxErrBusyChannelCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxErrBusyChannelCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxTotalCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxTotalCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxUnicastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxUnicastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxBroadcastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxBroadcastCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxDataCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxDataCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxDataPollCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxDataPollCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxBeaconCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxBeaconCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxBeaconRequestCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxBeaconRequestCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxAddressFilteredCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxAddressFilteredCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxDestAddrFilteredCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxDestAddrFilteredCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxDuplicatedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxDuplicatedCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrNoFrameCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrNoFrameCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrUnknownNeighborCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrUnknownNeighborCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrInvalidSrcAddrCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrInvalidSrcAddrCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrSecCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrSecCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrFcsCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrFcsCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRxErrOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeRxErrOtherCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveTimestampAttribute(long chipClusterPtr, + ActiveTimestampAttributeCallback callback + ); + private native void subscribeActiveTimestampAttribute(long chipClusterPtr, + ActiveTimestampAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPendingTimestampAttribute(long chipClusterPtr, + PendingTimestampAttributeCallback callback + ); + private native void subscribePendingTimestampAttribute(long chipClusterPtr, + PendingTimestampAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDelayAttribute(long chipClusterPtr, + DelayAttributeCallback callback + ); + private native void subscribeDelayAttribute(long chipClusterPtr, + DelayAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readChannelPage0MaskAttribute(long chipClusterPtr, + ChannelPage0MaskAttributeCallback callback + ); + private native void subscribeChannelPage0MaskAttribute(long chipClusterPtr, + ChannelPage0MaskAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readActiveNetworkFaultsListAttribute(long chipClusterPtr, + ActiveNetworkFaultsListAttributeCallback callback + ); + private native void subscribeActiveNetworkFaultsListAttribute(long chipClusterPtr, + ActiveNetworkFaultsListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class WiFiNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000036L; + + public WiFiNetworkDiagnosticsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetCounts(DefaultClusterCallback callback + ) { + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface BssidAttributeCallback { + void onSuccess(@Nullable byte[] value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SecurityTypeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface WiFiVersionAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ChannelNumberAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface RssiAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BeaconLostCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BeaconRxCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PacketMulticastRxCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PacketMulticastTxCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PacketUnicastRxCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PacketUnicastTxCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentMaxRateAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OverrunCountAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readBssidAttribute( + BssidAttributeCallback callback + ) { + readBssidAttribute(chipClusterPtr, callback); + } + public void subscribeBssidAttribute( + BssidAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBssidAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSecurityTypeAttribute( + SecurityTypeAttributeCallback callback + ) { + readSecurityTypeAttribute(chipClusterPtr, callback); + } + public void subscribeSecurityTypeAttribute( + SecurityTypeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSecurityTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWiFiVersionAttribute( + WiFiVersionAttributeCallback callback + ) { + readWiFiVersionAttribute(chipClusterPtr, callback); + } + public void subscribeWiFiVersionAttribute( + WiFiVersionAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeWiFiVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readChannelNumberAttribute( + ChannelNumberAttributeCallback callback + ) { + readChannelNumberAttribute(chipClusterPtr, callback); + } + public void subscribeChannelNumberAttribute( + ChannelNumberAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeChannelNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRssiAttribute( + RssiAttributeCallback callback + ) { + readRssiAttribute(chipClusterPtr, callback); + } + public void subscribeRssiAttribute( + RssiAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeRssiAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBeaconLostCountAttribute( + BeaconLostCountAttributeCallback callback + ) { + readBeaconLostCountAttribute(chipClusterPtr, callback); + } + public void subscribeBeaconLostCountAttribute( + BeaconLostCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBeaconLostCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBeaconRxCountAttribute( + BeaconRxCountAttributeCallback callback + ) { + readBeaconRxCountAttribute(chipClusterPtr, callback); + } + public void subscribeBeaconRxCountAttribute( + BeaconRxCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBeaconRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketMulticastRxCountAttribute( + PacketMulticastRxCountAttributeCallback callback + ) { + readPacketMulticastRxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketMulticastRxCountAttribute( + PacketMulticastRxCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePacketMulticastRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketMulticastTxCountAttribute( + PacketMulticastTxCountAttributeCallback callback + ) { + readPacketMulticastTxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketMulticastTxCountAttribute( + PacketMulticastTxCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePacketMulticastTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketUnicastRxCountAttribute( + PacketUnicastRxCountAttributeCallback callback + ) { + readPacketUnicastRxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketUnicastRxCountAttribute( + PacketUnicastRxCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePacketUnicastRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketUnicastTxCountAttribute( + PacketUnicastTxCountAttributeCallback callback + ) { + readPacketUnicastTxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketUnicastTxCountAttribute( + PacketUnicastTxCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePacketUnicastTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentMaxRateAttribute( + CurrentMaxRateAttributeCallback callback + ) { + readCurrentMaxRateAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentMaxRateAttribute( + CurrentMaxRateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentMaxRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOverrunCountAttribute( + OverrunCountAttributeCallback callback + ) { + readOverrunCountAttribute(chipClusterPtr, callback); + } + public void subscribeOverrunCountAttribute( + OverrunCountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readBssidAttribute(long chipClusterPtr, + BssidAttributeCallback callback + ); + private native void subscribeBssidAttribute(long chipClusterPtr, + BssidAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSecurityTypeAttribute(long chipClusterPtr, + SecurityTypeAttributeCallback callback + ); + private native void subscribeSecurityTypeAttribute(long chipClusterPtr, + SecurityTypeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWiFiVersionAttribute(long chipClusterPtr, + WiFiVersionAttributeCallback callback + ); + private native void subscribeWiFiVersionAttribute(long chipClusterPtr, + WiFiVersionAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readChannelNumberAttribute(long chipClusterPtr, + ChannelNumberAttributeCallback callback + ); + private native void subscribeChannelNumberAttribute(long chipClusterPtr, + ChannelNumberAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRssiAttribute(long chipClusterPtr, + RssiAttributeCallback callback + ); + private native void subscribeRssiAttribute(long chipClusterPtr, + RssiAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBeaconLostCountAttribute(long chipClusterPtr, + BeaconLostCountAttributeCallback callback + ); + private native void subscribeBeaconLostCountAttribute(long chipClusterPtr, + BeaconLostCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBeaconRxCountAttribute(long chipClusterPtr, + BeaconRxCountAttributeCallback callback + ); + private native void subscribeBeaconRxCountAttribute(long chipClusterPtr, + BeaconRxCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPacketMulticastRxCountAttribute(long chipClusterPtr, + PacketMulticastRxCountAttributeCallback callback + ); + private native void subscribePacketMulticastRxCountAttribute(long chipClusterPtr, + PacketMulticastRxCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPacketMulticastTxCountAttribute(long chipClusterPtr, + PacketMulticastTxCountAttributeCallback callback + ); + private native void subscribePacketMulticastTxCountAttribute(long chipClusterPtr, + PacketMulticastTxCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPacketUnicastRxCountAttribute(long chipClusterPtr, + PacketUnicastRxCountAttributeCallback callback + ); + private native void subscribePacketUnicastRxCountAttribute(long chipClusterPtr, + PacketUnicastRxCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPacketUnicastTxCountAttribute(long chipClusterPtr, + PacketUnicastTxCountAttributeCallback callback + ); + private native void subscribePacketUnicastTxCountAttribute(long chipClusterPtr, + PacketUnicastTxCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentMaxRateAttribute(long chipClusterPtr, + CurrentMaxRateAttributeCallback callback + ); + private native void subscribeCurrentMaxRateAttribute(long chipClusterPtr, + CurrentMaxRateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOverrunCountAttribute(long chipClusterPtr, + OverrunCountAttributeCallback callback + ); + private native void subscribeOverrunCountAttribute(long chipClusterPtr, + OverrunCountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class EthernetNetworkDiagnosticsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000037L; + + public EthernetNetworkDiagnosticsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetCounts(DefaultClusterCallback callback + ) { + resetCounts(chipClusterPtr, callback, null); + } + + public void resetCounts(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetCounts(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetCounts(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface PHYRateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface FullDuplexAttributeCallback { + void onSuccess(@Nullable Boolean value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CarrierDetectAttributeCallback { + void onSuccess(@Nullable Boolean value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readPHYRateAttribute( + PHYRateAttributeCallback callback + ) { + readPHYRateAttribute(chipClusterPtr, callback); + } + public void subscribePHYRateAttribute( + PHYRateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePHYRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFullDuplexAttribute( + FullDuplexAttributeCallback callback + ) { + readFullDuplexAttribute(chipClusterPtr, callback); + } + public void subscribeFullDuplexAttribute( + FullDuplexAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeFullDuplexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketRxCountAttribute( + LongAttributeCallback callback + ) { + readPacketRxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketRxCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePacketRxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPacketTxCountAttribute( + LongAttributeCallback callback + ) { + readPacketTxCountAttribute(chipClusterPtr, callback); + } + public void subscribePacketTxCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePacketTxCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTxErrCountAttribute( + LongAttributeCallback callback + ) { + readTxErrCountAttribute(chipClusterPtr, callback); + } + public void subscribeTxErrCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTxErrCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCollisionCountAttribute( + LongAttributeCallback callback + ) { + readCollisionCountAttribute(chipClusterPtr, callback); + } + public void subscribeCollisionCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCollisionCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOverrunCountAttribute( + LongAttributeCallback callback + ) { + readOverrunCountAttribute(chipClusterPtr, callback); + } + public void subscribeOverrunCountAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOverrunCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCarrierDetectAttribute( + CarrierDetectAttributeCallback callback + ) { + readCarrierDetectAttribute(chipClusterPtr, callback); + } + public void subscribeCarrierDetectAttribute( + CarrierDetectAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCarrierDetectAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeSinceResetAttribute( + LongAttributeCallback callback + ) { + readTimeSinceResetAttribute(chipClusterPtr, callback); + } + public void subscribeTimeSinceResetAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTimeSinceResetAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readPHYRateAttribute(long chipClusterPtr, + PHYRateAttributeCallback callback + ); + private native void subscribePHYRateAttribute(long chipClusterPtr, + PHYRateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFullDuplexAttribute(long chipClusterPtr, + FullDuplexAttributeCallback callback + ); + private native void subscribeFullDuplexAttribute(long chipClusterPtr, + FullDuplexAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPacketRxCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePacketRxCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPacketTxCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePacketTxCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTxErrCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTxErrCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCollisionCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeCollisionCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOverrunCountAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeOverrunCountAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCarrierDetectAttribute(long chipClusterPtr, + CarrierDetectAttributeCallback callback + ); + private native void subscribeCarrierDetectAttribute(long chipClusterPtr, + CarrierDetectAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTimeSinceResetAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTimeSinceResetAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TimeSynchronizationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000038L; + + public TimeSynchronizationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void setUTCTime(DefaultClusterCallback callback + , Long UTCTime, Integer granularity, Optional timeSource) { + setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, null); + } + + public void setUTCTime(DefaultClusterCallback callback + , Long UTCTime, Integer granularity, Optional timeSource + , int timedInvokeTimeoutMs) { + setUTCTime(chipClusterPtr, callback, UTCTime, granularity, timeSource, timedInvokeTimeoutMs); + } + + public void setTrustedTimeSource(DefaultClusterCallback callback + , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource) { + setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, null); + } + + public void setTrustedTimeSource(DefaultClusterCallback callback + , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource + , int timedInvokeTimeoutMs) { + setTrustedTimeSource(chipClusterPtr, callback, trustedTimeSource, timedInvokeTimeoutMs); + } + + public void setTimeZone(SetTimeZoneResponseCallback callback + , ArrayList timeZone) { + setTimeZone(chipClusterPtr, callback, timeZone, null); + } + + public void setTimeZone(SetTimeZoneResponseCallback callback + , ArrayList timeZone + , int timedInvokeTimeoutMs) { + setTimeZone(chipClusterPtr, callback, timeZone, timedInvokeTimeoutMs); + } + + public void setDSTOffset(DefaultClusterCallback callback + , ArrayList DSTOffset) { + setDSTOffset(chipClusterPtr, callback, DSTOffset, null); + } + + public void setDSTOffset(DefaultClusterCallback callback + , ArrayList DSTOffset + , int timedInvokeTimeoutMs) { + setDSTOffset(chipClusterPtr, callback, DSTOffset, timedInvokeTimeoutMs); + } + + public void setDefaultNTP(DefaultClusterCallback callback + , @Nullable String defaultNTP) { + setDefaultNTP(chipClusterPtr, callback, defaultNTP, null); + } + + public void setDefaultNTP(DefaultClusterCallback callback + , @Nullable String defaultNTP + , int timedInvokeTimeoutMs) { + setDefaultNTP(chipClusterPtr, callback, defaultNTP, timedInvokeTimeoutMs); + } + private native void setUTCTime(long chipClusterPtr, DefaultClusterCallback Callback + , Long UTCTime, Integer granularity, Optional timeSource + , @Nullable Integer timedInvokeTimeoutMs); + private native void setTrustedTimeSource(long chipClusterPtr, DefaultClusterCallback Callback + , @Nullable ChipStructs.TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct trustedTimeSource + , @Nullable Integer timedInvokeTimeoutMs); + private native void setTimeZone(long chipClusterPtr, SetTimeZoneResponseCallback Callback + , ArrayList timeZone + , @Nullable Integer timedInvokeTimeoutMs); + private native void setDSTOffset(long chipClusterPtr, DefaultClusterCallback Callback + , ArrayList DSTOffset + , @Nullable Integer timedInvokeTimeoutMs); + private native void setDefaultNTP(long chipClusterPtr, DefaultClusterCallback Callback + , @Nullable String defaultNTP + , @Nullable Integer timedInvokeTimeoutMs); + public interface SetTimeZoneResponseCallback { + void onSuccess(Boolean DSTOffsetRequired); + + void onError(Exception error); + } + + + public interface UTCTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DefaultNTPAttributeCallback { + void onSuccess(@Nullable String value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TimeZoneAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DSTOffsetAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LocalTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readUTCTimeAttribute( + UTCTimeAttributeCallback callback + ) { + readUTCTimeAttribute(chipClusterPtr, callback); + } + public void subscribeUTCTimeAttribute( + UTCTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeUTCTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGranularityAttribute( + IntegerAttributeCallback callback + ) { + readGranularityAttribute(chipClusterPtr, callback); + } + public void subscribeGranularityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeGranularityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeSourceAttribute( + IntegerAttributeCallback callback + ) { + readTimeSourceAttribute(chipClusterPtr, callback); + } + public void subscribeTimeSourceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTimeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDefaultNTPAttribute( + DefaultNTPAttributeCallback callback + ) { + readDefaultNTPAttribute(chipClusterPtr, callback); + } + public void subscribeDefaultNTPAttribute( + DefaultNTPAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDefaultNTPAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneAttribute( + TimeZoneAttributeCallback callback + ) { + readTimeZoneAttribute(chipClusterPtr, callback); + } + public void subscribeTimeZoneAttribute( + TimeZoneAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTimeZoneAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDSTOffsetAttribute( + DSTOffsetAttributeCallback callback + ) { + readDSTOffsetAttribute(chipClusterPtr, callback); + } + public void subscribeDSTOffsetAttribute( + DSTOffsetAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDSTOffsetAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalTimeAttribute( + LocalTimeAttributeCallback callback + ) { + readLocalTimeAttribute(chipClusterPtr, callback); + } + public void subscribeLocalTimeAttribute( + LocalTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLocalTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneDatabaseAttribute( + IntegerAttributeCallback callback + ) { + readTimeZoneDatabaseAttribute(chipClusterPtr, callback); + } + public void subscribeTimeZoneDatabaseAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTimeZoneDatabaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNTPServerAvailableAttribute( + BooleanAttributeCallback callback + ) { + readNTPServerAvailableAttribute(chipClusterPtr, callback); + } + public void subscribeNTPServerAvailableAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNTPServerAvailableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimeZoneListMaxSizeAttribute( + IntegerAttributeCallback callback + ) { + readTimeZoneListMaxSizeAttribute(chipClusterPtr, callback); + } + public void subscribeTimeZoneListMaxSizeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTimeZoneListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDSTOffsetListMaxSizeAttribute( + IntegerAttributeCallback callback + ) { + readDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback); + } + public void subscribeDSTOffsetListMaxSizeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDSTOffsetListMaxSizeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportsDNSResolveAttribute( + BooleanAttributeCallback callback + ) { + readSupportsDNSResolveAttribute(chipClusterPtr, callback); + } + public void subscribeSupportsDNSResolveAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportsDNSResolveAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readUTCTimeAttribute(long chipClusterPtr, + UTCTimeAttributeCallback callback + ); + private native void subscribeUTCTimeAttribute(long chipClusterPtr, + UTCTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGranularityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeGranularityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTimeSourceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTimeSourceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDefaultNTPAttribute(long chipClusterPtr, + DefaultNTPAttributeCallback callback + ); + private native void subscribeDefaultNTPAttribute(long chipClusterPtr, + DefaultNTPAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTimeZoneAttribute(long chipClusterPtr, + TimeZoneAttributeCallback callback + ); + private native void subscribeTimeZoneAttribute(long chipClusterPtr, + TimeZoneAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDSTOffsetAttribute(long chipClusterPtr, + DSTOffsetAttributeCallback callback + ); + private native void subscribeDSTOffsetAttribute(long chipClusterPtr, + DSTOffsetAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLocalTimeAttribute(long chipClusterPtr, + LocalTimeAttributeCallback callback + ); + private native void subscribeLocalTimeAttribute(long chipClusterPtr, + LocalTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTimeZoneDatabaseAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTimeZoneDatabaseAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNTPServerAvailableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeNTPServerAvailableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTimeZoneListMaxSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTimeZoneListMaxSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDSTOffsetListMaxSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDSTOffsetListMaxSizeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportsDNSResolveAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeSupportsDNSResolveAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BridgedDeviceBasicInformationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000039L; + + public BridgedDeviceBasicInformationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readVendorNameAttribute( + CharStringAttributeCallback callback + ) { + readVendorNameAttribute(chipClusterPtr, callback); + } + public void subscribeVendorNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVendorIDAttribute( + IntegerAttributeCallback callback + ) { + readVendorIDAttribute(chipClusterPtr, callback); + } + public void subscribeVendorIDAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductNameAttribute( + CharStringAttributeCallback callback + ) { + readProductNameAttribute(chipClusterPtr, callback); + } + public void subscribeProductNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNodeLabelAttribute( + CharStringAttributeCallback callback + ) { + readNodeLabelAttribute(chipClusterPtr, callback); + } + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNodeLabelAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeNodeLabelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNodeLabelAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNodeLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHardwareVersionAttribute( + IntegerAttributeCallback callback + ) { + readHardwareVersionAttribute(chipClusterPtr, callback); + } + public void subscribeHardwareVersionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHardwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHardwareVersionStringAttribute( + CharStringAttributeCallback callback + ) { + readHardwareVersionStringAttribute(chipClusterPtr, callback); + } + public void subscribeHardwareVersionStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHardwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSoftwareVersionAttribute( + LongAttributeCallback callback + ) { + readSoftwareVersionAttribute(chipClusterPtr, callback); + } + public void subscribeSoftwareVersionAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSoftwareVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSoftwareVersionStringAttribute( + CharStringAttributeCallback callback + ) { + readSoftwareVersionStringAttribute(chipClusterPtr, callback); + } + public void subscribeSoftwareVersionStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSoftwareVersionStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readManufacturingDateAttribute( + CharStringAttributeCallback callback + ) { + readManufacturingDateAttribute(chipClusterPtr, callback); + } + public void subscribeManufacturingDateAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeManufacturingDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPartNumberAttribute( + CharStringAttributeCallback callback + ) { + readPartNumberAttribute(chipClusterPtr, callback); + } + public void subscribePartNumberAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePartNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductURLAttribute( + CharStringAttributeCallback callback + ) { + readProductURLAttribute(chipClusterPtr, callback); + } + public void subscribeProductURLAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductURLAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductLabelAttribute( + CharStringAttributeCallback callback + ) { + readProductLabelAttribute(chipClusterPtr, callback); + } + public void subscribeProductLabelAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductLabelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSerialNumberAttribute( + CharStringAttributeCallback callback + ) { + readSerialNumberAttribute(chipClusterPtr, callback); + } + public void subscribeSerialNumberAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSerialNumberAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReachableAttribute( + BooleanAttributeCallback callback + ) { + readReachableAttribute(chipClusterPtr, callback); + } + public void subscribeReachableAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReachableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUniqueIDAttribute( + CharStringAttributeCallback callback + ) { + readUniqueIDAttribute(chipClusterPtr, callback); + } + public void subscribeUniqueIDAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUniqueIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNodeLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeNodeLabelAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNodeLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHardwareVersionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeHardwareVersionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHardwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeHardwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSoftwareVersionAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSoftwareVersionAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSoftwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeSoftwareVersionStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readManufacturingDateAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeManufacturingDateAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPartNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribePartNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductURLAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeProductLabelAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSerialNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeSerialNumberAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReachableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeReachableAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUniqueIDAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeUniqueIDAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class SwitchCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000003BL; + + public SwitchCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readNumberOfPositionsAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfPositionsAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfPositionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfPositionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionAttribute( + IntegerAttributeCallback callback + ) { + readCurrentPositionAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMultiPressMaxAttribute( + IntegerAttributeCallback callback + ) { + readMultiPressMaxAttribute(chipClusterPtr, callback); + } + public void subscribeMultiPressMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMultiPressMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readNumberOfPositionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfPositionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMultiPressMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMultiPressMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class AdministratorCommissioningCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000003CL; + + public AdministratorCommissioningCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + + public void openCommissioningWindow(DefaultClusterCallback callback + , Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt + , int timedInvokeTimeoutMs) { + openCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, PAKEPasscodeVerifier, discriminator, iterations, salt, timedInvokeTimeoutMs); + } + + + public void openBasicCommissioningWindow(DefaultClusterCallback callback + , Integer commissioningTimeout + , int timedInvokeTimeoutMs) { + openBasicCommissioningWindow(chipClusterPtr, callback, commissioningTimeout, timedInvokeTimeoutMs); + } + + + public void revokeCommissioning(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + revokeCommissioning(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void openCommissioningWindow(long chipClusterPtr, DefaultClusterCallback Callback + , Integer commissioningTimeout, byte[] PAKEPasscodeVerifier, Integer discriminator, Long iterations, byte[] salt + , @Nullable Integer timedInvokeTimeoutMs); + private native void openBasicCommissioningWindow(long chipClusterPtr, DefaultClusterCallback Callback + , Integer commissioningTimeout + , @Nullable Integer timedInvokeTimeoutMs); + private native void revokeCommissioning(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface AdminFabricIndexAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AdminVendorIdAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readWindowStatusAttribute( + IntegerAttributeCallback callback + ) { + readWindowStatusAttribute(chipClusterPtr, callback); + } + public void subscribeWindowStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWindowStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAdminFabricIndexAttribute( + AdminFabricIndexAttributeCallback callback + ) { + readAdminFabricIndexAttribute(chipClusterPtr, callback); + } + public void subscribeAdminFabricIndexAttribute( + AdminFabricIndexAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAdminFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAdminVendorIdAttribute( + AdminVendorIdAttributeCallback callback + ) { + readAdminVendorIdAttribute(chipClusterPtr, callback); + } + public void subscribeAdminVendorIdAttribute( + AdminVendorIdAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAdminVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readWindowStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeWindowStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAdminFabricIndexAttribute(long chipClusterPtr, + AdminFabricIndexAttributeCallback callback + ); + private native void subscribeAdminFabricIndexAttribute(long chipClusterPtr, + AdminFabricIndexAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAdminVendorIdAttribute(long chipClusterPtr, + AdminVendorIdAttributeCallback callback + ); + private native void subscribeAdminVendorIdAttribute(long chipClusterPtr, + AdminVendorIdAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OperationalCredentialsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000003EL; + + public OperationalCredentialsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void attestationRequest(AttestationResponseCallback callback + , byte[] attestationNonce) { + attestationRequest(chipClusterPtr, callback, attestationNonce, null); + } + + public void attestationRequest(AttestationResponseCallback callback + , byte[] attestationNonce + , int timedInvokeTimeoutMs) { + attestationRequest(chipClusterPtr, callback, attestationNonce, timedInvokeTimeoutMs); + } + + public void certificateChainRequest(CertificateChainResponseCallback callback + , Integer certificateType) { + certificateChainRequest(chipClusterPtr, callback, certificateType, null); + } + + public void certificateChainRequest(CertificateChainResponseCallback callback + , Integer certificateType + , int timedInvokeTimeoutMs) { + certificateChainRequest(chipClusterPtr, callback, certificateType, timedInvokeTimeoutMs); + } + + public void CSRRequest(CSRResponseCallback callback + , byte[] CSRNonce, Optional isForUpdateNOC) { + CSRRequest(chipClusterPtr, callback, CSRNonce, isForUpdateNOC, null); + } + + public void CSRRequest(CSRResponseCallback callback + , byte[] CSRNonce, Optional isForUpdateNOC + , int timedInvokeTimeoutMs) { + CSRRequest(chipClusterPtr, callback, CSRNonce, isForUpdateNOC, timedInvokeTimeoutMs); + } + + public void addNOC(NOCResponseCallback callback + , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId) { + addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminSubject, adminVendorId, null); + } + + public void addNOC(NOCResponseCallback callback + , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId + , int timedInvokeTimeoutMs) { + addNOC(chipClusterPtr, callback, NOCValue, ICACValue, IPKValue, caseAdminSubject, adminVendorId, timedInvokeTimeoutMs); + } + + public void updateNOC(NOCResponseCallback callback + , byte[] NOCValue, Optional ICACValue) { + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, null); + } + + public void updateNOC(NOCResponseCallback callback + , byte[] NOCValue, Optional ICACValue + , int timedInvokeTimeoutMs) { + updateNOC(chipClusterPtr, callback, NOCValue, ICACValue, timedInvokeTimeoutMs); + } + + public void updateFabricLabel(NOCResponseCallback callback + , String label) { + updateFabricLabel(chipClusterPtr, callback, label, null); + } + + public void updateFabricLabel(NOCResponseCallback callback + , String label + , int timedInvokeTimeoutMs) { + updateFabricLabel(chipClusterPtr, callback, label, timedInvokeTimeoutMs); + } + + public void removeFabric(NOCResponseCallback callback + , Integer fabricIndex) { + removeFabric(chipClusterPtr, callback, fabricIndex, null); + } + + public void removeFabric(NOCResponseCallback callback + , Integer fabricIndex + , int timedInvokeTimeoutMs) { + removeFabric(chipClusterPtr, callback, fabricIndex, timedInvokeTimeoutMs); + } + + public void addTrustedRootCertificate(DefaultClusterCallback callback + , byte[] rootCACertificate) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, null); + } + + public void addTrustedRootCertificate(DefaultClusterCallback callback + , byte[] rootCACertificate + , int timedInvokeTimeoutMs) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, timedInvokeTimeoutMs); + } + private native void attestationRequest(long chipClusterPtr, AttestationResponseCallback Callback + , byte[] attestationNonce + , @Nullable Integer timedInvokeTimeoutMs); + private native void certificateChainRequest(long chipClusterPtr, CertificateChainResponseCallback Callback + , Integer certificateType + , @Nullable Integer timedInvokeTimeoutMs); + private native void CSRRequest(long chipClusterPtr, CSRResponseCallback Callback + , byte[] CSRNonce, Optional isForUpdateNOC + , @Nullable Integer timedInvokeTimeoutMs); + private native void addNOC(long chipClusterPtr, NOCResponseCallback Callback + , byte[] NOCValue, Optional ICACValue, byte[] IPKValue, Long caseAdminSubject, Integer adminVendorId + , @Nullable Integer timedInvokeTimeoutMs); + private native void updateNOC(long chipClusterPtr, NOCResponseCallback Callback + , byte[] NOCValue, Optional ICACValue + , @Nullable Integer timedInvokeTimeoutMs); + private native void updateFabricLabel(long chipClusterPtr, NOCResponseCallback Callback + , String label + , @Nullable Integer timedInvokeTimeoutMs); + private native void removeFabric(long chipClusterPtr, NOCResponseCallback Callback + , Integer fabricIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void addTrustedRootCertificate(long chipClusterPtr, DefaultClusterCallback Callback + , byte[] rootCACertificate + , @Nullable Integer timedInvokeTimeoutMs); + public interface AttestationResponseCallback { + void onSuccess(byte[] attestationElements, byte[] attestationSignature); + + void onError(Exception error); + } + + public interface CertificateChainResponseCallback { + void onSuccess(byte[] certificate); + + void onError(Exception error); + } + + public interface CSRResponseCallback { + void onSuccess(byte[] NOCSRElements, byte[] attestationSignature); + + void onError(Exception error); + } + + public interface NOCResponseCallback { + void onSuccess(Integer statusCode, Optional fabricIndex, Optional debugText); + + void onError(Exception error); + } + + + public interface NOCsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface FabricsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TrustedRootCertificatesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readNOCsAttribute( + NOCsAttributeCallback callback + ) { + readNOCsAttribute(chipClusterPtr, callback, true); + } + public void readNOCsAttributeWithFabricFilter( + NOCsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readNOCsAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void subscribeNOCsAttribute( + NOCsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNOCsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFabricsAttribute( + FabricsAttributeCallback callback + ) { + readFabricsAttribute(chipClusterPtr, callback, true); + } + public void readFabricsAttributeWithFabricFilter( + FabricsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readFabricsAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void subscribeFabricsAttribute( + FabricsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedFabricsAttribute( + IntegerAttributeCallback callback + ) { + readSupportedFabricsAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedFabricsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCommissionedFabricsAttribute( + IntegerAttributeCallback callback + ) { + readCommissionedFabricsAttribute(chipClusterPtr, callback); + } + public void subscribeCommissionedFabricsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCommissionedFabricsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTrustedRootCertificatesAttribute( + TrustedRootCertificatesAttributeCallback callback + ) { + readTrustedRootCertificatesAttribute(chipClusterPtr, callback); + } + public void subscribeTrustedRootCertificatesAttribute( + TrustedRootCertificatesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTrustedRootCertificatesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentFabricIndexAttribute( + IntegerAttributeCallback callback + ) { + readCurrentFabricIndexAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentFabricIndexAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentFabricIndexAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readNOCsAttribute(long chipClusterPtr, + NOCsAttributeCallback callback + , boolean isFabricFiltered + ); + private native void subscribeNOCsAttribute(long chipClusterPtr, + NOCsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFabricsAttribute(long chipClusterPtr, + FabricsAttributeCallback callback + , boolean isFabricFiltered + ); + private native void subscribeFabricsAttribute(long chipClusterPtr, + FabricsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSupportedFabricsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSupportedFabricsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCommissionedFabricsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCommissionedFabricsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTrustedRootCertificatesAttribute(long chipClusterPtr, + TrustedRootCertificatesAttributeCallback callback + ); + private native void subscribeTrustedRootCertificatesAttribute(long chipClusterPtr, + TrustedRootCertificatesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentFabricIndexAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentFabricIndexAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class GroupKeyManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000003FL; + + public GroupKeyManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void keySetWrite(DefaultClusterCallback callback + , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet) { + keySetWrite(chipClusterPtr, callback, groupKeySet, null); + } + + public void keySetWrite(DefaultClusterCallback callback + , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet + , int timedInvokeTimeoutMs) { + keySetWrite(chipClusterPtr, callback, groupKeySet, timedInvokeTimeoutMs); + } + + public void keySetRead(KeySetReadResponseCallback callback + , Integer groupKeySetID) { + keySetRead(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRead(KeySetReadResponseCallback callback + , Integer groupKeySetID + , int timedInvokeTimeoutMs) { + keySetRead(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); + } + + public void keySetRemove(DefaultClusterCallback callback + , Integer groupKeySetID) { + keySetRemove(chipClusterPtr, callback, groupKeySetID, null); + } + + public void keySetRemove(DefaultClusterCallback callback + , Integer groupKeySetID + , int timedInvokeTimeoutMs) { + keySetRemove(chipClusterPtr, callback, groupKeySetID, timedInvokeTimeoutMs); + } + + public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback + ) { + keySetReadAllIndices(chipClusterPtr, callback, null); + } + + public void keySetReadAllIndices(KeySetReadAllIndicesResponseCallback callback + + , int timedInvokeTimeoutMs) { + keySetReadAllIndices(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void keySetWrite(long chipClusterPtr, DefaultClusterCallback Callback + , ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet + , @Nullable Integer timedInvokeTimeoutMs); + private native void keySetRead(long chipClusterPtr, KeySetReadResponseCallback Callback + , Integer groupKeySetID + , @Nullable Integer timedInvokeTimeoutMs); + private native void keySetRemove(long chipClusterPtr, DefaultClusterCallback Callback + , Integer groupKeySetID + , @Nullable Integer timedInvokeTimeoutMs); + private native void keySetReadAllIndices(long chipClusterPtr, KeySetReadAllIndicesResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface KeySetReadResponseCallback { + void onSuccess(ChipStructs.GroupKeyManagementClusterGroupKeySetStruct groupKeySet); + + void onError(Exception error); + } + + public interface KeySetReadAllIndicesResponseCallback { + void onSuccess(ArrayList groupKeySetIDs); + + void onError(Exception error); + } + + + public interface GroupKeyMapAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GroupTableAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGroupKeyMapAttribute( + GroupKeyMapAttributeCallback callback + ) { + readGroupKeyMapAttribute(chipClusterPtr, callback, true); + } + public void readGroupKeyMapAttributeWithFabricFilter( + GroupKeyMapAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupKeyMapAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value) { + writeGroupKeyMapAttribute(chipClusterPtr, callback, value, null); + } + + public void writeGroupKeyMapAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeGroupKeyMapAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeGroupKeyMapAttribute( + GroupKeyMapAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGroupKeyMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGroupTableAttribute( + GroupTableAttributeCallback callback + ) { + readGroupTableAttribute(chipClusterPtr, callback, true); + } + public void readGroupTableAttributeWithFabricFilter( + GroupTableAttributeCallback callback + , + boolean isFabricFiltered + ) { + readGroupTableAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void subscribeGroupTableAttribute( + GroupTableAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGroupTableAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxGroupsPerFabricAttribute( + IntegerAttributeCallback callback + ) { + readMaxGroupsPerFabricAttribute(chipClusterPtr, callback); + } + public void subscribeMaxGroupsPerFabricAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxGroupsPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxGroupKeysPerFabricAttribute( + IntegerAttributeCallback callback + ) { + readMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback); + } + public void subscribeMaxGroupKeysPerFabricAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxGroupKeysPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGroupKeyMapAttribute(long chipClusterPtr, + GroupKeyMapAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeGroupKeyMapAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeGroupKeyMapAttribute(long chipClusterPtr, + GroupKeyMapAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGroupTableAttribute(long chipClusterPtr, + GroupTableAttributeCallback callback + , boolean isFabricFiltered + ); + private native void subscribeGroupTableAttribute(long chipClusterPtr, + GroupTableAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxGroupsPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxGroupsPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxGroupKeysPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxGroupKeysPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class FixedLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000040L; + + public FixedLabelCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface LabelListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readLabelListAttribute( + LabelListAttributeCallback callback + ) { + readLabelListAttribute(chipClusterPtr, callback); + } + public void subscribeLabelListAttribute( + LabelListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readLabelListAttribute(long chipClusterPtr, + LabelListAttributeCallback callback + ); + private native void subscribeLabelListAttribute(long chipClusterPtr, + LabelListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class UserLabelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000041L; + + public UserLabelCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface LabelListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readLabelListAttribute( + LabelListAttributeCallback callback + ) { + readLabelListAttribute(chipClusterPtr, callback); + } + public void writeLabelListAttribute(DefaultClusterCallback callback, ArrayList value) { + writeLabelListAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLabelListAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeLabelListAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLabelListAttribute( + LabelListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLabelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readLabelListAttribute(long chipClusterPtr, + LabelListAttributeCallback callback + ); + + private native void writeLabelListAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLabelListAttribute(long chipClusterPtr, + LabelListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ProxyConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000042L; + + public ProxyConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ProxyDiscoveryCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000043L; + + public ProxyDiscoveryCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ProxyValidCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000044L; + + public ProxyValidCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BooleanStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000045L; + + public BooleanStateCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readStateValueAttribute( + BooleanAttributeCallback callback + ) { + readStateValueAttribute(chipClusterPtr, callback); + } + public void subscribeStateValueAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStateValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readStateValueAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeStateValueAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class IcdManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000046L; + + public IcdManagementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void registerClient(RegisterClientResponseCallback callback + , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey) { + registerClient(chipClusterPtr, callback, checkInNodeID, monitoredSubject, key, verificationKey, null); + } + + public void registerClient(RegisterClientResponseCallback callback + , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey + , int timedInvokeTimeoutMs) { + registerClient(chipClusterPtr, callback, checkInNodeID, monitoredSubject, key, verificationKey, timedInvokeTimeoutMs); + } + + public void unregisterClient(DefaultClusterCallback callback + , Long checkInNodeID, Optional verificationKey) { + unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, null); + } + + public void unregisterClient(DefaultClusterCallback callback + , Long checkInNodeID, Optional verificationKey + , int timedInvokeTimeoutMs) { + unregisterClient(chipClusterPtr, callback, checkInNodeID, verificationKey, timedInvokeTimeoutMs); + } + + public void stayActiveRequest(DefaultClusterCallback callback + ) { + stayActiveRequest(chipClusterPtr, callback, null); + } + + public void stayActiveRequest(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + stayActiveRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void registerClient(long chipClusterPtr, RegisterClientResponseCallback Callback + , Long checkInNodeID, Long monitoredSubject, byte[] key, Optional verificationKey + , @Nullable Integer timedInvokeTimeoutMs); + private native void unregisterClient(long chipClusterPtr, DefaultClusterCallback Callback + , Long checkInNodeID, Optional verificationKey + , @Nullable Integer timedInvokeTimeoutMs); + private native void stayActiveRequest(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface RegisterClientResponseCallback { + void onSuccess(Long ICDCounter); + + void onError(Exception error); + } + + + public interface RegisteredClientsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readIdleModeIntervalAttribute( + LongAttributeCallback callback + ) { + readIdleModeIntervalAttribute(chipClusterPtr, callback); + } + public void subscribeIdleModeIntervalAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeIdleModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveModeIntervalAttribute( + LongAttributeCallback callback + ) { + readActiveModeIntervalAttribute(chipClusterPtr, callback); + } + public void subscribeActiveModeIntervalAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveModeIntervalAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveModeThresholdAttribute( + IntegerAttributeCallback callback + ) { + readActiveModeThresholdAttribute(chipClusterPtr, callback); + } + public void subscribeActiveModeThresholdAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveModeThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRegisteredClientsAttribute( + RegisteredClientsAttributeCallback callback + ) { + readRegisteredClientsAttribute(chipClusterPtr, callback, true); + } + public void readRegisteredClientsAttributeWithFabricFilter( + RegisteredClientsAttributeCallback callback + , + boolean isFabricFiltered + ) { + readRegisteredClientsAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void subscribeRegisteredClientsAttribute( + RegisteredClientsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeRegisteredClientsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readICDCounterAttribute( + LongAttributeCallback callback + ) { + readICDCounterAttribute(chipClusterPtr, callback); + } + public void subscribeICDCounterAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeICDCounterAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClientsSupportedPerFabricAttribute( + IntegerAttributeCallback callback + ) { + readClientsSupportedPerFabricAttribute(chipClusterPtr, callback); + } + public void subscribeClientsSupportedPerFabricAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClientsSupportedPerFabricAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readIdleModeIntervalAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeIdleModeIntervalAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveModeIntervalAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeActiveModeIntervalAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveModeThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActiveModeThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRegisteredClientsAttribute(long chipClusterPtr, + RegisteredClientsAttributeCallback callback + , boolean isFabricFiltered + ); + private native void subscribeRegisteredClientsAttribute(long chipClusterPtr, + RegisteredClientsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readICDCounterAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeICDCounterAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClientsSupportedPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClientsSupportedPerFabricAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ModeSelectCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000050L; + + public ModeSelectCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(DefaultClusterCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, DefaultClusterCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + + public interface StandardNamespaceAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readDescriptionAttribute( + CharStringAttributeCallback callback + ) { + readDescriptionAttribute(chipClusterPtr, callback); + } + public void subscribeDescriptionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDescriptionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback + ) { + readStandardNamespaceAttribute(chipClusterPtr, callback); + } + public void subscribeStandardNamespaceAttribute( + StandardNamespaceAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStandardNamespaceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeDescriptionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStandardNamespaceAttribute(long chipClusterPtr, + StandardNamespaceAttributeCallback callback + ); + private native void subscribeStandardNamespaceAttribute(long chipClusterPtr, + StandardNamespaceAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class LaundryWasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000051L; + + public LaundryWasherModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RefrigeratorAndTemperatureControlledCabinetModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000052L; + + public RefrigeratorAndTemperatureControlledCabinetModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class LaundryWasherControlsCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000053L; + + public LaundryWasherControlsCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface SpinSpeedsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SpinSpeedCurrentAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SupportedRinsesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback + ) { + readSpinSpeedsAttribute(chipClusterPtr, callback); + } + public void subscribeSpinSpeedsAttribute( + SpinSpeedsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpinSpeedsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback + ) { + readSpinSpeedCurrentAttribute(chipClusterPtr, callback); + } + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value) { + writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSpinSpeedCurrentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSpinSpeedCurrentAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSpinSpeedCurrentAttribute( + SpinSpeedCurrentAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpinSpeedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfRinsesAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfRinsesAttribute(chipClusterPtr, callback); + } + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value) { + writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNumberOfRinsesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback + ) { + readSupportedRinsesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSpinSpeedsAttribute(long chipClusterPtr, + SpinSpeedsAttributeCallback callback + ); + private native void subscribeSpinSpeedsAttribute(long chipClusterPtr, + SpinSpeedsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSpinSpeedCurrentAttribute(long chipClusterPtr, + SpinSpeedCurrentAttributeCallback callback + ); + + private native void writeSpinSpeedCurrentAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSpinSpeedCurrentAttribute(long chipClusterPtr, + SpinSpeedCurrentAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNumberOfRinsesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeNumberOfRinsesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNumberOfRinsesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + ); + private native void subscribeSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RvcRunModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000054L; + + public RvcRunModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RvcCleanModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000055L; + + public RvcCleanModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TemperatureControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000056L; + + public TemperatureControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void setTemperature(DefaultClusterCallback callback + , Optional targetTemperature, Optional targetTemperatureLevel) { + setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, null); + } + + public void setTemperature(DefaultClusterCallback callback + , Optional targetTemperature, Optional targetTemperatureLevel + , int timedInvokeTimeoutMs) { + setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, timedInvokeTimeoutMs); + } + private native void setTemperature(long chipClusterPtr, DefaultClusterCallback Callback + , Optional targetTemperature, Optional targetTemperatureLevel + , @Nullable Integer timedInvokeTimeoutMs); + + public interface SupportedTemperatureLevelsAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTemperatureSetpointAttribute( + IntegerAttributeCallback callback + ) { + readTemperatureSetpointAttribute(chipClusterPtr, callback); + } + public void subscribeTemperatureSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTemperatureSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinTemperatureAttribute( + IntegerAttributeCallback callback + ) { + readMinTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeMinTemperatureAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxTemperatureAttribute( + IntegerAttributeCallback callback + ) { + readMaxTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeMaxTemperatureAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStepAttribute( + IntegerAttributeCallback callback + ) { + readStepAttribute(chipClusterPtr, callback); + } + public void subscribeStepAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStepAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback + ) { + readSelectedTemperatureLevelAttribute(chipClusterPtr, callback); + } + public void subscribeSelectedTemperatureLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSelectedTemperatureLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback + ) { + readSupportedTemperatureLevelsAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedTemperatureLevelsAttribute( + SupportedTemperatureLevelsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedTemperatureLevelsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTemperatureSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTemperatureSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxTemperatureAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStepAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStepAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSelectedTemperatureLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSelectedTemperatureLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedTemperatureLevelsAttribute(long chipClusterPtr, + SupportedTemperatureLevelsAttributeCallback callback + ); + private native void subscribeSupportedTemperatureLevelsAttribute(long chipClusterPtr, + SupportedTemperatureLevelsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RefrigeratorAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000057L; + + public RefrigeratorAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaskAttribute( + LongAttributeCallback callback + ) { + readMaskAttribute(chipClusterPtr, callback); + } + public void subscribeMaskAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback + ) { + readStateAttribute(chipClusterPtr, callback); + } + public void subscribeStateAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedAttribute( + LongAttributeCallback callback + ) { + readSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStateAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeStateAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DishwasherModeCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000059L; + + public DishwasherModeCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode) { + changeToMode(chipClusterPtr, callback, newMode, null); + } + + public void changeToMode(ChangeToModeResponseCallback callback + , Integer newMode + , int timedInvokeTimeoutMs) { + changeToMode(chipClusterPtr, callback, newMode, timedInvokeTimeoutMs); + } + private native void changeToMode(long chipClusterPtr, ChangeToModeResponseCallback Callback + , Integer newMode + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeToModeResponseCallback { + void onSuccess(Integer status, Optional statusText); + + void onError(Exception error); + } + + + public interface SupportedModesAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OnModeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSupportedModesAttribute( + SupportedModesAttributeCallback callback + ) { + readSupportedModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedModesAttribute( + SupportedModesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSupportedModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentModeAttribute( + IntegerAttributeCallback callback + ) { + readCurrentModeAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpModeAttribute( + StartUpModeAttributeCallback callback + ) { + readStartUpModeAttribute(chipClusterPtr, callback); + } + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpModeAttribute( + StartUpModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOnModeAttribute( + OnModeAttributeCallback callback + ) { + readOnModeAttribute(chipClusterPtr, callback); + } + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOnModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOnModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOnModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOnModeAttribute( + OnModeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOnModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + ); + private native void subscribeSupportedModesAttribute(long chipClusterPtr, + SupportedModesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + ); + + private native void writeStartUpModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpModeAttribute(long chipClusterPtr, + StartUpModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + ); + + private native void writeOnModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOnModeAttribute(long chipClusterPtr, + OnModeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class AirQualityCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000005BL; + + public AirQualityCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readAirQualityAttribute( + IntegerAttributeCallback callback + ) { + readAirQualityAttribute(chipClusterPtr, callback); + } + public void subscribeAirQualityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAirQualityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readAirQualityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAirQualityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class SmokeCoAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000005CL; + + public SmokeCoAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void selfTestRequest(DefaultClusterCallback callback + ) { + selfTestRequest(chipClusterPtr, callback, null); + } + + public void selfTestRequest(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + selfTestRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void selfTestRequest(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readExpressedStateAttribute( + IntegerAttributeCallback callback + ) { + readExpressedStateAttribute(chipClusterPtr, callback); + } + public void subscribeExpressedStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeExpressedStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSmokeStateAttribute( + IntegerAttributeCallback callback + ) { + readSmokeStateAttribute(chipClusterPtr, callback); + } + public void subscribeSmokeStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSmokeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCOStateAttribute( + IntegerAttributeCallback callback + ) { + readCOStateAttribute(chipClusterPtr, callback); + } + public void subscribeCOStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCOStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBatteryAlertAttribute( + IntegerAttributeCallback callback + ) { + readBatteryAlertAttribute(chipClusterPtr, callback); + } + public void subscribeBatteryAlertAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBatteryAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDeviceMutedAttribute( + IntegerAttributeCallback callback + ) { + readDeviceMutedAttribute(chipClusterPtr, callback); + } + public void subscribeDeviceMutedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDeviceMutedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTestInProgressAttribute( + BooleanAttributeCallback callback + ) { + readTestInProgressAttribute(chipClusterPtr, callback); + } + public void subscribeTestInProgressAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTestInProgressAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHardwareFaultAlertAttribute( + BooleanAttributeCallback callback + ) { + readHardwareFaultAlertAttribute(chipClusterPtr, callback); + } + public void subscribeHardwareFaultAlertAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHardwareFaultAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEndOfServiceAlertAttribute( + IntegerAttributeCallback callback + ) { + readEndOfServiceAlertAttribute(chipClusterPtr, callback); + } + public void subscribeEndOfServiceAlertAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEndOfServiceAlertAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInterconnectSmokeAlarmAttribute( + IntegerAttributeCallback callback + ) { + readInterconnectSmokeAlarmAttribute(chipClusterPtr, callback); + } + public void subscribeInterconnectSmokeAlarmAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInterconnectSmokeAlarmAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInterconnectCOAlarmAttribute( + IntegerAttributeCallback callback + ) { + readInterconnectCOAlarmAttribute(chipClusterPtr, callback); + } + public void subscribeInterconnectCOAlarmAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInterconnectCOAlarmAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readContaminationStateAttribute( + IntegerAttributeCallback callback + ) { + readContaminationStateAttribute(chipClusterPtr, callback); + } + public void subscribeContaminationStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeContaminationStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSmokeSensitivityLevelAttribute( + IntegerAttributeCallback callback + ) { + readSmokeSensitivityLevelAttribute(chipClusterPtr, callback); + } + public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSmokeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSmokeSensitivityLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSmokeSensitivityLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readExpiryDateAttribute( + LongAttributeCallback callback + ) { + readExpiryDateAttribute(chipClusterPtr, callback); + } + public void subscribeExpiryDateAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeExpiryDateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readExpressedStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeExpressedStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSmokeStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSmokeStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCOStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCOStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBatteryAlertAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBatteryAlertAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDeviceMutedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDeviceMutedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTestInProgressAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeTestInProgressAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHardwareFaultAlertAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeHardwareFaultAlertAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEndOfServiceAlertAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEndOfServiceAlertAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInterconnectSmokeAlarmAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInterconnectSmokeAlarmAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInterconnectCOAlarmAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInterconnectCOAlarmAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readContaminationStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeContaminationStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSmokeSensitivityLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeSmokeSensitivityLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSmokeSensitivityLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readExpiryDateAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeExpiryDateAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DishwasherAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000005DL; + + public DishwasherAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void reset(DefaultClusterCallback callback + , Long alarms) { + reset(chipClusterPtr, callback, alarms, null); + } + + public void reset(DefaultClusterCallback callback + , Long alarms + , int timedInvokeTimeoutMs) { + reset(chipClusterPtr, callback, alarms, timedInvokeTimeoutMs); + } + + public void modifyEnabledAlarms(DefaultClusterCallback callback + , Long mask) { + modifyEnabledAlarms(chipClusterPtr, callback, mask, null); + } + + public void modifyEnabledAlarms(DefaultClusterCallback callback + , Long mask + , int timedInvokeTimeoutMs) { + modifyEnabledAlarms(chipClusterPtr, callback, mask, timedInvokeTimeoutMs); + } + private native void reset(long chipClusterPtr, DefaultClusterCallback Callback + , Long alarms + , @Nullable Integer timedInvokeTimeoutMs); + private native void modifyEnabledAlarms(long chipClusterPtr, DefaultClusterCallback Callback + , Long mask + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaskAttribute( + LongAttributeCallback callback + ) { + readMaskAttribute(chipClusterPtr, callback); + } + public void subscribeMaskAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLatchAttribute( + LongAttributeCallback callback + ) { + readLatchAttribute(chipClusterPtr, callback); + } + public void subscribeLatchAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLatchAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback + ) { + readStateAttribute(chipClusterPtr, callback); + } + public void subscribeStateAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedAttribute( + LongAttributeCallback callback + ) { + readSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLatchAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeLatchAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStateAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeStateAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000060L; + + public OperationalStateCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void pause(OperationalCommandResponseCallback callback + ) { + pause(chipClusterPtr, callback, null); + } + + public void pause(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + pause(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void stop(OperationalCommandResponseCallback callback + ) { + stop(chipClusterPtr, callback, null); + } + + public void stop(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void start(OperationalCommandResponseCallback callback + ) { + start(chipClusterPtr, callback, null); + } + + public void start(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + start(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void resume(OperationalCommandResponseCallback callback + ) { + resume(chipClusterPtr, callback, null); + } + + public void resume(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + resume(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void pause(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void stop(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void start(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void resume(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface OperationalCommandResponseCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); + + void onError(Exception error); + } + + + public interface PhaseListAttributeCallback { + void onSuccess(@Nullable List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPhaseAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CountdownTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OperationalStateListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readPhaseListAttribute( + PhaseListAttributeCallback callback + ) { + readPhaseListAttribute(chipClusterPtr, callback); + } + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePhaseListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback + ) { + readCurrentPhaseAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPhaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback + ) { + readCountdownTimeAttribute(chipClusterPtr, callback); + } + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCountdownTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback + ) { + readOperationalStateListAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationalStateAttribute( + IntegerAttributeCallback callback + ) { + readOperationalStateAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readPhaseListAttribute(long chipClusterPtr, + PhaseListAttributeCallback callback + ); + private native void subscribePhaseListAttribute(long chipClusterPtr, + PhaseListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentPhaseAttribute(long chipClusterPtr, + CurrentPhaseAttributeCallback callback + ); + private native void subscribeCurrentPhaseAttribute(long chipClusterPtr, + CurrentPhaseAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCountdownTimeAttribute(long chipClusterPtr, + CountdownTimeAttributeCallback callback + ); + private native void subscribeCountdownTimeAttribute(long chipClusterPtr, + CountdownTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationalStateListAttribute(long chipClusterPtr, + OperationalStateListAttributeCallback callback + ); + private native void subscribeOperationalStateListAttribute(long chipClusterPtr, + OperationalStateListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RvcOperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000061L; + + public RvcOperationalStateCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void pause(OperationalCommandResponseCallback callback + ) { + pause(chipClusterPtr, callback, null); + } + + public void pause(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + pause(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void stop(OperationalCommandResponseCallback callback + ) { + stop(chipClusterPtr, callback, null); + } + + public void stop(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void start(OperationalCommandResponseCallback callback + ) { + start(chipClusterPtr, callback, null); + } + + public void start(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + start(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void resume(OperationalCommandResponseCallback callback + ) { + resume(chipClusterPtr, callback, null); + } + + public void resume(OperationalCommandResponseCallback callback + + , int timedInvokeTimeoutMs) { + resume(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void pause(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void stop(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void start(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void resume(long chipClusterPtr, OperationalCommandResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface OperationalCommandResponseCallback { + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); + + void onError(Exception error); + } + + + public interface PhaseListAttributeCallback { + void onSuccess(@Nullable List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPhaseAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CountdownTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OperationalStateListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readPhaseListAttribute( + PhaseListAttributeCallback callback + ) { + readPhaseListAttribute(chipClusterPtr, callback); + } + public void subscribePhaseListAttribute( + PhaseListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePhaseListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback + ) { + readCurrentPhaseAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPhaseAttribute( + CurrentPhaseAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPhaseAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCountdownTimeAttribute( + CountdownTimeAttributeCallback callback + ) { + readCountdownTimeAttribute(chipClusterPtr, callback); + } + public void subscribeCountdownTimeAttribute( + CountdownTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCountdownTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationalStateListAttribute( + OperationalStateListAttributeCallback callback + ) { + readOperationalStateListAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateListAttribute( + OperationalStateListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOperationalStateListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationalStateAttribute( + IntegerAttributeCallback callback + ) { + readOperationalStateAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationalStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readPhaseListAttribute(long chipClusterPtr, + PhaseListAttributeCallback callback + ); + private native void subscribePhaseListAttribute(long chipClusterPtr, + PhaseListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentPhaseAttribute(long chipClusterPtr, + CurrentPhaseAttributeCallback callback + ); + private native void subscribeCurrentPhaseAttribute(long chipClusterPtr, + CurrentPhaseAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCountdownTimeAttribute(long chipClusterPtr, + CountdownTimeAttributeCallback callback + ); + private native void subscribeCountdownTimeAttribute(long chipClusterPtr, + CountdownTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationalStateListAttribute(long chipClusterPtr, + OperationalStateListAttributeCallback callback + ); + private native void subscribeOperationalStateListAttribute(long chipClusterPtr, + OperationalStateListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOperationalStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class HepaFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000071L; + + public HepaFilterMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetCondition(DefaultClusterCallback callback + ) { + resetCondition(chipClusterPtr, callback, null); + } + + public void resetCondition(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetCondition(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetCondition(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface LastChangedTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ReplacementProductListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readConditionAttribute( + IntegerAttributeCallback callback + ) { + readConditionAttribute(chipClusterPtr, callback); + } + public void subscribeConditionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeConditionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDegradationDirectionAttribute( + IntegerAttributeCallback callback + ) { + readDegradationDirectionAttribute(chipClusterPtr, callback); + } + public void subscribeDegradationDirectionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDegradationDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readChangeIndicationAttribute( + IntegerAttributeCallback callback + ) { + readChangeIndicationAttribute(chipClusterPtr, callback); + } + public void subscribeChangeIndicationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeChangeIndicationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInPlaceIndicatorAttribute( + BooleanAttributeCallback callback + ) { + readInPlaceIndicatorAttribute(chipClusterPtr, callback); + } + public void subscribeInPlaceIndicatorAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInPlaceIndicatorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback + ) { + readLastChangedTimeAttribute(chipClusterPtr, callback); + } + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { + writeLastChangedTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLastChangedTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastChangedTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback + ) { + readReplacementProductListAttribute(chipClusterPtr, callback); + } + public void subscribeReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeReplacementProductListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readConditionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeConditionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDegradationDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDegradationDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readChangeIndicationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeChangeIndicationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInPlaceIndicatorAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeInPlaceIndicatorAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLastChangedTimeAttribute(long chipClusterPtr, + LastChangedTimeAttributeCallback callback + ); + + private native void writeLastChangedTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLastChangedTimeAttribute(long chipClusterPtr, + LastChangedTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readReplacementProductListAttribute(long chipClusterPtr, + ReplacementProductListAttributeCallback callback + ); + private native void subscribeReplacementProductListAttribute(long chipClusterPtr, + ReplacementProductListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ActivatedCarbonFilterMonitoringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000072L; + + public ActivatedCarbonFilterMonitoringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void resetCondition(DefaultClusterCallback callback + ) { + resetCondition(chipClusterPtr, callback, null); + } + + public void resetCondition(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + resetCondition(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void resetCondition(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface LastChangedTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ReplacementProductListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readConditionAttribute( + IntegerAttributeCallback callback + ) { + readConditionAttribute(chipClusterPtr, callback); + } + public void subscribeConditionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeConditionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDegradationDirectionAttribute( + IntegerAttributeCallback callback + ) { + readDegradationDirectionAttribute(chipClusterPtr, callback); + } + public void subscribeDegradationDirectionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDegradationDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readChangeIndicationAttribute( + IntegerAttributeCallback callback + ) { + readChangeIndicationAttribute(chipClusterPtr, callback); + } + public void subscribeChangeIndicationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeChangeIndicationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInPlaceIndicatorAttribute( + BooleanAttributeCallback callback + ) { + readInPlaceIndicatorAttribute(chipClusterPtr, callback); + } + public void subscribeInPlaceIndicatorAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInPlaceIndicatorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback + ) { + readLastChangedTimeAttribute(chipClusterPtr, callback); + } + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value) { + writeLastChangedTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLastChangedTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLastChangedTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLastChangedTimeAttribute( + LastChangedTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLastChangedTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback + ) { + readReplacementProductListAttribute(chipClusterPtr, callback); + } + public void subscribeReplacementProductListAttribute( + ReplacementProductListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeReplacementProductListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readConditionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeConditionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDegradationDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDegradationDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readChangeIndicationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeChangeIndicationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInPlaceIndicatorAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeInPlaceIndicatorAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLastChangedTimeAttribute(long chipClusterPtr, + LastChangedTimeAttributeCallback callback + ); + + private native void writeLastChangedTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLastChangedTimeAttribute(long chipClusterPtr, + LastChangedTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readReplacementProductListAttribute(long chipClusterPtr, + ReplacementProductListAttributeCallback callback + ); + private native void subscribeReplacementProductListAttribute(long chipClusterPtr, + ReplacementProductListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BooleanSensorConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000080L; + + public BooleanSensorConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void supressRequest(DefaultClusterCallback callback + , Integer alarmsToSuppress) { + supressRequest(chipClusterPtr, callback, alarmsToSuppress, null); + } + + public void supressRequest(DefaultClusterCallback callback + , Integer alarmsToSuppress + , int timedInvokeTimeoutMs) { + supressRequest(chipClusterPtr, callback, alarmsToSuppress, timedInvokeTimeoutMs); + } + private native void supressRequest(long chipClusterPtr, DefaultClusterCallback Callback + , Integer alarmsToSuppress + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readSensitivityLevelAttribute( + IntegerAttributeCallback callback + ) { + readSensitivityLevelAttribute(chipClusterPtr, callback); + } + public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeSensitivityLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSensitivityLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSensitivityLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSensitivityLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSensitivityLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAlarmsActiveAttribute( + IntegerAttributeCallback callback + ) { + readAlarmsActiveAttribute(chipClusterPtr, callback); + } + public void subscribeAlarmsActiveAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAlarmsActiveAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAlarmsSuppressedAttribute( + IntegerAttributeCallback callback + ) { + readAlarmsSuppressedAttribute(chipClusterPtr, callback); + } + public void subscribeAlarmsSuppressedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAlarmsSuppressedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAlarmsEnabledAttribute( + IntegerAttributeCallback callback + ) { + readAlarmsEnabledAttribute(chipClusterPtr, callback); + } + public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value) { + writeAlarmsEnabledAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAlarmsEnabledAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeAlarmsEnabledAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAlarmsEnabledAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAlarmsEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readSensitivityLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeSensitivityLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSensitivityLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAlarmsActiveAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAlarmsActiveAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAlarmsSuppressedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAlarmsSuppressedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAlarmsEnabledAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeAlarmsEnabledAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAlarmsEnabledAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ValveConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000081L; + + public ValveConfigurationAndControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void open(DefaultClusterCallback callback + , Optional openDuration) { + open(chipClusterPtr, callback, openDuration, null); + } + + public void open(DefaultClusterCallback callback + , Optional openDuration + , int timedInvokeTimeoutMs) { + open(chipClusterPtr, callback, openDuration, timedInvokeTimeoutMs); + } + + public void close(DefaultClusterCallback callback + ) { + close(chipClusterPtr, callback, null); + } + + public void close(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + close(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void setLevel(DefaultClusterCallback callback + , Integer level, Optional openDuration) { + setLevel(chipClusterPtr, callback, level, openDuration, null); + } + + public void setLevel(DefaultClusterCallback callback + , Integer level, Optional openDuration + , int timedInvokeTimeoutMs) { + setLevel(chipClusterPtr, callback, level, openDuration, timedInvokeTimeoutMs); + } + private native void open(long chipClusterPtr, DefaultClusterCallback Callback + , Optional openDuration + , @Nullable Integer timedInvokeTimeoutMs); + private native void close(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void setLevel(long chipClusterPtr, DefaultClusterCallback Callback + , Integer level, Optional openDuration + , @Nullable Integer timedInvokeTimeoutMs); + + public interface OpenDurationAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AutoCloseTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface RemainingDurationAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentStateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TargetStateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TargetLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OpenLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readOpenDurationAttribute( + OpenDurationAttributeCallback callback + ) { + readOpenDurationAttribute(chipClusterPtr, callback); + } + public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value) { + writeOpenDurationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOpenDurationAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeOpenDurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOpenDurationAttribute( + OpenDurationAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOpenDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback + ) { + readAutoCloseTimeAttribute(chipClusterPtr, callback); + } + public void subscribeAutoCloseTimeAttribute( + AutoCloseTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAutoCloseTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRemainingDurationAttribute( + RemainingDurationAttributeCallback callback + ) { + readRemainingDurationAttribute(chipClusterPtr, callback); + } + public void subscribeRemainingDurationAttribute( + RemainingDurationAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeRemainingDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentStateAttribute( + CurrentStateAttributeCallback callback + ) { + readCurrentStateAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentStateAttribute( + CurrentStateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTargetStateAttribute( + TargetStateAttributeCallback callback + ) { + readTargetStateAttribute(chipClusterPtr, callback); + } + public void subscribeTargetStateAttribute( + TargetStateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTargetStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpStateAttribute( + IntegerAttributeCallback callback + ) { + readStartUpStateAttribute(chipClusterPtr, callback); + } + public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpStateAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpStateAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpStateAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStartUpStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentLevelAttribute( + CurrentLevelAttributeCallback callback + ) { + readCurrentLevelAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentLevelAttribute( + CurrentLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTargetLevelAttribute( + TargetLevelAttributeCallback callback + ) { + readTargetLevelAttribute(chipClusterPtr, callback); + } + public void subscribeTargetLevelAttribute( + TargetLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTargetLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOpenLevelAttribute( + OpenLevelAttributeCallback callback + ) { + readOpenLevelAttribute(chipClusterPtr, callback); + } + public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeOpenLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOpenLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOpenLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOpenLevelAttribute( + OpenLevelAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOpenLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readValveFaultAttribute( + IntegerAttributeCallback callback + ) { + readValveFaultAttribute(chipClusterPtr, callback); + } + public void subscribeValveFaultAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeValveFaultAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readOpenDurationAttribute(long chipClusterPtr, + OpenDurationAttributeCallback callback + ); + + private native void writeOpenDurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOpenDurationAttribute(long chipClusterPtr, + OpenDurationAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAutoCloseTimeAttribute(long chipClusterPtr, + AutoCloseTimeAttributeCallback callback + ); + private native void subscribeAutoCloseTimeAttribute(long chipClusterPtr, + AutoCloseTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readRemainingDurationAttribute(long chipClusterPtr, + RemainingDurationAttributeCallback callback + ); + private native void subscribeRemainingDurationAttribute(long chipClusterPtr, + RemainingDurationAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentStateAttribute(long chipClusterPtr, + CurrentStateAttributeCallback callback + ); + private native void subscribeCurrentStateAttribute(long chipClusterPtr, + CurrentStateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTargetStateAttribute(long chipClusterPtr, + TargetStateAttributeCallback callback + ); + private native void subscribeTargetStateAttribute(long chipClusterPtr, + TargetStateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readStartUpStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeStartUpStateAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentLevelAttribute(long chipClusterPtr, + CurrentLevelAttributeCallback callback + ); + private native void subscribeCurrentLevelAttribute(long chipClusterPtr, + CurrentLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTargetLevelAttribute(long chipClusterPtr, + TargetLevelAttributeCallback callback + ); + private native void subscribeTargetLevelAttribute(long chipClusterPtr, + TargetLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOpenLevelAttribute(long chipClusterPtr, + OpenLevelAttributeCallback callback + ); + + private native void writeOpenLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOpenLevelAttribute(long chipClusterPtr, + OpenLevelAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readValveFaultAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeValveFaultAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class DoorLockCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000101L; + + public DoorLockCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + + public void lockDoor(DefaultClusterCallback callback + , Optional PINCode + , int timedInvokeTimeoutMs) { + lockDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); + } + + + public void unlockDoor(DefaultClusterCallback callback + , Optional PINCode + , int timedInvokeTimeoutMs) { + unlockDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); + } + + + public void unlockWithTimeout(DefaultClusterCallback callback + , Integer timeout, Optional PINCode + , int timedInvokeTimeoutMs) { + unlockWithTimeout(chipClusterPtr, callback, timeout, PINCode, timedInvokeTimeoutMs); + } + + public void setWeekDaySchedule(DefaultClusterCallback callback + , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute) { + setWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, null); + } + + public void setWeekDaySchedule(DefaultClusterCallback callback + , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute + , int timedInvokeTimeoutMs) { + setWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, daysMask, startHour, startMinute, endHour, endMinute, timedInvokeTimeoutMs); + } + + public void getWeekDaySchedule(GetWeekDayScheduleResponseCallback callback + , Integer weekDayIndex, Integer userIndex) { + getWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, null); + } + + public void getWeekDaySchedule(GetWeekDayScheduleResponseCallback callback + , Integer weekDayIndex, Integer userIndex + , int timedInvokeTimeoutMs) { + getWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, timedInvokeTimeoutMs); + } + + public void clearWeekDaySchedule(DefaultClusterCallback callback + , Integer weekDayIndex, Integer userIndex) { + clearWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, null); + } + + public void clearWeekDaySchedule(DefaultClusterCallback callback + , Integer weekDayIndex, Integer userIndex + , int timedInvokeTimeoutMs) { + clearWeekDaySchedule(chipClusterPtr, callback, weekDayIndex, userIndex, timedInvokeTimeoutMs); + } + + public void setYearDaySchedule(DefaultClusterCallback callback + , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime) { + setYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, localStartTime, localEndTime, null); + } + + public void setYearDaySchedule(DefaultClusterCallback callback + , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime + , int timedInvokeTimeoutMs) { + setYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, localStartTime, localEndTime, timedInvokeTimeoutMs); + } + + public void getYearDaySchedule(GetYearDayScheduleResponseCallback callback + , Integer yearDayIndex, Integer userIndex) { + getYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, null); + } + + public void getYearDaySchedule(GetYearDayScheduleResponseCallback callback + , Integer yearDayIndex, Integer userIndex + , int timedInvokeTimeoutMs) { + getYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, timedInvokeTimeoutMs); + } + + public void clearYearDaySchedule(DefaultClusterCallback callback + , Integer yearDayIndex, Integer userIndex) { + clearYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, null); + } + + public void clearYearDaySchedule(DefaultClusterCallback callback + , Integer yearDayIndex, Integer userIndex + , int timedInvokeTimeoutMs) { + clearYearDaySchedule(chipClusterPtr, callback, yearDayIndex, userIndex, timedInvokeTimeoutMs); + } + + public void setHolidaySchedule(DefaultClusterCallback callback + , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode) { + setHolidaySchedule(chipClusterPtr, callback, holidayIndex, localStartTime, localEndTime, operatingMode, null); + } + + public void setHolidaySchedule(DefaultClusterCallback callback + , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode + , int timedInvokeTimeoutMs) { + setHolidaySchedule(chipClusterPtr, callback, holidayIndex, localStartTime, localEndTime, operatingMode, timedInvokeTimeoutMs); + } + + public void getHolidaySchedule(GetHolidayScheduleResponseCallback callback + , Integer holidayIndex) { + getHolidaySchedule(chipClusterPtr, callback, holidayIndex, null); + } + + public void getHolidaySchedule(GetHolidayScheduleResponseCallback callback + , Integer holidayIndex + , int timedInvokeTimeoutMs) { + getHolidaySchedule(chipClusterPtr, callback, holidayIndex, timedInvokeTimeoutMs); + } + + public void clearHolidaySchedule(DefaultClusterCallback callback + , Integer holidayIndex) { + clearHolidaySchedule(chipClusterPtr, callback, holidayIndex, null); + } + + public void clearHolidaySchedule(DefaultClusterCallback callback + , Integer holidayIndex + , int timedInvokeTimeoutMs) { + clearHolidaySchedule(chipClusterPtr, callback, holidayIndex, timedInvokeTimeoutMs); + } + + + public void setUser(DefaultClusterCallback callback + , Integer operationType, Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule + , int timedInvokeTimeoutMs) { + setUser(chipClusterPtr, callback, operationType, userIndex, userName, userUniqueID, userStatus, userType, credentialRule, timedInvokeTimeoutMs); + } + + public void getUser(GetUserResponseCallback callback + , Integer userIndex) { + getUser(chipClusterPtr, callback, userIndex, null); + } + + public void getUser(GetUserResponseCallback callback + , Integer userIndex + , int timedInvokeTimeoutMs) { + getUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); + } + + + public void clearUser(DefaultClusterCallback callback + , Integer userIndex + , int timedInvokeTimeoutMs) { + clearUser(chipClusterPtr, callback, userIndex, timedInvokeTimeoutMs); + } + + + public void setCredential(SetCredentialResponseCallback callback + , Integer operationType, ChipStructs.DoorLockClusterCredentialStruct credential, byte[] credentialData, @Nullable Integer userIndex, @Nullable Integer userStatus, @Nullable Integer userType + , int timedInvokeTimeoutMs) { + setCredential(chipClusterPtr, callback, operationType, credential, credentialData, userIndex, userStatus, userType, timedInvokeTimeoutMs); + } + + public void getCredentialStatus(GetCredentialStatusResponseCallback callback + , ChipStructs.DoorLockClusterCredentialStruct credential) { + getCredentialStatus(chipClusterPtr, callback, credential, null); + } + + public void getCredentialStatus(GetCredentialStatusResponseCallback callback + , ChipStructs.DoorLockClusterCredentialStruct credential + , int timedInvokeTimeoutMs) { + getCredentialStatus(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); + } + + + public void clearCredential(DefaultClusterCallback callback + , @Nullable ChipStructs.DoorLockClusterCredentialStruct credential + , int timedInvokeTimeoutMs) { + clearCredential(chipClusterPtr, callback, credential, timedInvokeTimeoutMs); + } + + + public void unboltDoor(DefaultClusterCallback callback + , Optional PINCode + , int timedInvokeTimeoutMs) { + unboltDoor(chipClusterPtr, callback, PINCode, timedInvokeTimeoutMs); + } + private native void lockDoor(long chipClusterPtr, DefaultClusterCallback Callback + , Optional PINCode + , @Nullable Integer timedInvokeTimeoutMs); + private native void unlockDoor(long chipClusterPtr, DefaultClusterCallback Callback + , Optional PINCode + , @Nullable Integer timedInvokeTimeoutMs); + private native void unlockWithTimeout(long chipClusterPtr, DefaultClusterCallback Callback + , Integer timeout, Optional PINCode + , @Nullable Integer timedInvokeTimeoutMs); + private native void setWeekDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer weekDayIndex, Integer userIndex, Integer daysMask, Integer startHour, Integer startMinute, Integer endHour, Integer endMinute + , @Nullable Integer timedInvokeTimeoutMs); + private native void getWeekDaySchedule(long chipClusterPtr, GetWeekDayScheduleResponseCallback Callback + , Integer weekDayIndex, Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearWeekDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer weekDayIndex, Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void setYearDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer yearDayIndex, Integer userIndex, Long localStartTime, Long localEndTime + , @Nullable Integer timedInvokeTimeoutMs); + private native void getYearDaySchedule(long chipClusterPtr, GetYearDayScheduleResponseCallback Callback + , Integer yearDayIndex, Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearYearDaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer yearDayIndex, Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void setHolidaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer holidayIndex, Long localStartTime, Long localEndTime, Integer operatingMode + , @Nullable Integer timedInvokeTimeoutMs); + private native void getHolidaySchedule(long chipClusterPtr, GetHolidayScheduleResponseCallback Callback + , Integer holidayIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearHolidaySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer holidayIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void setUser(long chipClusterPtr, DefaultClusterCallback Callback + , Integer operationType, Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule + , @Nullable Integer timedInvokeTimeoutMs); + private native void getUser(long chipClusterPtr, GetUserResponseCallback Callback + , Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearUser(long chipClusterPtr, DefaultClusterCallback Callback + , Integer userIndex + , @Nullable Integer timedInvokeTimeoutMs); + private native void setCredential(long chipClusterPtr, SetCredentialResponseCallback Callback + , Integer operationType, ChipStructs.DoorLockClusterCredentialStruct credential, byte[] credentialData, @Nullable Integer userIndex, @Nullable Integer userStatus, @Nullable Integer userType + , @Nullable Integer timedInvokeTimeoutMs); + private native void getCredentialStatus(long chipClusterPtr, GetCredentialStatusResponseCallback Callback + , ChipStructs.DoorLockClusterCredentialStruct credential + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearCredential(long chipClusterPtr, DefaultClusterCallback Callback + , @Nullable ChipStructs.DoorLockClusterCredentialStruct credential + , @Nullable Integer timedInvokeTimeoutMs); + private native void unboltDoor(long chipClusterPtr, DefaultClusterCallback Callback + , Optional PINCode + , @Nullable Integer timedInvokeTimeoutMs); + public interface GetWeekDayScheduleResponseCallback { + void onSuccess(Integer weekDayIndex, Integer userIndex, Integer status, Optional daysMask, Optional startHour, Optional startMinute, Optional endHour, Optional endMinute); + + void onError(Exception error); + } + + public interface GetYearDayScheduleResponseCallback { + void onSuccess(Integer yearDayIndex, Integer userIndex, Integer status, Optional localStartTime, Optional localEndTime); + + void onError(Exception error); + } + + public interface GetHolidayScheduleResponseCallback { + void onSuccess(Integer holidayIndex, Integer status, Optional localStartTime, Optional localEndTime, Optional operatingMode); + + void onError(Exception error); + } + + public interface GetUserResponseCallback { + void onSuccess(Integer userIndex, @Nullable String userName, @Nullable Long userUniqueID, @Nullable Integer userStatus, @Nullable Integer userType, @Nullable Integer credentialRule, @Nullable ArrayList credentials, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextUserIndex); + + void onError(Exception error); + } + + public interface SetCredentialResponseCallback { + void onSuccess(Integer status, @Nullable Integer userIndex, @Nullable Integer nextCredentialIndex); + + void onError(Exception error); + } + + public interface GetCredentialStatusResponseCallback { + void onSuccess(Boolean credentialExists, @Nullable Integer userIndex, @Nullable Integer creatorFabricIndex, @Nullable Integer lastModifiedFabricIndex, @Nullable Integer nextCredentialIndex); + + void onError(Exception error); + } + + + public interface LockStateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DoorStateAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readLockStateAttribute( + LockStateAttributeCallback callback + ) { + readLockStateAttribute(chipClusterPtr, callback); + } + public void subscribeLockStateAttribute( + LockStateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLockStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLockTypeAttribute( + IntegerAttributeCallback callback + ) { + readLockTypeAttribute(chipClusterPtr, callback); + } + public void subscribeLockTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLockTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActuatorEnabledAttribute( + BooleanAttributeCallback callback + ) { + readActuatorEnabledAttribute(chipClusterPtr, callback); + } + public void subscribeActuatorEnabledAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActuatorEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDoorStateAttribute( + DoorStateAttributeCallback callback + ) { + readDoorStateAttribute(chipClusterPtr, callback); + } + public void subscribeDoorStateAttribute( + DoorStateAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDoorStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDoorOpenEventsAttribute( + LongAttributeCallback callback + ) { + readDoorOpenEventsAttribute(chipClusterPtr, callback); + } + public void writeDoorOpenEventsAttribute(DefaultClusterCallback callback, Long value) { + writeDoorOpenEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDoorOpenEventsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeDoorOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeDoorOpenEventsAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDoorOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDoorClosedEventsAttribute( + LongAttributeCallback callback + ) { + readDoorClosedEventsAttribute(chipClusterPtr, callback); + } + public void writeDoorClosedEventsAttribute(DefaultClusterCallback callback, Long value) { + writeDoorClosedEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeDoorClosedEventsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeDoorClosedEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeDoorClosedEventsAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDoorClosedEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOpenPeriodAttribute( + IntegerAttributeCallback callback + ) { + readOpenPeriodAttribute(chipClusterPtr, callback); + } + public void writeOpenPeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeOpenPeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOpenPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOpenPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOpenPeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOpenPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfTotalUsersSupportedAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfTotalUsersSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfTotalUsersSupportedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfTotalUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfPINUsersSupportedAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfPINUsersSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfPINUsersSupportedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfPINUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfRFIDUsersSupportedAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfRFIDUsersSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfRFIDUsersSupportedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfRFIDUsersSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfWeekDaySchedulesSupportedPerUserAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfWeekDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfYearDaySchedulesSupportedPerUserAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfYearDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfHolidaySchedulesSupportedAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfHolidaySchedulesSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfHolidaySchedulesSupportedAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfHolidaySchedulesSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxPINCodeLengthAttribute( + IntegerAttributeCallback callback + ) { + readMaxPINCodeLengthAttribute(chipClusterPtr, callback); + } + public void subscribeMaxPINCodeLengthAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinPINCodeLengthAttribute( + IntegerAttributeCallback callback + ) { + readMinPINCodeLengthAttribute(chipClusterPtr, callback); + } + public void subscribeMinPINCodeLengthAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinPINCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxRFIDCodeLengthAttribute( + IntegerAttributeCallback callback + ) { + readMaxRFIDCodeLengthAttribute(chipClusterPtr, callback); + } + public void subscribeMaxRFIDCodeLengthAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxRFIDCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinRFIDCodeLengthAttribute( + IntegerAttributeCallback callback + ) { + readMinRFIDCodeLengthAttribute(chipClusterPtr, callback); + } + public void subscribeMinRFIDCodeLengthAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinRFIDCodeLengthAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCredentialRulesSupportAttribute( + IntegerAttributeCallback callback + ) { + readCredentialRulesSupportAttribute(chipClusterPtr, callback); + } + public void subscribeCredentialRulesSupportAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCredentialRulesSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfCredentialsSupportedPerUserAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfCredentialsSupportedPerUserAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfCredentialsSupportedPerUserAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfCredentialsSupportedPerUserAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLanguageAttribute( + CharStringAttributeCallback callback + ) { + readLanguageAttribute(chipClusterPtr, callback); + } + public void writeLanguageAttribute(DefaultClusterCallback callback, String value) { + writeLanguageAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLanguageAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLanguageAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLanguageAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLanguageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLEDSettingsAttribute( + IntegerAttributeCallback callback + ) { + readLEDSettingsAttribute(chipClusterPtr, callback); + } + public void writeLEDSettingsAttribute(DefaultClusterCallback callback, Integer value) { + writeLEDSettingsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLEDSettingsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeLEDSettingsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLEDSettingsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLEDSettingsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAutoRelockTimeAttribute( + LongAttributeCallback callback + ) { + readAutoRelockTimeAttribute(chipClusterPtr, callback); + } + public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value) { + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAutoRelockTimeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeAutoRelockTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAutoRelockTimeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAutoRelockTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSoundVolumeAttribute( + IntegerAttributeCallback callback + ) { + readSoundVolumeAttribute(chipClusterPtr, callback); + } + public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value) { + writeSoundVolumeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSoundVolumeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSoundVolumeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSoundVolumeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSoundVolumeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperatingModeAttribute( + IntegerAttributeCallback callback + ) { + readOperatingModeAttribute(chipClusterPtr, callback); + } + public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOperatingModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperatingModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperatingModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOperatingModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperatingModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedOperatingModesAttribute( + IntegerAttributeCallback callback + ) { + readSupportedOperatingModesAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedOperatingModesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedOperatingModesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDefaultConfigurationRegisterAttribute( + IntegerAttributeCallback callback + ) { + readDefaultConfigurationRegisterAttribute(chipClusterPtr, callback); + } + public void subscribeDefaultConfigurationRegisterAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDefaultConfigurationRegisterAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnableLocalProgrammingAttribute( + BooleanAttributeCallback callback + ) { + readEnableLocalProgrammingAttribute(chipClusterPtr, callback); + } + public void writeEnableLocalProgrammingAttribute(DefaultClusterCallback callback, Boolean value) { + writeEnableLocalProgrammingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnableLocalProgrammingAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnableLocalProgrammingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnableLocalProgrammingAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnableLocalProgrammingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnableOneTouchLockingAttribute( + BooleanAttributeCallback callback + ) { + readEnableOneTouchLockingAttribute(chipClusterPtr, callback); + } + public void writeEnableOneTouchLockingAttribute(DefaultClusterCallback callback, Boolean value) { + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnableOneTouchLockingAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnableOneTouchLockingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnableOneTouchLockingAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnableOneTouchLockingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnableInsideStatusLEDAttribute( + BooleanAttributeCallback callback + ) { + readEnableInsideStatusLEDAttribute(chipClusterPtr, callback); + } + public void writeEnableInsideStatusLEDAttribute(DefaultClusterCallback callback, Boolean value) { + writeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnableInsideStatusLEDAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnableInsideStatusLEDAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnableInsideStatusLEDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnablePrivacyModeButtonAttribute( + BooleanAttributeCallback callback + ) { + readEnablePrivacyModeButtonAttribute(chipClusterPtr, callback); + } + public void writeEnablePrivacyModeButtonAttribute(DefaultClusterCallback callback, Boolean value) { + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnablePrivacyModeButtonAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnablePrivacyModeButtonAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnablePrivacyModeButtonAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalProgrammingFeaturesAttribute( + IntegerAttributeCallback callback + ) { + readLocalProgrammingFeaturesAttribute(chipClusterPtr, callback); + } + public void writeLocalProgrammingFeaturesAttribute(DefaultClusterCallback callback, Integer value) { + writeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalProgrammingFeaturesAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLocalProgrammingFeaturesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLocalProgrammingFeaturesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWrongCodeEntryLimitAttribute( + IntegerAttributeCallback callback + ) { + readWrongCodeEntryLimitAttribute(chipClusterPtr, callback); + } + public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value) { + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWrongCodeEntryLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeWrongCodeEntryLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWrongCodeEntryLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUserCodeTemporaryDisableTimeAttribute( + IntegerAttributeCallback callback + ) { + readUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback); + } + public void writeUserCodeTemporaryDisableTimeAttribute(DefaultClusterCallback callback, Integer value) { + writeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUserCodeTemporaryDisableTimeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUserCodeTemporaryDisableTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUserCodeTemporaryDisableTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSendPINOverTheAirAttribute( + BooleanAttributeCallback callback + ) { + readSendPINOverTheAirAttribute(chipClusterPtr, callback); + } + public void writeSendPINOverTheAirAttribute(DefaultClusterCallback callback, Boolean value) { + writeSendPINOverTheAirAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSendPINOverTheAirAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeSendPINOverTheAirAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSendPINOverTheAirAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSendPINOverTheAirAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRequirePINforRemoteOperationAttribute( + BooleanAttributeCallback callback + ) { + readRequirePINforRemoteOperationAttribute(chipClusterPtr, callback); + } + public void writeRequirePINforRemoteOperationAttribute(DefaultClusterCallback callback, Boolean value) { + writeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRequirePINforRemoteOperationAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRequirePINforRemoteOperationAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRequirePINforRemoteOperationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readExpiringUserTimeoutAttribute( + IntegerAttributeCallback callback + ) { + readExpiringUserTimeoutAttribute(chipClusterPtr, callback); + } + public void writeExpiringUserTimeoutAttribute(DefaultClusterCallback callback, Integer value) { + writeExpiringUserTimeoutAttribute(chipClusterPtr, callback, value, null); + } + + public void writeExpiringUserTimeoutAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeExpiringUserTimeoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeExpiringUserTimeoutAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeExpiringUserTimeoutAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readLockStateAttribute(long chipClusterPtr, + LockStateAttributeCallback callback + ); + private native void subscribeLockStateAttribute(long chipClusterPtr, + LockStateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLockTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLockTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActuatorEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + private native void subscribeActuatorEnabledAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDoorStateAttribute(long chipClusterPtr, + DoorStateAttributeCallback callback + ); + private native void subscribeDoorStateAttribute(long chipClusterPtr, + DoorStateAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDoorOpenEventsAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeDoorOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeDoorOpenEventsAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDoorClosedEventsAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeDoorClosedEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeDoorClosedEventsAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOpenPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOpenPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOpenPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfTotalUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfTotalUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfPINUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfPINUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfRFIDUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfRFIDUsersSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfWeekDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfWeekDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfYearDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfYearDaySchedulesSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfHolidaySchedulesSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfHolidaySchedulesSupportedAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxPINCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxPINCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinPINCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinPINCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxRFIDCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMaxRFIDCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinRFIDCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMinRFIDCodeLengthAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCredentialRulesSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCredentialRulesSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfCredentialsSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfCredentialsSupportedPerUserAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLanguageAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeLanguageAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLanguageAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLEDSettingsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeLEDSettingsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLEDSettingsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAutoRelockTimeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeAutoRelockTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAutoRelockTimeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSoundVolumeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeSoundVolumeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSoundVolumeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOperatingModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOperatingModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOperatingModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedOperatingModesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSupportedOperatingModesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDefaultConfigurationRegisterAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDefaultConfigurationRegisterAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnableLocalProgrammingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeEnableLocalProgrammingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnableLocalProgrammingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnableOneTouchLockingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeEnableOneTouchLockingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnableOneTouchLockingAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnableInsideStatusLEDAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeEnableInsideStatusLEDAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnableInsideStatusLEDAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnablePrivacyModeButtonAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeEnablePrivacyModeButtonAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnablePrivacyModeButtonAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLocalProgrammingFeaturesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeLocalProgrammingFeaturesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLocalProgrammingFeaturesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWrongCodeEntryLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeWrongCodeEntryLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeWrongCodeEntryLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUserCodeTemporaryDisableTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSendPINOverTheAirAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeSendPINOverTheAirAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSendPINOverTheAirAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRequirePINforRemoteOperationAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeRequirePINforRemoteOperationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRequirePINforRemoteOperationAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readExpiringUserTimeoutAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeExpiringUserTimeoutAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeExpiringUserTimeoutAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class WindowCoveringCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000102L; + + public WindowCoveringCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void upOrOpen(DefaultClusterCallback callback + ) { + upOrOpen(chipClusterPtr, callback, null); + } + + public void upOrOpen(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + upOrOpen(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void downOrClose(DefaultClusterCallback callback + ) { + downOrClose(chipClusterPtr, callback, null); + } + + public void downOrClose(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + downOrClose(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void stopMotion(DefaultClusterCallback callback + ) { + stopMotion(chipClusterPtr, callback, null); + } + + public void stopMotion(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + stopMotion(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void goToLiftValue(DefaultClusterCallback callback + , Integer liftValue) { + goToLiftValue(chipClusterPtr, callback, liftValue, null); + } + + public void goToLiftValue(DefaultClusterCallback callback + , Integer liftValue + , int timedInvokeTimeoutMs) { + goToLiftValue(chipClusterPtr, callback, liftValue, timedInvokeTimeoutMs); + } + + public void goToLiftPercentage(DefaultClusterCallback callback + , Integer liftPercent100thsValue) { + goToLiftPercentage(chipClusterPtr, callback, liftPercent100thsValue, null); + } + + public void goToLiftPercentage(DefaultClusterCallback callback + , Integer liftPercent100thsValue + , int timedInvokeTimeoutMs) { + goToLiftPercentage(chipClusterPtr, callback, liftPercent100thsValue, timedInvokeTimeoutMs); + } + + public void goToTiltValue(DefaultClusterCallback callback + , Integer tiltValue) { + goToTiltValue(chipClusterPtr, callback, tiltValue, null); + } + + public void goToTiltValue(DefaultClusterCallback callback + , Integer tiltValue + , int timedInvokeTimeoutMs) { + goToTiltValue(chipClusterPtr, callback, tiltValue, timedInvokeTimeoutMs); + } + + public void goToTiltPercentage(DefaultClusterCallback callback + , Integer tiltPercent100thsValue) { + goToTiltPercentage(chipClusterPtr, callback, tiltPercent100thsValue, null); + } + + public void goToTiltPercentage(DefaultClusterCallback callback + , Integer tiltPercent100thsValue + , int timedInvokeTimeoutMs) { + goToTiltPercentage(chipClusterPtr, callback, tiltPercent100thsValue, timedInvokeTimeoutMs); + } + private native void upOrOpen(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void downOrClose(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void stopMotion(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void goToLiftValue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer liftValue + , @Nullable Integer timedInvokeTimeoutMs); + private native void goToLiftPercentage(long chipClusterPtr, DefaultClusterCallback Callback + , Integer liftPercent100thsValue + , @Nullable Integer timedInvokeTimeoutMs); + private native void goToTiltValue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer tiltValue + , @Nullable Integer timedInvokeTimeoutMs); + private native void goToTiltPercentage(long chipClusterPtr, DefaultClusterCallback Callback + , Integer tiltPercent100thsValue + , @Nullable Integer timedInvokeTimeoutMs); + + public interface CurrentPositionLiftAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPositionTiltAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPositionLiftPercentageAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPositionTiltPercentageAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TargetPositionLiftPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TargetPositionTiltPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPositionLiftPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CurrentPositionTiltPercent100thsAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTypeAttribute( + IntegerAttributeCallback callback + ) { + readTypeAttribute(chipClusterPtr, callback); + } + public void subscribeTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalClosedLimitLiftAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalClosedLimitLiftAttribute(chipClusterPtr, callback); + } + public void subscribePhysicalClosedLimitLiftAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalClosedLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalClosedLimitTiltAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalClosedLimitTiltAttribute(chipClusterPtr, callback); + } + public void subscribePhysicalClosedLimitTiltAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalClosedLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionLiftAttribute( + CurrentPositionLiftAttributeCallback callback + ) { + readCurrentPositionLiftAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionLiftAttribute( + CurrentPositionLiftAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionTiltAttribute( + CurrentPositionTiltAttributeCallback callback + ) { + readCurrentPositionTiltAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionTiltAttribute( + CurrentPositionTiltAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfActuationsLiftAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfActuationsLiftAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfActuationsLiftAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfActuationsLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfActuationsTiltAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfActuationsTiltAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfActuationsTiltAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfActuationsTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readConfigStatusAttribute( + IntegerAttributeCallback callback + ) { + readConfigStatusAttribute(chipClusterPtr, callback); + } + public void subscribeConfigStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeConfigStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionLiftPercentageAttribute( + CurrentPositionLiftPercentageAttributeCallback callback + ) { + readCurrentPositionLiftPercentageAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionLiftPercentageAttribute( + CurrentPositionLiftPercentageAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionLiftPercentageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionTiltPercentageAttribute( + CurrentPositionTiltPercentageAttributeCallback callback + ) { + readCurrentPositionTiltPercentageAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionTiltPercentageAttribute( + CurrentPositionTiltPercentageAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionTiltPercentageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationalStatusAttribute( + IntegerAttributeCallback callback + ) { + readOperationalStatusAttribute(chipClusterPtr, callback); + } + public void subscribeOperationalStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationalStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTargetPositionLiftPercent100thsAttribute( + TargetPositionLiftPercent100thsAttributeCallback callback + ) { + readTargetPositionLiftPercent100thsAttribute(chipClusterPtr, callback); + } + public void subscribeTargetPositionLiftPercent100thsAttribute( + TargetPositionLiftPercent100thsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTargetPositionLiftPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTargetPositionTiltPercent100thsAttribute( + TargetPositionTiltPercent100thsAttributeCallback callback + ) { + readTargetPositionTiltPercent100thsAttribute(chipClusterPtr, callback); + } + public void subscribeTargetPositionTiltPercent100thsAttribute( + TargetPositionTiltPercent100thsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTargetPositionTiltPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEndProductTypeAttribute( + IntegerAttributeCallback callback + ) { + readEndProductTypeAttribute(chipClusterPtr, callback); + } + public void subscribeEndProductTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEndProductTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionLiftPercent100thsAttribute( + CurrentPositionLiftPercent100thsAttributeCallback callback + ) { + readCurrentPositionLiftPercent100thsAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionLiftPercent100thsAttribute( + CurrentPositionLiftPercent100thsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionLiftPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentPositionTiltPercent100thsAttribute( + CurrentPositionTiltPercent100thsAttributeCallback callback + ) { + readCurrentPositionTiltPercent100thsAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentPositionTiltPercent100thsAttribute( + CurrentPositionTiltPercent100thsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCurrentPositionTiltPercent100thsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstalledOpenLimitLiftAttribute( + IntegerAttributeCallback callback + ) { + readInstalledOpenLimitLiftAttribute(chipClusterPtr, callback); + } + public void subscribeInstalledOpenLimitLiftAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstalledOpenLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstalledClosedLimitLiftAttribute( + IntegerAttributeCallback callback + ) { + readInstalledClosedLimitLiftAttribute(chipClusterPtr, callback); + } + public void subscribeInstalledClosedLimitLiftAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstalledClosedLimitLiftAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstalledOpenLimitTiltAttribute( + IntegerAttributeCallback callback + ) { + readInstalledOpenLimitTiltAttribute(chipClusterPtr, callback); + } + public void subscribeInstalledOpenLimitTiltAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstalledOpenLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstalledClosedLimitTiltAttribute( + IntegerAttributeCallback callback + ) { + readInstalledClosedLimitTiltAttribute(chipClusterPtr, callback); + } + public void subscribeInstalledClosedLimitTiltAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstalledClosedLimitTiltAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readModeAttribute( + IntegerAttributeCallback callback + ) { + readModeAttribute(chipClusterPtr, callback); + } + public void writeModeAttribute(DefaultClusterCallback callback, Integer value) { + writeModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSafetyStatusAttribute( + IntegerAttributeCallback callback + ) { + readSafetyStatusAttribute(chipClusterPtr, callback); + } + public void subscribeSafetyStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSafetyStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalClosedLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePhysicalClosedLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalClosedLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePhysicalClosedLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentPositionLiftAttribute(long chipClusterPtr, + CurrentPositionLiftAttributeCallback callback + ); + private native void subscribeCurrentPositionLiftAttribute(long chipClusterPtr, + CurrentPositionLiftAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentPositionTiltAttribute(long chipClusterPtr, + CurrentPositionTiltAttributeCallback callback + ); + private native void subscribeCurrentPositionTiltAttribute(long chipClusterPtr, + CurrentPositionTiltAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNumberOfActuationsLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfActuationsLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfActuationsTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfActuationsTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readConfigStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeConfigStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentPositionLiftPercentageAttribute(long chipClusterPtr, + CurrentPositionLiftPercentageAttributeCallback callback + ); + private native void subscribeCurrentPositionLiftPercentageAttribute(long chipClusterPtr, + CurrentPositionLiftPercentageAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentPositionTiltPercentageAttribute(long chipClusterPtr, + CurrentPositionTiltPercentageAttributeCallback callback + ); + private native void subscribeCurrentPositionTiltPercentageAttribute(long chipClusterPtr, + CurrentPositionTiltPercentageAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationalStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOperationalStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTargetPositionLiftPercent100thsAttribute(long chipClusterPtr, + TargetPositionLiftPercent100thsAttributeCallback callback + ); + private native void subscribeTargetPositionLiftPercent100thsAttribute(long chipClusterPtr, + TargetPositionLiftPercent100thsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTargetPositionTiltPercent100thsAttribute(long chipClusterPtr, + TargetPositionTiltPercent100thsAttributeCallback callback + ); + private native void subscribeTargetPositionTiltPercent100thsAttribute(long chipClusterPtr, + TargetPositionTiltPercent100thsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEndProductTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEndProductTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentPositionLiftPercent100thsAttribute(long chipClusterPtr, + CurrentPositionLiftPercent100thsAttributeCallback callback + ); + private native void subscribeCurrentPositionLiftPercent100thsAttribute(long chipClusterPtr, + CurrentPositionLiftPercent100thsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentPositionTiltPercent100thsAttribute(long chipClusterPtr, + CurrentPositionTiltPercent100thsAttributeCallback callback + ); + private native void subscribeCurrentPositionTiltPercent100thsAttribute(long chipClusterPtr, + CurrentPositionTiltPercent100thsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readInstalledOpenLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstalledOpenLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstalledClosedLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstalledClosedLimitLiftAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstalledOpenLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstalledOpenLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstalledClosedLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstalledClosedLimitTiltAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSafetyStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSafetyStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BarrierControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000103L; + + public BarrierControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void barrierControlGoToPercent(DefaultClusterCallback callback + , Integer percentOpen) { + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, null); + } + + public void barrierControlGoToPercent(DefaultClusterCallback callback + , Integer percentOpen + , int timedInvokeTimeoutMs) { + barrierControlGoToPercent(chipClusterPtr, callback, percentOpen, timedInvokeTimeoutMs); + } + + public void barrierControlStop(DefaultClusterCallback callback + ) { + barrierControlStop(chipClusterPtr, callback, null); + } + + public void barrierControlStop(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + barrierControlStop(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void barrierControlGoToPercent(long chipClusterPtr, DefaultClusterCallback Callback + , Integer percentOpen + , @Nullable Integer timedInvokeTimeoutMs); + private native void barrierControlStop(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readBarrierMovingStateAttribute( + IntegerAttributeCallback callback + ) { + readBarrierMovingStateAttribute(chipClusterPtr, callback); + } + public void subscribeBarrierMovingStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierMovingStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierSafetyStatusAttribute( + IntegerAttributeCallback callback + ) { + readBarrierSafetyStatusAttribute(chipClusterPtr, callback); + } + public void subscribeBarrierSafetyStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierSafetyStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierCapabilitiesAttribute( + IntegerAttributeCallback callback + ) { + readBarrierCapabilitiesAttribute(chipClusterPtr, callback); + } + public void subscribeBarrierCapabilitiesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierCapabilitiesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierOpenEventsAttribute( + IntegerAttributeCallback callback + ) { + readBarrierOpenEventsAttribute(chipClusterPtr, callback); + } + public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierOpenEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierOpenEventsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierCloseEventsAttribute( + IntegerAttributeCallback callback + ) { + readBarrierCloseEventsAttribute(chipClusterPtr, callback); + } + public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierCloseEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierCloseEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierCloseEventsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierCloseEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierCommandOpenEventsAttribute( + IntegerAttributeCallback callback + ) { + readBarrierCommandOpenEventsAttribute(chipClusterPtr, callback); + } + public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierCommandOpenEventsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierCommandOpenEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierCommandCloseEventsAttribute( + IntegerAttributeCallback callback + ) { + readBarrierCommandCloseEventsAttribute(chipClusterPtr, callback); + } + public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierCommandCloseEventsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierCommandCloseEventsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierOpenPeriodAttribute( + IntegerAttributeCallback callback + ) { + readBarrierOpenPeriodAttribute(chipClusterPtr, callback); + } + public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierOpenPeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierOpenPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierOpenPeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierOpenPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierClosePeriodAttribute( + IntegerAttributeCallback callback + ) { + readBarrierClosePeriodAttribute(chipClusterPtr, callback); + } + public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeBarrierClosePeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBarrierClosePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBarrierClosePeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierClosePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBarrierPositionAttribute( + IntegerAttributeCallback callback + ) { + readBarrierPositionAttribute(chipClusterPtr, callback); + } + public void subscribeBarrierPositionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBarrierPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readBarrierMovingStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBarrierMovingStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierSafetyStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBarrierSafetyStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierCapabilitiesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBarrierCapabilitiesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierOpenEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierOpenEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierCloseEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierCloseEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierCloseEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierCommandOpenEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierCommandOpenEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierCommandOpenEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierCommandCloseEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierCommandCloseEventsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierCommandCloseEventsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierOpenPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierOpenPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierOpenPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierClosePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBarrierClosePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBarrierClosePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBarrierPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBarrierPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class PumpConfigurationAndControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000200L; + + public PumpConfigurationAndControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MaxPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxFlowAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinConstPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxConstPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinCompPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxCompPressureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinConstSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxConstSpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinConstFlowAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxConstFlowAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinConstTempAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxConstTempAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface CapacityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SpeedAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LifetimeRunningHoursAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PowerAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LifetimeEnergyConsumedAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaxPressureAttribute( + MaxPressureAttributeCallback callback + ) { + readMaxPressureAttribute(chipClusterPtr, callback); + } + public void subscribeMaxPressureAttribute( + MaxPressureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxSpeedAttribute( + MaxSpeedAttributeCallback callback + ) { + readMaxSpeedAttribute(chipClusterPtr, callback); + } + public void subscribeMaxSpeedAttribute( + MaxSpeedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxFlowAttribute( + MaxFlowAttributeCallback callback + ) { + readMaxFlowAttribute(chipClusterPtr, callback); + } + public void subscribeMaxFlowAttribute( + MaxFlowAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinConstPressureAttribute( + MinConstPressureAttributeCallback callback + ) { + readMinConstPressureAttribute(chipClusterPtr, callback); + } + public void subscribeMinConstPressureAttribute( + MinConstPressureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxConstPressureAttribute( + MaxConstPressureAttributeCallback callback + ) { + readMaxConstPressureAttribute(chipClusterPtr, callback); + } + public void subscribeMaxConstPressureAttribute( + MaxConstPressureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxConstPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinCompPressureAttribute( + MinCompPressureAttributeCallback callback + ) { + readMinCompPressureAttribute(chipClusterPtr, callback); + } + public void subscribeMinCompPressureAttribute( + MinCompPressureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxCompPressureAttribute( + MaxCompPressureAttributeCallback callback + ) { + readMaxCompPressureAttribute(chipClusterPtr, callback); + } + public void subscribeMaxCompPressureAttribute( + MaxCompPressureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxCompPressureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinConstSpeedAttribute( + MinConstSpeedAttributeCallback callback + ) { + readMinConstSpeedAttribute(chipClusterPtr, callback); + } + public void subscribeMinConstSpeedAttribute( + MinConstSpeedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxConstSpeedAttribute( + MaxConstSpeedAttributeCallback callback + ) { + readMaxConstSpeedAttribute(chipClusterPtr, callback); + } + public void subscribeMaxConstSpeedAttribute( + MaxConstSpeedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxConstSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinConstFlowAttribute( + MinConstFlowAttributeCallback callback + ) { + readMinConstFlowAttribute(chipClusterPtr, callback); + } + public void subscribeMinConstFlowAttribute( + MinConstFlowAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxConstFlowAttribute( + MaxConstFlowAttributeCallback callback + ) { + readMaxConstFlowAttribute(chipClusterPtr, callback); + } + public void subscribeMaxConstFlowAttribute( + MaxConstFlowAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxConstFlowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinConstTempAttribute( + MinConstTempAttributeCallback callback + ) { + readMinConstTempAttribute(chipClusterPtr, callback); + } + public void subscribeMinConstTempAttribute( + MinConstTempAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxConstTempAttribute( + MaxConstTempAttributeCallback callback + ) { + readMaxConstTempAttribute(chipClusterPtr, callback); + } + public void subscribeMaxConstTempAttribute( + MaxConstTempAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxConstTempAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPumpStatusAttribute( + IntegerAttributeCallback callback + ) { + readPumpStatusAttribute(chipClusterPtr, callback); + } + public void subscribePumpStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePumpStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEffectiveOperationModeAttribute( + IntegerAttributeCallback callback + ) { + readEffectiveOperationModeAttribute(chipClusterPtr, callback); + } + public void subscribeEffectiveOperationModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEffectiveOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEffectiveControlModeAttribute( + IntegerAttributeCallback callback + ) { + readEffectiveControlModeAttribute(chipClusterPtr, callback); + } + public void subscribeEffectiveControlModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEffectiveControlModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCapacityAttribute( + CapacityAttributeCallback callback + ) { + readCapacityAttribute(chipClusterPtr, callback); + } + public void subscribeCapacityAttribute( + CapacityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpeedAttribute( + SpeedAttributeCallback callback + ) { + readSpeedAttribute(chipClusterPtr, callback); + } + public void subscribeSpeedAttribute( + SpeedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLifetimeRunningHoursAttribute( + LifetimeRunningHoursAttributeCallback callback + ) { + readLifetimeRunningHoursAttribute(chipClusterPtr, callback); + } + public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value) { + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeRunningHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLifetimeRunningHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLifetimeRunningHoursAttribute( + LifetimeRunningHoursAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLifetimeRunningHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerAttribute( + PowerAttributeCallback callback + ) { + readPowerAttribute(chipClusterPtr, callback); + } + public void subscribePowerAttribute( + PowerAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLifetimeEnergyConsumedAttribute( + LifetimeEnergyConsumedAttributeCallback callback + ) { + readLifetimeEnergyConsumedAttribute(chipClusterPtr, callback); + } + public void writeLifetimeEnergyConsumedAttribute(DefaultClusterCallback callback, Long value) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLifetimeEnergyConsumedAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLifetimeEnergyConsumedAttribute( + LifetimeEnergyConsumedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLifetimeEnergyConsumedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOperationModeAttribute( + IntegerAttributeCallback callback + ) { + readOperationModeAttribute(chipClusterPtr, callback); + } + public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value) { + writeOperationModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOperationModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOperationModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readControlModeAttribute( + IntegerAttributeCallback callback + ) { + readControlModeAttribute(chipClusterPtr, callback); + } + public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value) { + writeControlModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeControlModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeControlModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaxPressureAttribute(long chipClusterPtr, + MaxPressureAttributeCallback callback + ); + private native void subscribeMaxPressureAttribute(long chipClusterPtr, + MaxPressureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxSpeedAttribute(long chipClusterPtr, + MaxSpeedAttributeCallback callback + ); + private native void subscribeMaxSpeedAttribute(long chipClusterPtr, + MaxSpeedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxFlowAttribute(long chipClusterPtr, + MaxFlowAttributeCallback callback + ); + private native void subscribeMaxFlowAttribute(long chipClusterPtr, + MaxFlowAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinConstPressureAttribute(long chipClusterPtr, + MinConstPressureAttributeCallback callback + ); + private native void subscribeMinConstPressureAttribute(long chipClusterPtr, + MinConstPressureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxConstPressureAttribute(long chipClusterPtr, + MaxConstPressureAttributeCallback callback + ); + private native void subscribeMaxConstPressureAttribute(long chipClusterPtr, + MaxConstPressureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinCompPressureAttribute(long chipClusterPtr, + MinCompPressureAttributeCallback callback + ); + private native void subscribeMinCompPressureAttribute(long chipClusterPtr, + MinCompPressureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxCompPressureAttribute(long chipClusterPtr, + MaxCompPressureAttributeCallback callback + ); + private native void subscribeMaxCompPressureAttribute(long chipClusterPtr, + MaxCompPressureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinConstSpeedAttribute(long chipClusterPtr, + MinConstSpeedAttributeCallback callback + ); + private native void subscribeMinConstSpeedAttribute(long chipClusterPtr, + MinConstSpeedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxConstSpeedAttribute(long chipClusterPtr, + MaxConstSpeedAttributeCallback callback + ); + private native void subscribeMaxConstSpeedAttribute(long chipClusterPtr, + MaxConstSpeedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinConstFlowAttribute(long chipClusterPtr, + MinConstFlowAttributeCallback callback + ); + private native void subscribeMinConstFlowAttribute(long chipClusterPtr, + MinConstFlowAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxConstFlowAttribute(long chipClusterPtr, + MaxConstFlowAttributeCallback callback + ); + private native void subscribeMaxConstFlowAttribute(long chipClusterPtr, + MaxConstFlowAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinConstTempAttribute(long chipClusterPtr, + MinConstTempAttributeCallback callback + ); + private native void subscribeMinConstTempAttribute(long chipClusterPtr, + MinConstTempAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxConstTempAttribute(long chipClusterPtr, + MaxConstTempAttributeCallback callback + ); + private native void subscribeMaxConstTempAttribute(long chipClusterPtr, + MaxConstTempAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPumpStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePumpStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEffectiveOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEffectiveOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEffectiveControlModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEffectiveControlModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCapacityAttribute(long chipClusterPtr, + CapacityAttributeCallback callback + ); + private native void subscribeCapacityAttribute(long chipClusterPtr, + CapacityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSpeedAttribute(long chipClusterPtr, + SpeedAttributeCallback callback + ); + private native void subscribeSpeedAttribute(long chipClusterPtr, + SpeedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLifetimeRunningHoursAttribute(long chipClusterPtr, + LifetimeRunningHoursAttributeCallback callback + ); + + private native void writeLifetimeRunningHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLifetimeRunningHoursAttribute(long chipClusterPtr, + LifetimeRunningHoursAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPowerAttribute(long chipClusterPtr, + PowerAttributeCallback callback + ); + private native void subscribePowerAttribute(long chipClusterPtr, + PowerAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLifetimeEnergyConsumedAttribute(long chipClusterPtr, + LifetimeEnergyConsumedAttributeCallback callback + ); + + private native void writeLifetimeEnergyConsumedAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLifetimeEnergyConsumedAttribute(long chipClusterPtr, + LifetimeEnergyConsumedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOperationModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readControlModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeControlModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeControlModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ThermostatCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000201L; + + public ThermostatCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void setpointRaiseLower(DefaultClusterCallback callback + , Integer mode, Integer amount) { + setpointRaiseLower(chipClusterPtr, callback, mode, amount, null); + } + + public void setpointRaiseLower(DefaultClusterCallback callback + , Integer mode, Integer amount + , int timedInvokeTimeoutMs) { + setpointRaiseLower(chipClusterPtr, callback, mode, amount, timedInvokeTimeoutMs); + } + + public void setWeeklySchedule(DefaultClusterCallback callback + , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + setWeeklySchedule(chipClusterPtr, callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, null); + } + + public void setWeeklySchedule(DefaultClusterCallback callback + , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions + , int timedInvokeTimeoutMs) { + setWeeklySchedule(chipClusterPtr, callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, timedInvokeTimeoutMs); + } + + public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback + , Integer daysToReturn, Integer modeToReturn) { + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, null); + } + + public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback + , Integer daysToReturn, Integer modeToReturn + , int timedInvokeTimeoutMs) { + getWeeklySchedule(chipClusterPtr, callback, daysToReturn, modeToReturn, timedInvokeTimeoutMs); + } + + public void clearWeeklySchedule(DefaultClusterCallback callback + ) { + clearWeeklySchedule(chipClusterPtr, callback, null); + } + + public void clearWeeklySchedule(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + clearWeeklySchedule(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void setpointRaiseLower(long chipClusterPtr, DefaultClusterCallback Callback + , Integer mode, Integer amount + , @Nullable Integer timedInvokeTimeoutMs); + private native void setWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback + , Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions + , @Nullable Integer timedInvokeTimeoutMs); + private native void getWeeklySchedule(long chipClusterPtr, GetWeeklyScheduleResponseCallback Callback + , Integer daysToReturn, Integer modeToReturn + , @Nullable Integer timedInvokeTimeoutMs); + private native void clearWeeklySchedule(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface GetWeeklyScheduleResponseCallback { + void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); + + void onError(Exception error); + } + + + public interface LocalTemperatureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OutdoorTemperatureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface TemperatureSetpointHoldDurationAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SetpointChangeAmountAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OccupiedSetbackAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OccupiedSetbackMinAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface OccupiedSetbackMaxAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface UnoccupiedSetbackAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface UnoccupiedSetbackMinAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface UnoccupiedSetbackMaxAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ACCoilTemperatureAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readLocalTemperatureAttribute( + LocalTemperatureAttributeCallback callback + ) { + readLocalTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeLocalTemperatureAttribute( + LocalTemperatureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLocalTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOutdoorTemperatureAttribute( + OutdoorTemperatureAttributeCallback callback + ) { + readOutdoorTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeOutdoorTemperatureAttribute( + OutdoorTemperatureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOutdoorTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupancyAttribute( + IntegerAttributeCallback callback + ) { + readOccupancyAttribute(chipClusterPtr, callback); + } + public void subscribeOccupancyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupancyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAbsMinHeatSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readAbsMinHeatSetpointLimitAttribute(chipClusterPtr, callback); + } + public void subscribeAbsMinHeatSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAbsMinHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAbsMaxHeatSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readAbsMaxHeatSetpointLimitAttribute(chipClusterPtr, callback); + } + public void subscribeAbsMaxHeatSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAbsMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAbsMinCoolSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readAbsMinCoolSetpointLimitAttribute(chipClusterPtr, callback); + } + public void subscribeAbsMinCoolSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAbsMinCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAbsMaxCoolSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readAbsMaxCoolSetpointLimitAttribute(chipClusterPtr, callback); + } + public void subscribeAbsMaxCoolSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAbsMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPICoolingDemandAttribute( + IntegerAttributeCallback callback + ) { + readPICoolingDemandAttribute(chipClusterPtr, callback); + } + public void subscribePICoolingDemandAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePICoolingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPIHeatingDemandAttribute( + IntegerAttributeCallback callback + ) { + readPIHeatingDemandAttribute(chipClusterPtr, callback); + } + public void subscribePIHeatingDemandAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePIHeatingDemandAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHVACSystemTypeConfigurationAttribute( + IntegerAttributeCallback callback + ) { + readHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback); + } + public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value) { + writeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeHVACSystemTypeConfigurationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHVACSystemTypeConfigurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLocalTemperatureCalibrationAttribute( + IntegerAttributeCallback callback + ) { + readLocalTemperatureCalibrationAttribute(chipClusterPtr, callback); + } + public void writeLocalTemperatureCalibrationAttribute(DefaultClusterCallback callback, Integer value) { + writeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLocalTemperatureCalibrationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLocalTemperatureCalibrationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLocalTemperatureCalibrationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupiedCoolingSetpointAttribute( + IntegerAttributeCallback callback + ) { + readOccupiedCoolingSetpointAttribute(chipClusterPtr, callback); + } + public void writeOccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value) { + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOccupiedCoolingSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupiedCoolingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupiedHeatingSetpointAttribute( + IntegerAttributeCallback callback + ) { + readOccupiedHeatingSetpointAttribute(chipClusterPtr, callback); + } + public void writeOccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value) { + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOccupiedHeatingSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupiedHeatingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedCoolingSetpointAttribute( + IntegerAttributeCallback callback + ) { + readUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback); + } + public void writeUnoccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value) { + writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedCoolingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUnoccupiedCoolingSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUnoccupiedCoolingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedHeatingSetpointAttribute( + IntegerAttributeCallback callback + ) { + readUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback); + } + public void writeUnoccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value) { + writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedHeatingSetpointAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUnoccupiedHeatingSetpointAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUnoccupiedHeatingSetpointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinHeatSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readMinHeatSetpointLimitAttribute(chipClusterPtr, callback); + } + public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMinHeatSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxHeatSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readMaxHeatSetpointLimitAttribute(chipClusterPtr, callback); + } + public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxHeatSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMaxHeatSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxHeatSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinCoolSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readMinCoolSetpointLimitAttribute(chipClusterPtr, callback); + } + public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMinCoolSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxCoolSetpointLimitAttribute( + IntegerAttributeCallback callback + ) { + readMaxCoolSetpointLimitAttribute(chipClusterPtr, callback); + } + public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value) { + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxCoolSetpointLimitAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMaxCoolSetpointLimitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxCoolSetpointLimitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinSetpointDeadBandAttribute( + IntegerAttributeCallback callback + ) { + readMinSetpointDeadBandAttribute(chipClusterPtr, callback); + } + public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value) { + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinSetpointDeadBandAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinSetpointDeadBandAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMinSetpointDeadBandAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinSetpointDeadBandAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRemoteSensingAttribute( + IntegerAttributeCallback callback + ) { + readRemoteSensingAttribute(chipClusterPtr, callback); + } + public void writeRemoteSensingAttribute(DefaultClusterCallback callback, Integer value) { + writeRemoteSensingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRemoteSensingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRemoteSensingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRemoteSensingAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRemoteSensingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readControlSequenceOfOperationAttribute( + IntegerAttributeCallback callback + ) { + readControlSequenceOfOperationAttribute(chipClusterPtr, callback); + } + public void writeControlSequenceOfOperationAttribute(DefaultClusterCallback callback, Integer value) { + writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeControlSequenceOfOperationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeControlSequenceOfOperationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeControlSequenceOfOperationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeControlSequenceOfOperationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSystemModeAttribute( + IntegerAttributeCallback callback + ) { + readSystemModeAttribute(chipClusterPtr, callback); + } + public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value) { + writeSystemModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSystemModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSystemModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSystemModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSystemModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readThermostatRunningModeAttribute( + IntegerAttributeCallback callback + ) { + readThermostatRunningModeAttribute(chipClusterPtr, callback); + } + public void subscribeThermostatRunningModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeThermostatRunningModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartOfWeekAttribute( + IntegerAttributeCallback callback + ) { + readStartOfWeekAttribute(chipClusterPtr, callback); + } + public void subscribeStartOfWeekAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStartOfWeekAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfWeeklyTransitionsAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfWeeklyTransitionsAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfWeeklyTransitionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfWeeklyTransitionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfDailyTransitionsAttribute( + IntegerAttributeCallback callback + ) { + readNumberOfDailyTransitionsAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfDailyTransitionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNumberOfDailyTransitionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTemperatureSetpointHoldAttribute( + IntegerAttributeCallback callback + ) { + readTemperatureSetpointHoldAttribute(chipClusterPtr, callback); + } + public void writeTemperatureSetpointHoldAttribute(DefaultClusterCallback callback, Integer value) { + writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureSetpointHoldAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeTemperatureSetpointHoldAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTemperatureSetpointHoldAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTemperatureSetpointHoldDurationAttribute( + TemperatureSetpointHoldDurationAttributeCallback callback + ) { + readTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback); + } + public void writeTemperatureSetpointHoldDurationAttribute(DefaultClusterCallback callback, Integer value) { + writeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureSetpointHoldDurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeTemperatureSetpointHoldDurationAttribute( + TemperatureSetpointHoldDurationAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTemperatureSetpointHoldDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readThermostatProgrammingOperationModeAttribute( + IntegerAttributeCallback callback + ) { + readThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback); + } + public void writeThermostatProgrammingOperationModeAttribute(DefaultClusterCallback callback, Integer value) { + writeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeThermostatProgrammingOperationModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeThermostatProgrammingOperationModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeThermostatProgrammingOperationModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readThermostatRunningStateAttribute( + IntegerAttributeCallback callback + ) { + readThermostatRunningStateAttribute(chipClusterPtr, callback); + } + public void subscribeThermostatRunningStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeThermostatRunningStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSetpointChangeSourceAttribute( + IntegerAttributeCallback callback + ) { + readSetpointChangeSourceAttribute(chipClusterPtr, callback); + } + public void subscribeSetpointChangeSourceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSetpointChangeSourceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSetpointChangeAmountAttribute( + SetpointChangeAmountAttributeCallback callback + ) { + readSetpointChangeAmountAttribute(chipClusterPtr, callback); + } + public void subscribeSetpointChangeAmountAttribute( + SetpointChangeAmountAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSetpointChangeAmountAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSetpointChangeSourceTimestampAttribute( + LongAttributeCallback callback + ) { + readSetpointChangeSourceTimestampAttribute(chipClusterPtr, callback); + } + public void subscribeSetpointChangeSourceTimestampAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSetpointChangeSourceTimestampAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupiedSetbackAttribute( + OccupiedSetbackAttributeCallback callback + ) { + readOccupiedSetbackAttribute(chipClusterPtr, callback); + } + public void writeOccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { + writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOccupiedSetbackAttribute( + OccupiedSetbackAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupiedSetbackMinAttribute( + OccupiedSetbackMinAttributeCallback callback + ) { + readOccupiedSetbackMinAttribute(chipClusterPtr, callback); + } + public void subscribeOccupiedSetbackMinAttribute( + OccupiedSetbackMinAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupiedSetbackMaxAttribute( + OccupiedSetbackMaxAttributeCallback callback + ) { + readOccupiedSetbackMaxAttribute(chipClusterPtr, callback); + } + public void subscribeOccupiedSetbackMaxAttribute( + OccupiedSetbackMaxAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackAttribute( + UnoccupiedSetbackAttributeCallback callback + ) { + readUnoccupiedSetbackAttribute(chipClusterPtr, callback); + } + public void writeUnoccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value) { + writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnoccupiedSetbackAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUnoccupiedSetbackAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUnoccupiedSetbackAttribute( + UnoccupiedSetbackAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackMinAttribute( + UnoccupiedSetbackMinAttributeCallback callback + ) { + readUnoccupiedSetbackMinAttribute(chipClusterPtr, callback); + } + public void subscribeUnoccupiedSetbackMinAttribute( + UnoccupiedSetbackMinAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnoccupiedSetbackMaxAttribute( + UnoccupiedSetbackMaxAttributeCallback callback + ) { + readUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback); + } + public void subscribeUnoccupiedSetbackMaxAttribute( + UnoccupiedSetbackMaxAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeUnoccupiedSetbackMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEmergencyHeatDeltaAttribute( + IntegerAttributeCallback callback + ) { + readEmergencyHeatDeltaAttribute(chipClusterPtr, callback); + } + public void writeEmergencyHeatDeltaAttribute(DefaultClusterCallback callback, Integer value) { + writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEmergencyHeatDeltaAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEmergencyHeatDeltaAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEmergencyHeatDeltaAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACTypeAttribute( + IntegerAttributeCallback callback + ) { + readACTypeAttribute(chipClusterPtr, callback); + } + public void writeACTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCapacityAttribute( + IntegerAttributeCallback callback + ) { + readACCapacityAttribute(chipClusterPtr, callback); + } + public void writeACCapacityAttribute(DefaultClusterCallback callback, Integer value) { + writeACCapacityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCapacityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCapacityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACCapacityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACCapacityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACRefrigerantTypeAttribute( + IntegerAttributeCallback callback + ) { + readACRefrigerantTypeAttribute(chipClusterPtr, callback); + } + public void writeACRefrigerantTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACRefrigerantTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACRefrigerantTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACRefrigerantTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACRefrigerantTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCompressorTypeAttribute( + IntegerAttributeCallback callback + ) { + readACCompressorTypeAttribute(chipClusterPtr, callback); + } + public void writeACCompressorTypeAttribute(DefaultClusterCallback callback, Integer value) { + writeACCompressorTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCompressorTypeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCompressorTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACCompressorTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACCompressorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACErrorCodeAttribute( + LongAttributeCallback callback + ) { + readACErrorCodeAttribute(chipClusterPtr, callback); + } + public void writeACErrorCodeAttribute(DefaultClusterCallback callback, Long value) { + writeACErrorCodeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACErrorCodeAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeACErrorCodeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACErrorCodeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACErrorCodeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACLouverPositionAttribute( + IntegerAttributeCallback callback + ) { + readACLouverPositionAttribute(chipClusterPtr, callback); + } + public void writeACLouverPositionAttribute(DefaultClusterCallback callback, Integer value) { + writeACLouverPositionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACLouverPositionAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACLouverPositionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACLouverPositionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACLouverPositionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCoilTemperatureAttribute( + ACCoilTemperatureAttributeCallback callback + ) { + readACCoilTemperatureAttribute(chipClusterPtr, callback); + } + public void subscribeACCoilTemperatureAttribute( + ACCoilTemperatureAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeACCoilTemperatureAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readACCapacityformatAttribute( + IntegerAttributeCallback callback + ) { + readACCapacityformatAttribute(chipClusterPtr, callback); + } + public void writeACCapacityformatAttribute(DefaultClusterCallback callback, Integer value) { + writeACCapacityformatAttribute(chipClusterPtr, callback, value, null); + } + + public void writeACCapacityformatAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeACCapacityformatAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeACCapacityformatAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeACCapacityformatAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readLocalTemperatureAttribute(long chipClusterPtr, + LocalTemperatureAttributeCallback callback + ); + private native void subscribeLocalTemperatureAttribute(long chipClusterPtr, + LocalTemperatureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOutdoorTemperatureAttribute(long chipClusterPtr, + OutdoorTemperatureAttributeCallback callback + ); + private native void subscribeOutdoorTemperatureAttribute(long chipClusterPtr, + OutdoorTemperatureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOccupancyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOccupancyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAbsMinHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAbsMinHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAbsMaxHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAbsMaxHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAbsMinCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAbsMinCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAbsMaxCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAbsMaxCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPICoolingDemandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePICoolingDemandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPIHeatingDemandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePIHeatingDemandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHVACSystemTypeConfigurationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeHVACSystemTypeConfigurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeHVACSystemTypeConfigurationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLocalTemperatureCalibrationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeLocalTemperatureCalibrationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLocalTemperatureCalibrationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOccupiedCoolingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOccupiedCoolingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOccupiedCoolingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOccupiedHeatingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOccupiedHeatingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOccupiedHeatingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUnoccupiedCoolingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUnoccupiedHeatingSetpointAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMinHeatSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMinHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMaxHeatSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMaxHeatSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMinCoolSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMinCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMaxCoolSetpointLimitAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMaxCoolSetpointLimitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinSetpointDeadBandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMinSetpointDeadBandAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMinSetpointDeadBandAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRemoteSensingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRemoteSensingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRemoteSensingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readControlSequenceOfOperationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeControlSequenceOfOperationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeControlSequenceOfOperationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSystemModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeSystemModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSystemModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readThermostatRunningModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeThermostatRunningModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartOfWeekAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStartOfWeekAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfWeeklyTransitionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfWeeklyTransitionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfDailyTransitionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNumberOfDailyTransitionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTemperatureSetpointHoldAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeTemperatureSetpointHoldAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTemperatureSetpointHoldAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, + TemperatureSetpointHoldDurationAttributeCallback callback + ); + + private native void writeTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTemperatureSetpointHoldDurationAttribute(long chipClusterPtr, + TemperatureSetpointHoldDurationAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readThermostatProgrammingOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeThermostatProgrammingOperationModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeThermostatProgrammingOperationModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readThermostatRunningStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeThermostatRunningStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSetpointChangeSourceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSetpointChangeSourceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSetpointChangeAmountAttribute(long chipClusterPtr, + SetpointChangeAmountAttributeCallback callback + ); + private native void subscribeSetpointChangeAmountAttribute(long chipClusterPtr, + SetpointChangeAmountAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSetpointChangeSourceTimestampAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSetpointChangeSourceTimestampAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOccupiedSetbackAttribute(long chipClusterPtr, + OccupiedSetbackAttributeCallback callback + ); + + private native void writeOccupiedSetbackAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOccupiedSetbackAttribute(long chipClusterPtr, + OccupiedSetbackAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOccupiedSetbackMinAttribute(long chipClusterPtr, + OccupiedSetbackMinAttributeCallback callback + ); + private native void subscribeOccupiedSetbackMinAttribute(long chipClusterPtr, + OccupiedSetbackMinAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readOccupiedSetbackMaxAttribute(long chipClusterPtr, + OccupiedSetbackMaxAttributeCallback callback + ); + private native void subscribeOccupiedSetbackMaxAttribute(long chipClusterPtr, + OccupiedSetbackMaxAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readUnoccupiedSetbackAttribute(long chipClusterPtr, + UnoccupiedSetbackAttributeCallback callback + ); + + private native void writeUnoccupiedSetbackAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUnoccupiedSetbackAttribute(long chipClusterPtr, + UnoccupiedSetbackAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readUnoccupiedSetbackMinAttribute(long chipClusterPtr, + UnoccupiedSetbackMinAttributeCallback callback + ); + private native void subscribeUnoccupiedSetbackMinAttribute(long chipClusterPtr, + UnoccupiedSetbackMinAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readUnoccupiedSetbackMaxAttribute(long chipClusterPtr, + UnoccupiedSetbackMaxAttributeCallback callback + ); + private native void subscribeUnoccupiedSetbackMaxAttribute(long chipClusterPtr, + UnoccupiedSetbackMaxAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEmergencyHeatDeltaAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeEmergencyHeatDeltaAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEmergencyHeatDeltaAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACCapacityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACCapacityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACCapacityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACRefrigerantTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACRefrigerantTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACRefrigerantTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACCompressorTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACCompressorTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACCompressorTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACErrorCodeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeACErrorCodeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACErrorCodeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACLouverPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACLouverPositionAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACLouverPositionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readACCoilTemperatureAttribute(long chipClusterPtr, + ACCoilTemperatureAttributeCallback callback + ); + private native void subscribeACCoilTemperatureAttribute(long chipClusterPtr, + ACCoilTemperatureAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readACCapacityformatAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeACCapacityformatAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeACCapacityformatAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class FanControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000202L; + + public FanControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void step(DefaultClusterCallback callback + , Integer direction, Optional wrap, Optional lowestOff) { + step(chipClusterPtr, callback, direction, wrap, lowestOff, null); + } + + public void step(DefaultClusterCallback callback + , Integer direction, Optional wrap, Optional lowestOff + , int timedInvokeTimeoutMs) { + step(chipClusterPtr, callback, direction, wrap, lowestOff, timedInvokeTimeoutMs); + } + private native void step(long chipClusterPtr, DefaultClusterCallback Callback + , Integer direction, Optional wrap, Optional lowestOff + , @Nullable Integer timedInvokeTimeoutMs); + + public interface PercentSettingAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SpeedSettingAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readFanModeAttribute( + IntegerAttributeCallback callback + ) { + readFanModeAttribute(chipClusterPtr, callback); + } + public void writeFanModeAttribute(DefaultClusterCallback callback, Integer value) { + writeFanModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFanModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeFanModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeFanModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFanModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFanModeSequenceAttribute( + IntegerAttributeCallback callback + ) { + readFanModeSequenceAttribute(chipClusterPtr, callback); + } + public void writeFanModeSequenceAttribute(DefaultClusterCallback callback, Integer value) { + writeFanModeSequenceAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFanModeSequenceAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeFanModeSequenceAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeFanModeSequenceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFanModeSequenceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPercentSettingAttribute( + PercentSettingAttributeCallback callback + ) { + readPercentSettingAttribute(chipClusterPtr, callback); + } + public void writePercentSettingAttribute(DefaultClusterCallback callback, Integer value) { + writePercentSettingAttribute(chipClusterPtr, callback, value, null); + } + + public void writePercentSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePercentSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePercentSettingAttribute( + PercentSettingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePercentSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPercentCurrentAttribute( + IntegerAttributeCallback callback + ) { + readPercentCurrentAttribute(chipClusterPtr, callback); + } + public void subscribePercentCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePercentCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpeedMaxAttribute( + IntegerAttributeCallback callback + ) { + readSpeedMaxAttribute(chipClusterPtr, callback); + } + public void subscribeSpeedMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSpeedMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpeedSettingAttribute( + SpeedSettingAttributeCallback callback + ) { + readSpeedSettingAttribute(chipClusterPtr, callback); + } + public void writeSpeedSettingAttribute(DefaultClusterCallback callback, Integer value) { + writeSpeedSettingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSpeedSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeSpeedSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSpeedSettingAttribute( + SpeedSettingAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSpeedSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSpeedCurrentAttribute( + IntegerAttributeCallback callback + ) { + readSpeedCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeSpeedCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSpeedCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRockSupportAttribute( + IntegerAttributeCallback callback + ) { + readRockSupportAttribute(chipClusterPtr, callback); + } + public void subscribeRockSupportAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRockSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRockSettingAttribute( + IntegerAttributeCallback callback + ) { + readRockSettingAttribute(chipClusterPtr, callback); + } + public void writeRockSettingAttribute(DefaultClusterCallback callback, Integer value) { + writeRockSettingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRockSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRockSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRockSettingAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRockSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWindSupportAttribute( + IntegerAttributeCallback callback + ) { + readWindSupportAttribute(chipClusterPtr, callback); + } + public void subscribeWindSupportAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWindSupportAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWindSettingAttribute( + IntegerAttributeCallback callback + ) { + readWindSettingAttribute(chipClusterPtr, callback); + } + public void writeWindSettingAttribute(DefaultClusterCallback callback, Integer value) { + writeWindSettingAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWindSettingAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWindSettingAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeWindSettingAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWindSettingAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAirflowDirectionAttribute( + IntegerAttributeCallback callback + ) { + readAirflowDirectionAttribute(chipClusterPtr, callback); + } + public void writeAirflowDirectionAttribute(DefaultClusterCallback callback, Integer value) { + writeAirflowDirectionAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAirflowDirectionAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeAirflowDirectionAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAirflowDirectionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAirflowDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readFanModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeFanModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeFanModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readFanModeSequenceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeFanModeSequenceAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeFanModeSequenceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPercentSettingAttribute(long chipClusterPtr, + PercentSettingAttributeCallback callback + ); + + private native void writePercentSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePercentSettingAttribute(long chipClusterPtr, + PercentSettingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPercentCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePercentCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSpeedMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSpeedMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSpeedSettingAttribute(long chipClusterPtr, + SpeedSettingAttributeCallback callback + ); + + private native void writeSpeedSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSpeedSettingAttribute(long chipClusterPtr, + SpeedSettingAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSpeedCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeSpeedCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRockSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRockSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRockSettingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRockSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRockSettingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWindSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeWindSupportAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWindSettingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeWindSettingAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeWindSettingAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAirflowDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeAirflowDirectionAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAirflowDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ThermostatUserInterfaceConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000204L; + + public ThermostatUserInterfaceConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTemperatureDisplayModeAttribute( + IntegerAttributeCallback callback + ) { + readTemperatureDisplayModeAttribute(chipClusterPtr, callback); + } + public void writeTemperatureDisplayModeAttribute(DefaultClusterCallback callback, Integer value) { + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeTemperatureDisplayModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeTemperatureDisplayModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeTemperatureDisplayModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTemperatureDisplayModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readKeypadLockoutAttribute( + IntegerAttributeCallback callback + ) { + readKeypadLockoutAttribute(chipClusterPtr, callback); + } + public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value) { + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, null); + } + + public void writeKeypadLockoutAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeKeypadLockoutAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeKeypadLockoutAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeKeypadLockoutAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScheduleProgrammingVisibilityAttribute( + IntegerAttributeCallback callback + ) { + readScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback); + } + public void writeScheduleProgrammingVisibilityAttribute(DefaultClusterCallback callback, Integer value) { + writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeScheduleProgrammingVisibilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeScheduleProgrammingVisibilityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeScheduleProgrammingVisibilityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTemperatureDisplayModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeTemperatureDisplayModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTemperatureDisplayModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readKeypadLockoutAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeKeypadLockoutAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeKeypadLockoutAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readScheduleProgrammingVisibilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeScheduleProgrammingVisibilityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeScheduleProgrammingVisibilityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ColorControlCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000300L; + + public ColorControlCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void moveToHue(DefaultClusterCallback callback + , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToHue(chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToHue(DefaultClusterCallback callback + , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToHue(chipClusterPtr, callback, hue, direction, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveHue(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { + moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveHue(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stepHue(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + stepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); + } + + public void stepHue(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToSaturation(DefaultClusterCallback callback + , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToSaturation(chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToSaturation(DefaultClusterCallback callback + , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToSaturation(chipClusterPtr, callback, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveSaturation(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { + moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void moveSaturation(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveSaturation(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stepSaturation(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + stepSaturation(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); + } + + public void stepSaturation(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stepSaturation(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToHueAndSaturation(DefaultClusterCallback callback + , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToHueAndSaturation(chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToHueAndSaturation(DefaultClusterCallback callback + , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToHueAndSaturation(chipClusterPtr, callback, hue, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToColor(DefaultClusterCallback callback + , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToColor(chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToColor(DefaultClusterCallback callback + , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToColor(chipClusterPtr, callback, colorX, colorY, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveColor(DefaultClusterCallback callback + , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride) { + moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, null); + } + + public void moveColor(DefaultClusterCallback callback + , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveColor(chipClusterPtr, callback, rateX, rateY, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stepColor(DefaultClusterCallback callback + , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + stepColor(chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride, null); + } + + public void stepColor(DefaultClusterCallback callback + , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stepColor(chipClusterPtr, callback, stepX, stepY, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveToColorTemperature(DefaultClusterCallback callback + , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + moveToColorTemperature(chipClusterPtr, callback, colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, null); + } + + public void moveToColorTemperature(DefaultClusterCallback callback + , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveToColorTemperature(chipClusterPtr, callback, colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void enhancedMoveToHue(DefaultClusterCallback callback + , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + enhancedMoveToHue(chipClusterPtr, callback, enhancedHue, direction, transitionTime, optionsMask, optionsOverride, null); + } + + public void enhancedMoveToHue(DefaultClusterCallback callback + , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + enhancedMoveToHue(chipClusterPtr, callback, enhancedHue, direction, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void enhancedMoveHue(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride) { + enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, null); + } + + public void enhancedMoveHue(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + enhancedMoveHue(chipClusterPtr, callback, moveMode, rate, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void enhancedStepHue(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + enhancedStepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, null); + } + + public void enhancedStepHue(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + enhancedStepHue(chipClusterPtr, callback, stepMode, stepSize, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void enhancedMoveToHueAndSaturation(DefaultClusterCallback callback + , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { + enhancedMoveToHueAndSaturation(chipClusterPtr, callback, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride, null); + } + + public void enhancedMoveToHueAndSaturation(DefaultClusterCallback callback + , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + enhancedMoveToHueAndSaturation(chipClusterPtr, callback, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void colorLoopSet(DefaultClusterCallback callback + , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride) { + colorLoopSet(chipClusterPtr, callback, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride, null); + } + + public void colorLoopSet(DefaultClusterCallback callback + , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + colorLoopSet(chipClusterPtr, callback, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stopMoveStep(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride) { + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, null); + } + + public void stopMoveStep(DefaultClusterCallback callback + , Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stopMoveStep(chipClusterPtr, callback, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void moveColorTemperature(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride) { + moveColorTemperature(chipClusterPtr, callback, moveMode, rate, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, null); + } + + public void moveColorTemperature(DefaultClusterCallback callback + , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + moveColorTemperature(chipClusterPtr, callback, moveMode, rate, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + + public void stepColorTemperature(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride) { + stepColorTemperature(chipClusterPtr, callback, stepMode, stepSize, transitionTime, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, null); + } + + public void stepColorTemperature(DefaultClusterCallback callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride + , int timedInvokeTimeoutMs) { + stepColorTemperature(chipClusterPtr, callback, stepMode, stepSize, transitionTime, colorTemperatureMinimumMireds, colorTemperatureMaximumMireds, optionsMask, optionsOverride, timedInvokeTimeoutMs); + } + private native void moveToHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer hue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stepHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToSaturation(long chipClusterPtr, DefaultClusterCallback Callback + , Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveSaturation(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stepSaturation(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToHueAndSaturation(long chipClusterPtr, DefaultClusterCallback Callback + , Integer hue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToColor(long chipClusterPtr, DefaultClusterCallback Callback + , Integer colorX, Integer colorY, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveColor(long chipClusterPtr, DefaultClusterCallback Callback + , Integer rateX, Integer rateY, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stepColor(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepX, Integer stepY, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveToColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback + , Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedMoveToHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer enhancedHue, Integer direction, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedMoveHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, Integer rate, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedStepHue(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void enhancedMoveToHueAndSaturation(long chipClusterPtr, DefaultClusterCallback Callback + , Integer enhancedHue, Integer saturation, Integer transitionTime, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void colorLoopSet(long chipClusterPtr, DefaultClusterCallback Callback + , Integer updateFlags, Integer action, Integer direction, Integer time, Integer startHue, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stopMoveStep(long chipClusterPtr, DefaultClusterCallback Callback + , Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void moveColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback + , Integer moveMode, Integer rate, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + private native void stepColorTemperature(long chipClusterPtr, DefaultClusterCallback Callback + , Integer stepMode, Integer stepSize, Integer transitionTime, Integer colorTemperatureMinimumMireds, Integer colorTemperatureMaximumMireds, Integer optionsMask, Integer optionsOverride + , @Nullable Integer timedInvokeTimeoutMs); + + public interface NumberOfPrimariesAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary1IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary2IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary3IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary4IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary5IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface Primary6IntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ColorPointRIntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ColorPointGIntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ColorPointBIntensityAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface StartUpColorTemperatureMiredsAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readCurrentHueAttribute( + IntegerAttributeCallback callback + ) { + readCurrentHueAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentHueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentSaturationAttribute( + IntegerAttributeCallback callback + ) { + readCurrentSaturationAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentSaturationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentSaturationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRemainingTimeAttribute( + IntegerAttributeCallback callback + ) { + readRemainingTimeAttribute(chipClusterPtr, callback); + } + public void subscribeRemainingTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRemainingTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentXAttribute( + IntegerAttributeCallback callback + ) { + readCurrentXAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentXAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentXAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentYAttribute( + IntegerAttributeCallback callback + ) { + readCurrentYAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentYAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentYAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDriftCompensationAttribute( + IntegerAttributeCallback callback + ) { + readDriftCompensationAttribute(chipClusterPtr, callback); + } + public void subscribeDriftCompensationAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDriftCompensationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCompensationTextAttribute( + CharStringAttributeCallback callback + ) { + readCompensationTextAttribute(chipClusterPtr, callback); + } + public void subscribeCompensationTextAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCompensationTextAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorTemperatureMiredsAttribute( + IntegerAttributeCallback callback + ) { + readColorTemperatureMiredsAttribute(chipClusterPtr, callback); + } + public void subscribeColorTemperatureMiredsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorTemperatureMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorModeAttribute( + IntegerAttributeCallback callback + ) { + readColorModeAttribute(chipClusterPtr, callback); + } + public void subscribeColorModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOptionsAttribute( + IntegerAttributeCallback callback + ) { + readOptionsAttribute(chipClusterPtr, callback); + } + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value) { + writeOptionsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOptionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOptionsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOptionsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOptionsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNumberOfPrimariesAttribute( + NumberOfPrimariesAttributeCallback callback + ) { + readNumberOfPrimariesAttribute(chipClusterPtr, callback); + } + public void subscribeNumberOfPrimariesAttribute( + NumberOfPrimariesAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNumberOfPrimariesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary1XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary1XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary1XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary1XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary1YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary1YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary1YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary1YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary1IntensityAttribute( + Primary1IntensityAttributeCallback callback + ) { + readPrimary1IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary1IntensityAttribute( + Primary1IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary1IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary2XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary2XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary2XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary2XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary2YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary2YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary2YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary2YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary2IntensityAttribute( + Primary2IntensityAttributeCallback callback + ) { + readPrimary2IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary2IntensityAttribute( + Primary2IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary2IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary3XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary3XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary3XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary3XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary3YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary3YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary3YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary3YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary3IntensityAttribute( + Primary3IntensityAttributeCallback callback + ) { + readPrimary3IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary3IntensityAttribute( + Primary3IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary3IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary4XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary4XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary4XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary4XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary4YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary4YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary4YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary4YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary4IntensityAttribute( + Primary4IntensityAttributeCallback callback + ) { + readPrimary4IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary4IntensityAttribute( + Primary4IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary4IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary5XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary5XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary5XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary5XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary5YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary5YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary5YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary5YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary5IntensityAttribute( + Primary5IntensityAttributeCallback callback + ) { + readPrimary5IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary5IntensityAttribute( + Primary5IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary5IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary6XAttribute( + IntegerAttributeCallback callback + ) { + readPrimary6XAttribute(chipClusterPtr, callback); + } + public void subscribePrimary6XAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary6XAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary6YAttribute( + IntegerAttributeCallback callback + ) { + readPrimary6YAttribute(chipClusterPtr, callback); + } + public void subscribePrimary6YAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePrimary6YAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPrimary6IntensityAttribute( + Primary6IntensityAttributeCallback callback + ) { + readPrimary6IntensityAttribute(chipClusterPtr, callback); + } + public void subscribePrimary6IntensityAttribute( + Primary6IntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePrimary6IntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWhitePointXAttribute( + IntegerAttributeCallback callback + ) { + readWhitePointXAttribute(chipClusterPtr, callback); + } + public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value) { + writeWhitePointXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeWhitePointXAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWhitePointXAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWhitePointYAttribute( + IntegerAttributeCallback callback + ) { + readWhitePointYAttribute(chipClusterPtr, callback); + } + public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value) { + writeWhitePointYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWhitePointYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWhitePointYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeWhitePointYAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWhitePointYAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointRXAttribute( + IntegerAttributeCallback callback + ) { + readColorPointRXAttribute(chipClusterPtr, callback); + } + public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointRXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointRXAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointRXAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointRYAttribute( + IntegerAttributeCallback callback + ) { + readColorPointRYAttribute(chipClusterPtr, callback); + } + public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointRYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointRYAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointRYAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointRIntensityAttribute( + ColorPointRIntensityAttributeCallback callback + ) { + readColorPointRIntensityAttribute(chipClusterPtr, callback); + } + public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointRIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointRIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointRIntensityAttribute( + ColorPointRIntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeColorPointRIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointGXAttribute( + IntegerAttributeCallback callback + ) { + readColorPointGXAttribute(chipClusterPtr, callback); + } + public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointGXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointGXAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointGXAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointGYAttribute( + IntegerAttributeCallback callback + ) { + readColorPointGYAttribute(chipClusterPtr, callback); + } + public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointGYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointGYAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointGYAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointGIntensityAttribute( + ColorPointGIntensityAttributeCallback callback + ) { + readColorPointGIntensityAttribute(chipClusterPtr, callback); + } + public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointGIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointGIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointGIntensityAttribute( + ColorPointGIntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeColorPointGIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointBXAttribute( + IntegerAttributeCallback callback + ) { + readColorPointBXAttribute(chipClusterPtr, callback); + } + public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointBXAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBXAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBXAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointBXAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointBXAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointBYAttribute( + IntegerAttributeCallback callback + ) { + readColorPointBYAttribute(chipClusterPtr, callback); + } + public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointBYAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBYAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBYAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointBYAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorPointBYAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorPointBIntensityAttribute( + ColorPointBIntensityAttributeCallback callback + ) { + readColorPointBIntensityAttribute(chipClusterPtr, callback); + } + public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value) { + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, null); + } + + public void writeColorPointBIntensityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeColorPointBIntensityAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeColorPointBIntensityAttribute( + ColorPointBIntensityAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeColorPointBIntensityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnhancedCurrentHueAttribute( + IntegerAttributeCallback callback + ) { + readEnhancedCurrentHueAttribute(chipClusterPtr, callback); + } + public void subscribeEnhancedCurrentHueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnhancedCurrentHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnhancedColorModeAttribute( + IntegerAttributeCallback callback + ) { + readEnhancedColorModeAttribute(chipClusterPtr, callback); + } + public void subscribeEnhancedColorModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnhancedColorModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorLoopActiveAttribute( + IntegerAttributeCallback callback + ) { + readColorLoopActiveAttribute(chipClusterPtr, callback); + } + public void subscribeColorLoopActiveAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorLoopActiveAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorLoopDirectionAttribute( + IntegerAttributeCallback callback + ) { + readColorLoopDirectionAttribute(chipClusterPtr, callback); + } + public void subscribeColorLoopDirectionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorLoopDirectionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorLoopTimeAttribute( + IntegerAttributeCallback callback + ) { + readColorLoopTimeAttribute(chipClusterPtr, callback); + } + public void subscribeColorLoopTimeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorLoopTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorLoopStartEnhancedHueAttribute( + IntegerAttributeCallback callback + ) { + readColorLoopStartEnhancedHueAttribute(chipClusterPtr, callback); + } + public void subscribeColorLoopStartEnhancedHueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorLoopStartEnhancedHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorLoopStoredEnhancedHueAttribute( + IntegerAttributeCallback callback + ) { + readColorLoopStoredEnhancedHueAttribute(chipClusterPtr, callback); + } + public void subscribeColorLoopStoredEnhancedHueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorLoopStoredEnhancedHueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorCapabilitiesAttribute( + IntegerAttributeCallback callback + ) { + readColorCapabilitiesAttribute(chipClusterPtr, callback); + } + public void subscribeColorCapabilitiesAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorCapabilitiesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorTempPhysicalMinMiredsAttribute( + IntegerAttributeCallback callback + ) { + readColorTempPhysicalMinMiredsAttribute(chipClusterPtr, callback); + } + public void subscribeColorTempPhysicalMinMiredsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorTempPhysicalMinMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readColorTempPhysicalMaxMiredsAttribute( + IntegerAttributeCallback callback + ) { + readColorTempPhysicalMaxMiredsAttribute(chipClusterPtr, callback); + } + public void subscribeColorTempPhysicalMaxMiredsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeColorTempPhysicalMaxMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCoupleColorTempToLevelMinMiredsAttribute( + IntegerAttributeCallback callback + ) { + readCoupleColorTempToLevelMinMiredsAttribute(chipClusterPtr, callback); + } + public void subscribeCoupleColorTempToLevelMinMiredsAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCoupleColorTempToLevelMinMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartUpColorTemperatureMiredsAttribute( + StartUpColorTemperatureMiredsAttributeCallback callback + ) { + readStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback); + } + public void writeStartUpColorTemperatureMiredsAttribute(DefaultClusterCallback callback, Integer value) { + writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeStartUpColorTemperatureMiredsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeStartUpColorTemperatureMiredsAttribute( + StartUpColorTemperatureMiredsAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartUpColorTemperatureMiredsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readCurrentHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentSaturationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentSaturationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRemainingTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRemainingTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDriftCompensationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDriftCompensationAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCompensationTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeCompensationTextAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorTemperatureMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorTemperatureMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOptionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOptionsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOptionsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNumberOfPrimariesAttribute(long chipClusterPtr, + NumberOfPrimariesAttributeCallback callback + ); + private native void subscribeNumberOfPrimariesAttribute(long chipClusterPtr, + NumberOfPrimariesAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary1XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary1XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary1YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary1YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary1IntensityAttribute(long chipClusterPtr, + Primary1IntensityAttributeCallback callback + ); + private native void subscribePrimary1IntensityAttribute(long chipClusterPtr, + Primary1IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary2XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary2XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary2YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary2YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary2IntensityAttribute(long chipClusterPtr, + Primary2IntensityAttributeCallback callback + ); + private native void subscribePrimary2IntensityAttribute(long chipClusterPtr, + Primary2IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary3XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary3XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary3YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary3YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary3IntensityAttribute(long chipClusterPtr, + Primary3IntensityAttributeCallback callback + ); + private native void subscribePrimary3IntensityAttribute(long chipClusterPtr, + Primary3IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary4XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary4XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary4YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary4YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary4IntensityAttribute(long chipClusterPtr, + Primary4IntensityAttributeCallback callback + ); + private native void subscribePrimary4IntensityAttribute(long chipClusterPtr, + Primary4IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary5XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary5XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary5YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary5YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary5IntensityAttribute(long chipClusterPtr, + Primary5IntensityAttributeCallback callback + ); + private native void subscribePrimary5IntensityAttribute(long chipClusterPtr, + Primary5IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPrimary6XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary6XAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary6YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePrimary6YAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPrimary6IntensityAttribute(long chipClusterPtr, + Primary6IntensityAttributeCallback callback + ); + private native void subscribePrimary6IntensityAttribute(long chipClusterPtr, + Primary6IntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWhitePointXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeWhitePointXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeWhitePointXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readWhitePointYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeWhitePointYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeWhitePointYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointRXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointRXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointRXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointRYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointRYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointRYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointRIntensityAttribute(long chipClusterPtr, + ColorPointRIntensityAttributeCallback callback + ); + + private native void writeColorPointRIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointRIntensityAttribute(long chipClusterPtr, + ColorPointRIntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readColorPointGXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointGXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointGXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointGYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointGYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointGYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointGIntensityAttribute(long chipClusterPtr, + ColorPointGIntensityAttributeCallback callback + ); + + private native void writeColorPointGIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointGIntensityAttribute(long chipClusterPtr, + ColorPointGIntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readColorPointBXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointBXAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointBXAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointBYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeColorPointBYAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointBYAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorPointBIntensityAttribute(long chipClusterPtr, + ColorPointBIntensityAttributeCallback callback + ); + + private native void writeColorPointBIntensityAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeColorPointBIntensityAttribute(long chipClusterPtr, + ColorPointBIntensityAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEnhancedCurrentHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEnhancedCurrentHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnhancedColorModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeEnhancedColorModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorLoopActiveAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorLoopActiveAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorLoopDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorLoopDirectionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorLoopTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorLoopTimeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorLoopStartEnhancedHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorLoopStartEnhancedHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorLoopStoredEnhancedHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorLoopStoredEnhancedHueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorCapabilitiesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorCapabilitiesAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorTempPhysicalMinMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorTempPhysicalMinMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readColorTempPhysicalMaxMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeColorTempPhysicalMaxMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCoupleColorTempToLevelMinMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCoupleColorTempToLevelMinMiredsAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, + StartUpColorTemperatureMiredsAttributeCallback callback + ); + + private native void writeStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeStartUpColorTemperatureMiredsAttribute(long chipClusterPtr, + StartUpColorTemperatureMiredsAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class BallastConfigurationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000301L; + + public BallastConfigurationCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface IntrinsicBallastFactorAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface BallastFactorAdjustmentAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LampRatedHoursAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LampBurnHoursAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LampBurnHoursTripPointAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readPhysicalMinLevelAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalMinLevelAttribute(chipClusterPtr, callback); + } + public void subscribePhysicalMinLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalMaxLevelAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalMaxLevelAttribute(chipClusterPtr, callback); + } + public void subscribePhysicalMaxLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBallastStatusAttribute( + IntegerAttributeCallback callback + ) { + readBallastStatusAttribute(chipClusterPtr, callback); + } + public void subscribeBallastStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBallastStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinLevelAttribute( + IntegerAttributeCallback callback + ) { + readMinLevelAttribute(chipClusterPtr, callback); + } + public void writeMinLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeMinLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMinLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMinLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMinLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMinLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxLevelAttribute( + IntegerAttributeCallback callback + ) { + readMaxLevelAttribute(chipClusterPtr, callback); + } + public void writeMaxLevelAttribute(DefaultClusterCallback callback, Integer value) { + writeMaxLevelAttribute(chipClusterPtr, callback, value, null); + } + + public void writeMaxLevelAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeMaxLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeMaxLevelAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaxLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readIntrinsicBallastFactorAttribute( + IntrinsicBallastFactorAttributeCallback callback + ) { + readIntrinsicBallastFactorAttribute(chipClusterPtr, callback); + } + public void writeIntrinsicBallastFactorAttribute(DefaultClusterCallback callback, Integer value) { + writeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, value, null); + } + + public void writeIntrinsicBallastFactorAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeIntrinsicBallastFactorAttribute( + IntrinsicBallastFactorAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeIntrinsicBallastFactorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBallastFactorAdjustmentAttribute( + BallastFactorAdjustmentAttributeCallback callback + ) { + readBallastFactorAdjustmentAttribute(chipClusterPtr, callback); + } + public void writeBallastFactorAdjustmentAttribute(DefaultClusterCallback callback, Integer value) { + writeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBallastFactorAdjustmentAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBallastFactorAdjustmentAttribute( + BallastFactorAdjustmentAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeBallastFactorAdjustmentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampQuantityAttribute( + IntegerAttributeCallback callback + ) { + readLampQuantityAttribute(chipClusterPtr, callback); + } + public void subscribeLampQuantityAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLampQuantityAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampTypeAttribute( + CharStringAttributeCallback callback + ) { + readLampTypeAttribute(chipClusterPtr, callback); + } + public void writeLampTypeAttribute(DefaultClusterCallback callback, String value) { + writeLampTypeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampTypeAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLampTypeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampTypeAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLampTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampManufacturerAttribute( + CharStringAttributeCallback callback + ) { + readLampManufacturerAttribute(chipClusterPtr, callback); + } + public void writeLampManufacturerAttribute(DefaultClusterCallback callback, String value) { + writeLampManufacturerAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampManufacturerAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLampManufacturerAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampManufacturerAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLampManufacturerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampRatedHoursAttribute( + LampRatedHoursAttributeCallback callback + ) { + readLampRatedHoursAttribute(chipClusterPtr, callback); + } + public void writeLampRatedHoursAttribute(DefaultClusterCallback callback, Long value) { + writeLampRatedHoursAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampRatedHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLampRatedHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampRatedHoursAttribute( + LampRatedHoursAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLampRatedHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampBurnHoursAttribute( + LampBurnHoursAttributeCallback callback + ) { + readLampBurnHoursAttribute(chipClusterPtr, callback); + } + public void writeLampBurnHoursAttribute(DefaultClusterCallback callback, Long value) { + writeLampBurnHoursAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampBurnHoursAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLampBurnHoursAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampBurnHoursAttribute( + LampBurnHoursAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLampBurnHoursAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampAlarmModeAttribute( + IntegerAttributeCallback callback + ) { + readLampAlarmModeAttribute(chipClusterPtr, callback); + } + public void writeLampAlarmModeAttribute(DefaultClusterCallback callback, Integer value) { + writeLampAlarmModeAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampAlarmModeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeLampAlarmModeAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampAlarmModeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLampAlarmModeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLampBurnHoursTripPointAttribute( + LampBurnHoursTripPointAttributeCallback callback + ) { + readLampBurnHoursTripPointAttribute(chipClusterPtr, callback); + } + public void writeLampBurnHoursTripPointAttribute(DefaultClusterCallback callback, Long value) { + writeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLampBurnHoursTripPointAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLampBurnHoursTripPointAttribute( + LampBurnHoursTripPointAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLampBurnHoursTripPointAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readPhysicalMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePhysicalMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePhysicalMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBallastStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeBallastStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMinLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMinLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeMaxLevelAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeMaxLevelAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readIntrinsicBallastFactorAttribute(long chipClusterPtr, + IntrinsicBallastFactorAttributeCallback callback + ); + + private native void writeIntrinsicBallastFactorAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeIntrinsicBallastFactorAttribute(long chipClusterPtr, + IntrinsicBallastFactorAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readBallastFactorAdjustmentAttribute(long chipClusterPtr, + BallastFactorAdjustmentAttributeCallback callback + ); + + private native void writeBallastFactorAdjustmentAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBallastFactorAdjustmentAttribute(long chipClusterPtr, + BallastFactorAdjustmentAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLampQuantityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLampQuantityAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLampTypeAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeLampTypeAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampTypeAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLampManufacturerAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeLampManufacturerAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampManufacturerAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLampRatedHoursAttribute(long chipClusterPtr, + LampRatedHoursAttributeCallback callback + ); + + private native void writeLampRatedHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampRatedHoursAttribute(long chipClusterPtr, + LampRatedHoursAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLampBurnHoursAttribute(long chipClusterPtr, + LampBurnHoursAttributeCallback callback + ); + + private native void writeLampBurnHoursAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampBurnHoursAttribute(long chipClusterPtr, + LampBurnHoursAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLampAlarmModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeLampAlarmModeAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampAlarmModeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLampBurnHoursTripPointAttribute(long chipClusterPtr, + LampBurnHoursTripPointAttributeCallback callback + ); + + private native void writeLampBurnHoursTripPointAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLampBurnHoursTripPointAttribute(long chipClusterPtr, + LampBurnHoursTripPointAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class IlluminanceMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000400L; + + public IlluminanceMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface LightSensorTypeAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback + ) { + readToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLightSensorTypeAttribute( + LightSensorTypeAttributeCallback callback + ) { + readLightSensorTypeAttribute(chipClusterPtr, callback); + } + public void subscribeLightSensorTypeAttribute( + LightSensorTypeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeLightSensorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLightSensorTypeAttribute(long chipClusterPtr, + LightSensorTypeAttributeCallback callback + ); + private native void subscribeLightSensorTypeAttribute(long chipClusterPtr, + LightSensorTypeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TemperatureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000402L; + + public TemperatureMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback + ) { + readToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class PressureMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000403L; + + public PressureMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxScaledValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback + ) { + readToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaledValueAttribute( + ScaledValueAttributeCallback callback + ) { + readScaledValueAttribute(chipClusterPtr, callback); + } + public void subscribeScaledValueAttribute( + ScaledValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinScaledValueAttribute( + MinScaledValueAttributeCallback callback + ) { + readMinScaledValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinScaledValueAttribute( + MinScaledValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxScaledValueAttribute( + MaxScaledValueAttributeCallback callback + ) { + readMaxScaledValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxScaledValueAttribute( + MaxScaledValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxScaledValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaledToleranceAttribute( + IntegerAttributeCallback callback + ) { + readScaledToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeScaledToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeScaledToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readScaleAttribute( + IntegerAttributeCallback callback + ) { + readScaleAttribute(chipClusterPtr, callback); + } + public void subscribeScaleAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeScaleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readScaledValueAttribute(long chipClusterPtr, + ScaledValueAttributeCallback callback + ); + private native void subscribeScaledValueAttribute(long chipClusterPtr, + ScaledValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinScaledValueAttribute(long chipClusterPtr, + MinScaledValueAttributeCallback callback + ); + private native void subscribeMinScaledValueAttribute(long chipClusterPtr, + MinScaledValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxScaledValueAttribute(long chipClusterPtr, + MaxScaledValueAttributeCallback callback + ); + private native void subscribeMaxScaledValueAttribute(long chipClusterPtr, + MaxScaledValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readScaledToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeScaledToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readScaleAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeScaleAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class FlowMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000404L; + + public FlowMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback + ) { + readToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RelativeHumidityMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000405L; + + public RelativeHumidityMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readToleranceAttribute( + IntegerAttributeCallback callback + ) { + readToleranceAttribute(chipClusterPtr, callback); + } + public void subscribeToleranceAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeToleranceAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeToleranceAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OccupancySensingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000406L; + + public OccupancySensingCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readOccupancyAttribute( + IntegerAttributeCallback callback + ) { + readOccupancyAttribute(chipClusterPtr, callback); + } + public void subscribeOccupancyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupancyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupancySensorTypeAttribute( + IntegerAttributeCallback callback + ) { + readOccupancySensorTypeAttribute(chipClusterPtr, callback); + } + public void subscribeOccupancySensorTypeAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupancySensorTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOccupancySensorTypeBitmapAttribute( + IntegerAttributeCallback callback + ) { + readOccupancySensorTypeBitmapAttribute(chipClusterPtr, callback); + } + public void subscribeOccupancySensorTypeBitmapAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOccupancySensorTypeBitmapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPIROccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readPIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writePIROccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePIROccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePIROccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPIRUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readPIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writePIRUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePIRUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePIRUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPIRUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback + ) { + readPIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); + } + public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); + } + + public void writePIRUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePIRUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePIRUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUltrasonicOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUltrasonicUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUltrasonicUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback + ) { + readUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); + } + public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalContactOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalContactUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback); + } + public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, null); + } + + public void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback + ) { + readPhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback); + } + public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value) { + writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, null); + } + + public void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readOccupancyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOccupancyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOccupancySensorTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOccupancySensorTypeAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOccupancySensorTypeBitmapAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeOccupancySensorTypeBitmapAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePIROccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePIRUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePIRUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUltrasonicOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUltrasonicUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUltrasonicUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePhysicalContactOccupiedToUnoccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePhysicalContactUnoccupiedToOccupiedDelayAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writePhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribePhysicalContactUnoccupiedToOccupiedThresholdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class CarbonMonoxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000040CL; + + public CarbonMonoxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class CarbonDioxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000040DL; + + public CarbonDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class NitrogenDioxideConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000413L; + + public NitrogenDioxideConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class OzoneConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000415L; + + public OzoneConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class Pm25ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042AL; + + public Pm25ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class FormaldehydeConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042BL; + + public FormaldehydeConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class Pm1ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042CL; + + public Pm1ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class Pm10ConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042DL; + + public Pm10ConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TotalVolatileOrganicCompoundsConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042EL; + + public TotalVolatileOrganicCompoundsConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class RadonConcentrationMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000042FL; + + public RadonConcentrationMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface MeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MinMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface MaxMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface PeakMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AverageMeasuredValueAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + ) { + readMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredValueAttribute( + MeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + ) { + readMinMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMinMeasuredValueAttribute( + MinMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMinMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + ) { + readMaxMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeMaxMeasuredValueAttribute( + MaxMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeMaxMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + ) { + readPeakMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueAttribute( + PeakMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribePeakMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPeakMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readPeakMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribePeakMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePeakMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + ) { + readAverageMeasuredValueAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueAttribute( + AverageMeasuredValueAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback + ) { + readAverageMeasuredValueWindowAttribute(chipClusterPtr, callback); + } + public void subscribeAverageMeasuredValueWindowAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageMeasuredValueWindowAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUncertaintyAttribute( + FloatAttributeCallback callback + ) { + readUncertaintyAttribute(chipClusterPtr, callback); + } + public void subscribeUncertaintyAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUncertaintyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementUnitAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementUnitAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementUnitAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementUnitAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasurementMediumAttribute( + IntegerAttributeCallback callback + ) { + readMeasurementMediumAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementMediumAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementMediumAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLevelValueAttribute( + IntegerAttributeCallback callback + ) { + readLevelValueAttribute(chipClusterPtr, callback); + } + public void subscribeLevelValueAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLevelValueAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + ); + private native void subscribeMeasuredValueAttribute(long chipClusterPtr, + MeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + ); + private native void subscribeMinMeasuredValueAttribute(long chipClusterPtr, + MinMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + ); + private native void subscribeMaxMeasuredValueAttribute(long chipClusterPtr, + MaxMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + ); + private native void subscribePeakMeasuredValueAttribute(long chipClusterPtr, + PeakMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePeakMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueAttribute(long chipClusterPtr, + AverageMeasuredValueAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeAverageMeasuredValueWindowAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribeUncertaintyAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementUnitAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasurementMediumAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLevelValueAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class WakeOnLanCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000503L; + + public WakeOnLanCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMACAddressAttribute( + CharStringAttributeCallback callback + ) { + readMACAddressAttribute(chipClusterPtr, callback); + } + public void subscribeMACAddressAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMACAddressAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMACAddressAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeMACAddressAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ChannelCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000504L; + + public ChannelCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void changeChannel(ChangeChannelResponseCallback callback + , String match) { + changeChannel(chipClusterPtr, callback, match, null); + } + + public void changeChannel(ChangeChannelResponseCallback callback + , String match + , int timedInvokeTimeoutMs) { + changeChannel(chipClusterPtr, callback, match, timedInvokeTimeoutMs); + } + + public void changeChannelByNumber(DefaultClusterCallback callback + , Integer majorNumber, Integer minorNumber) { + changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber, null); + } + + public void changeChannelByNumber(DefaultClusterCallback callback + , Integer majorNumber, Integer minorNumber + , int timedInvokeTimeoutMs) { + changeChannelByNumber(chipClusterPtr, callback, majorNumber, minorNumber, timedInvokeTimeoutMs); + } + + public void skipChannel(DefaultClusterCallback callback + , Integer count) { + skipChannel(chipClusterPtr, callback, count, null); + } + + public void skipChannel(DefaultClusterCallback callback + , Integer count + , int timedInvokeTimeoutMs) { + skipChannel(chipClusterPtr, callback, count, timedInvokeTimeoutMs); + } + private native void changeChannel(long chipClusterPtr, ChangeChannelResponseCallback Callback + , String match + , @Nullable Integer timedInvokeTimeoutMs); + private native void changeChannelByNumber(long chipClusterPtr, DefaultClusterCallback Callback + , Integer majorNumber, Integer minorNumber + , @Nullable Integer timedInvokeTimeoutMs); + private native void skipChannel(long chipClusterPtr, DefaultClusterCallback Callback + , Integer count + , @Nullable Integer timedInvokeTimeoutMs); + public interface ChangeChannelResponseCallback { + void onSuccess(Integer status, Optional data); + + void onError(Exception error); + } + + + public interface ChannelListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readChannelListAttribute( + ChannelListAttributeCallback callback + ) { + readChannelListAttribute(chipClusterPtr, callback); + } + public void subscribeChannelListAttribute( + ChannelListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeChannelListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readChannelListAttribute(long chipClusterPtr, + ChannelListAttributeCallback callback + ); + private native void subscribeChannelListAttribute(long chipClusterPtr, + ChannelListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class TargetNavigatorCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000505L; + + public TargetNavigatorCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void navigateTarget(NavigateTargetResponseCallback callback + , Integer target, Optional data) { + navigateTarget(chipClusterPtr, callback, target, data, null); + } + + public void navigateTarget(NavigateTargetResponseCallback callback + , Integer target, Optional data + , int timedInvokeTimeoutMs) { + navigateTarget(chipClusterPtr, callback, target, data, timedInvokeTimeoutMs); + } + private native void navigateTarget(long chipClusterPtr, NavigateTargetResponseCallback Callback + , Integer target, Optional data + , @Nullable Integer timedInvokeTimeoutMs); + public interface NavigateTargetResponseCallback { + void onSuccess(Integer status, Optional data); + + void onError(Exception error); + } + + + public interface TargetListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readTargetListAttribute( + TargetListAttributeCallback callback + ) { + readTargetListAttribute(chipClusterPtr, callback); + } + public void subscribeTargetListAttribute( + TargetListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeTargetListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentTargetAttribute( + IntegerAttributeCallback callback + ) { + readCurrentTargetAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentTargetAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentTargetAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readTargetListAttribute(long chipClusterPtr, + TargetListAttributeCallback callback + ); + private native void subscribeTargetListAttribute(long chipClusterPtr, + TargetListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentTargetAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentTargetAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class MediaPlaybackCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000506L; + + public MediaPlaybackCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void play(PlaybackResponseCallback callback + ) { + play(chipClusterPtr, callback, null); + } + + public void play(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + play(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void pause(PlaybackResponseCallback callback + ) { + pause(chipClusterPtr, callback, null); + } + + public void pause(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + pause(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void stop(PlaybackResponseCallback callback + ) { + stop(chipClusterPtr, callback, null); + } + + public void stop(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + stop(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void startOver(PlaybackResponseCallback callback + ) { + startOver(chipClusterPtr, callback, null); + } + + public void startOver(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + startOver(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void previous(PlaybackResponseCallback callback + ) { + previous(chipClusterPtr, callback, null); + } + + public void previous(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + previous(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void next(PlaybackResponseCallback callback + ) { + next(chipClusterPtr, callback, null); + } + + public void next(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + next(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void rewind(PlaybackResponseCallback callback + ) { + rewind(chipClusterPtr, callback, null); + } + + public void rewind(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + rewind(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void fastForward(PlaybackResponseCallback callback + ) { + fastForward(chipClusterPtr, callback, null); + } + + public void fastForward(PlaybackResponseCallback callback + + , int timedInvokeTimeoutMs) { + fastForward(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void skipForward(PlaybackResponseCallback callback + , Long deltaPositionMilliseconds) { + skipForward(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipForward(PlaybackResponseCallback callback + , Long deltaPositionMilliseconds + , int timedInvokeTimeoutMs) { + skipForward(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); + } + + public void skipBackward(PlaybackResponseCallback callback + , Long deltaPositionMilliseconds) { + skipBackward(chipClusterPtr, callback, deltaPositionMilliseconds, null); + } + + public void skipBackward(PlaybackResponseCallback callback + , Long deltaPositionMilliseconds + , int timedInvokeTimeoutMs) { + skipBackward(chipClusterPtr, callback, deltaPositionMilliseconds, timedInvokeTimeoutMs); + } + + public void seek(PlaybackResponseCallback callback + , Long position) { + seek(chipClusterPtr, callback, position, null); + } + + public void seek(PlaybackResponseCallback callback + , Long position + , int timedInvokeTimeoutMs) { + seek(chipClusterPtr, callback, position, timedInvokeTimeoutMs); + } + private native void play(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void pause(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void stop(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void startOver(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void previous(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void next(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void rewind(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void fastForward(long chipClusterPtr, PlaybackResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void skipForward(long chipClusterPtr, PlaybackResponseCallback Callback + , Long deltaPositionMilliseconds + , @Nullable Integer timedInvokeTimeoutMs); + private native void skipBackward(long chipClusterPtr, PlaybackResponseCallback Callback + , Long deltaPositionMilliseconds + , @Nullable Integer timedInvokeTimeoutMs); + private native void seek(long chipClusterPtr, PlaybackResponseCallback Callback + , Long position + , @Nullable Integer timedInvokeTimeoutMs); + public interface PlaybackResponseCallback { + void onSuccess(Integer status, Optional data); + + void onError(Exception error); + } + + + public interface StartTimeAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface DurationAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SeekRangeEndAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface SeekRangeStartAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readCurrentStateAttribute( + IntegerAttributeCallback callback + ) { + readCurrentStateAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentStateAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStartTimeAttribute( + StartTimeAttributeCallback callback + ) { + readStartTimeAttribute(chipClusterPtr, callback); + } + public void subscribeStartTimeAttribute( + StartTimeAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeStartTimeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDurationAttribute( + DurationAttributeCallback callback + ) { + readDurationAttribute(chipClusterPtr, callback); + } + public void subscribeDurationAttribute( + DurationAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeDurationAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPlaybackSpeedAttribute( + FloatAttributeCallback callback + ) { + readPlaybackSpeedAttribute(chipClusterPtr, callback); + } + public void subscribePlaybackSpeedAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePlaybackSpeedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSeekRangeEndAttribute( + SeekRangeEndAttributeCallback callback + ) { + readSeekRangeEndAttribute(chipClusterPtr, callback); + } + public void subscribeSeekRangeEndAttribute( + SeekRangeEndAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSeekRangeEndAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSeekRangeStartAttribute( + SeekRangeStartAttributeCallback callback + ) { + readSeekRangeStartAttribute(chipClusterPtr, callback); + } + public void subscribeSeekRangeStartAttribute( + SeekRangeStartAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeSeekRangeStartAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readCurrentStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentStateAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStartTimeAttribute(long chipClusterPtr, + StartTimeAttributeCallback callback + ); + private native void subscribeStartTimeAttribute(long chipClusterPtr, + StartTimeAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readDurationAttribute(long chipClusterPtr, + DurationAttributeCallback callback + ); + private native void subscribeDurationAttribute(long chipClusterPtr, + DurationAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readPlaybackSpeedAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + private native void subscribePlaybackSpeedAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSeekRangeEndAttribute(long chipClusterPtr, + SeekRangeEndAttributeCallback callback + ); + private native void subscribeSeekRangeEndAttribute(long chipClusterPtr, + SeekRangeEndAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSeekRangeStartAttribute(long chipClusterPtr, + SeekRangeStartAttributeCallback callback + ); + private native void subscribeSeekRangeStartAttribute(long chipClusterPtr, + SeekRangeStartAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class MediaInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000507L; + + public MediaInputCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void selectInput(DefaultClusterCallback callback + , Integer index) { + selectInput(chipClusterPtr, callback, index, null); + } + + public void selectInput(DefaultClusterCallback callback + , Integer index + , int timedInvokeTimeoutMs) { + selectInput(chipClusterPtr, callback, index, timedInvokeTimeoutMs); + } + + public void showInputStatus(DefaultClusterCallback callback + ) { + showInputStatus(chipClusterPtr, callback, null); + } + + public void showInputStatus(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + showInputStatus(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void hideInputStatus(DefaultClusterCallback callback + ) { + hideInputStatus(chipClusterPtr, callback, null); + } + + public void hideInputStatus(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + hideInputStatus(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void renameInput(DefaultClusterCallback callback + , Integer index, String name) { + renameInput(chipClusterPtr, callback, index, name, null); + } + + public void renameInput(DefaultClusterCallback callback + , Integer index, String name + , int timedInvokeTimeoutMs) { + renameInput(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); + } + private native void selectInput(long chipClusterPtr, DefaultClusterCallback Callback + , Integer index + , @Nullable Integer timedInvokeTimeoutMs); + private native void showInputStatus(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void hideInputStatus(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void renameInput(long chipClusterPtr, DefaultClusterCallback Callback + , Integer index, String name + , @Nullable Integer timedInvokeTimeoutMs); + + public interface InputListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readInputListAttribute( + InputListAttributeCallback callback + ) { + readInputListAttribute(chipClusterPtr, callback); + } + public void subscribeInputListAttribute( + InputListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeInputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentInputAttribute( + IntegerAttributeCallback callback + ) { + readCurrentInputAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentInputAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentInputAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readInputListAttribute(long chipClusterPtr, + InputListAttributeCallback callback + ); + private native void subscribeInputListAttribute(long chipClusterPtr, + InputListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentInputAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentInputAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class LowPowerCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000508L; + + public LowPowerCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void sleep(DefaultClusterCallback callback + ) { + sleep(chipClusterPtr, callback, null); + } + + public void sleep(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + sleep(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void sleep(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class KeypadInputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000509L; + + public KeypadInputCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void sendKey(SendKeyResponseCallback callback + , Integer keyCode) { + sendKey(chipClusterPtr, callback, keyCode, null); + } + + public void sendKey(SendKeyResponseCallback callback + , Integer keyCode + , int timedInvokeTimeoutMs) { + sendKey(chipClusterPtr, callback, keyCode, timedInvokeTimeoutMs); + } + private native void sendKey(long chipClusterPtr, SendKeyResponseCallback Callback + , Integer keyCode + , @Nullable Integer timedInvokeTimeoutMs); + public interface SendKeyResponseCallback { + void onSuccess(Integer status); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ContentLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000050AL; + + public ContentLauncherCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void launchContent(LauncherResponseCallback callback + , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data) { + launchContent(chipClusterPtr, callback, search, autoPlay, data, null); + } + + public void launchContent(LauncherResponseCallback callback + , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data + , int timedInvokeTimeoutMs) { + launchContent(chipClusterPtr, callback, search, autoPlay, data, timedInvokeTimeoutMs); + } + + public void launchURL(LauncherResponseCallback callback + , String contentURL, Optional displayString, Optional brandingInformation) { + launchURL(chipClusterPtr, callback, contentURL, displayString, brandingInformation, null); + } + + public void launchURL(LauncherResponseCallback callback + , String contentURL, Optional displayString, Optional brandingInformation + , int timedInvokeTimeoutMs) { + launchURL(chipClusterPtr, callback, contentURL, displayString, brandingInformation, timedInvokeTimeoutMs); + } + private native void launchContent(long chipClusterPtr, LauncherResponseCallback Callback + , ChipStructs.ContentLauncherClusterContentSearchStruct search, Boolean autoPlay, Optional data + , @Nullable Integer timedInvokeTimeoutMs); + private native void launchURL(long chipClusterPtr, LauncherResponseCallback Callback + , String contentURL, Optional displayString, Optional brandingInformation + , @Nullable Integer timedInvokeTimeoutMs); + public interface LauncherResponseCallback { + void onSuccess(Integer status, Optional data); + + void onError(Exception error); + } + + + public interface AcceptHeaderAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readAcceptHeaderAttribute( + AcceptHeaderAttributeCallback callback + ) { + readAcceptHeaderAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptHeaderAttribute( + AcceptHeaderAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptHeaderAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedStreamingProtocolsAttribute( + LongAttributeCallback callback + ) { + readSupportedStreamingProtocolsAttribute(chipClusterPtr, callback); + } + public void writeSupportedStreamingProtocolsAttribute(DefaultClusterCallback callback, Long value) { + writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeSupportedStreamingProtocolsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeSupportedStreamingProtocolsAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedStreamingProtocolsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readAcceptHeaderAttribute(long chipClusterPtr, + AcceptHeaderAttributeCallback callback + ); + private native void subscribeAcceptHeaderAttribute(long chipClusterPtr, + AcceptHeaderAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readSupportedStreamingProtocolsAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeSupportedStreamingProtocolsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeSupportedStreamingProtocolsAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class AudioOutputCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000050BL; + + public AudioOutputCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void selectOutput(DefaultClusterCallback callback + , Integer index) { + selectOutput(chipClusterPtr, callback, index, null); + } + + public void selectOutput(DefaultClusterCallback callback + , Integer index + , int timedInvokeTimeoutMs) { + selectOutput(chipClusterPtr, callback, index, timedInvokeTimeoutMs); + } + + public void renameOutput(DefaultClusterCallback callback + , Integer index, String name) { + renameOutput(chipClusterPtr, callback, index, name, null); + } + + public void renameOutput(DefaultClusterCallback callback + , Integer index, String name + , int timedInvokeTimeoutMs) { + renameOutput(chipClusterPtr, callback, index, name, timedInvokeTimeoutMs); + } + private native void selectOutput(long chipClusterPtr, DefaultClusterCallback Callback + , Integer index + , @Nullable Integer timedInvokeTimeoutMs); + private native void renameOutput(long chipClusterPtr, DefaultClusterCallback Callback + , Integer index, String name + , @Nullable Integer timedInvokeTimeoutMs); + + public interface OutputListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readOutputListAttribute( + OutputListAttributeCallback callback + ) { + readOutputListAttribute(chipClusterPtr, callback); + } + public void subscribeOutputListAttribute( + OutputListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeOutputListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentOutputAttribute( + IntegerAttributeCallback callback + ) { + readCurrentOutputAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentOutputAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentOutputAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readOutputListAttribute(long chipClusterPtr, + OutputListAttributeCallback callback + ); + private native void subscribeOutputListAttribute(long chipClusterPtr, + OutputListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readCurrentOutputAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentOutputAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ApplicationLauncherCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000050CL; + + public ApplicationLauncherCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void launchApp(LauncherResponseCallback callback + , Optional application, Optional data) { + launchApp(chipClusterPtr, callback, application, data, null); + } + + public void launchApp(LauncherResponseCallback callback + , Optional application, Optional data + , int timedInvokeTimeoutMs) { + launchApp(chipClusterPtr, callback, application, data, timedInvokeTimeoutMs); + } + + public void stopApp(LauncherResponseCallback callback + , Optional application) { + stopApp(chipClusterPtr, callback, application, null); + } + + public void stopApp(LauncherResponseCallback callback + , Optional application + , int timedInvokeTimeoutMs) { + stopApp(chipClusterPtr, callback, application, timedInvokeTimeoutMs); + } + + public void hideApp(LauncherResponseCallback callback + , Optional application) { + hideApp(chipClusterPtr, callback, application, null); + } + + public void hideApp(LauncherResponseCallback callback + , Optional application + , int timedInvokeTimeoutMs) { + hideApp(chipClusterPtr, callback, application, timedInvokeTimeoutMs); + } + private native void launchApp(long chipClusterPtr, LauncherResponseCallback Callback + , Optional application, Optional data + , @Nullable Integer timedInvokeTimeoutMs); + private native void stopApp(long chipClusterPtr, LauncherResponseCallback Callback + , Optional application + , @Nullable Integer timedInvokeTimeoutMs); + private native void hideApp(long chipClusterPtr, LauncherResponseCallback Callback + , Optional application + , @Nullable Integer timedInvokeTimeoutMs); + public interface LauncherResponseCallback { + void onSuccess(Integer status, Optional data); + + void onError(Exception error); + } + + + public interface CatalogListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readCatalogListAttribute( + CatalogListAttributeCallback callback + ) { + readCatalogListAttribute(chipClusterPtr, callback); + } + public void subscribeCatalogListAttribute( + CatalogListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeCatalogListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readCatalogListAttribute(long chipClusterPtr, + CatalogListAttributeCallback callback + ); + private native void subscribeCatalogListAttribute(long chipClusterPtr, + CatalogListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ApplicationBasicCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000050DL; + + public ApplicationBasicCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public interface AllowedVendorListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readVendorNameAttribute( + CharStringAttributeCallback callback + ) { + readVendorNameAttribute(chipClusterPtr, callback); + } + public void subscribeVendorNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVendorIDAttribute( + IntegerAttributeCallback callback + ) { + readVendorIDAttribute(chipClusterPtr, callback); + } + public void subscribeVendorIDAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApplicationNameAttribute( + CharStringAttributeCallback callback + ) { + readApplicationNameAttribute(chipClusterPtr, callback); + } + public void subscribeApplicationNameAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApplicationNameAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readProductIDAttribute( + IntegerAttributeCallback callback + ) { + readProductIDAttribute(chipClusterPtr, callback); + } + public void subscribeProductIDAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeProductIDAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStatusAttribute( + IntegerAttributeCallback callback + ) { + readStatusAttribute(chipClusterPtr, callback); + } + public void subscribeStatusAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStatusAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApplicationVersionAttribute( + CharStringAttributeCallback callback + ) { + readApplicationVersionAttribute(chipClusterPtr, callback); + } + public void subscribeApplicationVersionAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApplicationVersionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAllowedVendorListAttribute( + AllowedVendorListAttributeCallback callback + ) { + readAllowedVendorListAttribute(chipClusterPtr, callback); + } + public void subscribeAllowedVendorListAttribute( + AllowedVendorListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAllowedVendorListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeVendorNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeVendorIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApplicationNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeApplicationNameAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readProductIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeProductIDAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeStatusAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApplicationVersionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + private native void subscribeApplicationVersionAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAllowedVendorListAttribute(long chipClusterPtr, + AllowedVendorListAttributeCallback callback + ); + private native void subscribeAllowedVendorListAttribute(long chipClusterPtr, + AllowedVendorListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class AccountLoginCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x0000050EL; + + public AccountLoginCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + + public void getSetupPIN(GetSetupPINResponseCallback callback + , String tempAccountIdentifier + , int timedInvokeTimeoutMs) { + getSetupPIN(chipClusterPtr, callback, tempAccountIdentifier, timedInvokeTimeoutMs); + } + + + public void login(DefaultClusterCallback callback + , String tempAccountIdentifier, String setupPIN + , int timedInvokeTimeoutMs) { + login(chipClusterPtr, callback, tempAccountIdentifier, setupPIN, timedInvokeTimeoutMs); + } + + + public void logout(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + logout(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + private native void getSetupPIN(long chipClusterPtr, GetSetupPINResponseCallback Callback + , String tempAccountIdentifier + , @Nullable Integer timedInvokeTimeoutMs); + private native void login(long chipClusterPtr, DefaultClusterCallback Callback + , String tempAccountIdentifier, String setupPIN + , @Nullable Integer timedInvokeTimeoutMs); + private native void logout(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + public interface GetSetupPINResponseCallback { + void onSuccess(String setupPIN); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class ElectricalMeasurementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0x00000B04L; + + public ElectricalMeasurementCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void getProfileInfoCommand(DefaultClusterCallback callback + ) { + getProfileInfoCommand(chipClusterPtr, callback, null); + } + + public void getProfileInfoCommand(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + getProfileInfoCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void getMeasurementProfileCommand(DefaultClusterCallback callback + , Integer attributeId, Long startTime, Integer numberOfIntervals) { + getMeasurementProfileCommand(chipClusterPtr, callback, attributeId, startTime, numberOfIntervals, null); + } + + public void getMeasurementProfileCommand(DefaultClusterCallback callback + , Integer attributeId, Long startTime, Integer numberOfIntervals + , int timedInvokeTimeoutMs) { + getMeasurementProfileCommand(chipClusterPtr, callback, attributeId, startTime, numberOfIntervals, timedInvokeTimeoutMs); + } + private native void getProfileInfoCommand(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void getMeasurementProfileCommand(long chipClusterPtr, DefaultClusterCallback Callback + , Integer attributeId, Long startTime, Integer numberOfIntervals + , @Nullable Integer timedInvokeTimeoutMs); + public interface GetProfileInfoResponseCommandCallback { + void onSuccess(Integer profileCount, Integer profileIntervalPeriod, Integer maxNumberOfIntervals, ArrayList listOfAttributes); + + void onError(Exception error); + } + + public interface GetMeasurementProfileResponseCommandCallback { + void onSuccess(Long startTime, Integer status, Integer profileIntervalPeriod, Integer numberOfIntervalsDelivered, Integer attributeId, ArrayList intervals); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMeasurementTypeAttribute( + LongAttributeCallback callback + ) { + readMeasurementTypeAttribute(chipClusterPtr, callback); + } + public void subscribeMeasurementTypeAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasurementTypeAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcVoltageAttribute( + IntegerAttributeCallback callback + ) { + readDcVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeDcVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcVoltageMinAttribute( + IntegerAttributeCallback callback + ) { + readDcVoltageMinAttribute(chipClusterPtr, callback); + } + public void subscribeDcVoltageMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcVoltageMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcVoltageMaxAttribute( + IntegerAttributeCallback callback + ) { + readDcVoltageMaxAttribute(chipClusterPtr, callback); + } + public void subscribeDcVoltageMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcVoltageMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcCurrentAttribute( + IntegerAttributeCallback callback + ) { + readDcCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeDcCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcCurrentMinAttribute( + IntegerAttributeCallback callback + ) { + readDcCurrentMinAttribute(chipClusterPtr, callback); + } + public void subscribeDcCurrentMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcCurrentMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcCurrentMaxAttribute( + IntegerAttributeCallback callback + ) { + readDcCurrentMaxAttribute(chipClusterPtr, callback); + } + public void subscribeDcCurrentMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcCurrentMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcPowerAttribute( + IntegerAttributeCallback callback + ) { + readDcPowerAttribute(chipClusterPtr, callback); + } + public void subscribeDcPowerAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcPowerMinAttribute( + IntegerAttributeCallback callback + ) { + readDcPowerMinAttribute(chipClusterPtr, callback); + } + public void subscribeDcPowerMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcPowerMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcPowerMaxAttribute( + IntegerAttributeCallback callback + ) { + readDcPowerMaxAttribute(chipClusterPtr, callback); + } + public void subscribeDcPowerMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcPowerMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcVoltageMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readDcVoltageMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeDcVoltageMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcVoltageMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcVoltageDivisorAttribute( + IntegerAttributeCallback callback + ) { + readDcVoltageDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeDcVoltageDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcVoltageDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcCurrentMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readDcCurrentMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeDcCurrentMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcCurrentDivisorAttribute( + IntegerAttributeCallback callback + ) { + readDcCurrentDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeDcCurrentDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcCurrentDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcPowerMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readDcPowerMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeDcPowerMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcPowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readDcPowerDivisorAttribute( + IntegerAttributeCallback callback + ) { + readDcPowerDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeDcPowerDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeDcPowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcFrequencyAttribute( + IntegerAttributeCallback callback + ) { + readAcFrequencyAttribute(chipClusterPtr, callback); + } + public void subscribeAcFrequencyAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcFrequencyAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcFrequencyMinAttribute( + IntegerAttributeCallback callback + ) { + readAcFrequencyMinAttribute(chipClusterPtr, callback); + } + public void subscribeAcFrequencyMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcFrequencyMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcFrequencyMaxAttribute( + IntegerAttributeCallback callback + ) { + readAcFrequencyMaxAttribute(chipClusterPtr, callback); + } + public void subscribeAcFrequencyMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcFrequencyMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNeutralCurrentAttribute( + IntegerAttributeCallback callback + ) { + readNeutralCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeNeutralCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeNeutralCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTotalActivePowerAttribute( + LongAttributeCallback callback + ) { + readTotalActivePowerAttribute(chipClusterPtr, callback); + } + public void subscribeTotalActivePowerAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTotalActivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTotalReactivePowerAttribute( + LongAttributeCallback callback + ) { + readTotalReactivePowerAttribute(chipClusterPtr, callback); + } + public void subscribeTotalReactivePowerAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTotalReactivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTotalApparentPowerAttribute( + LongAttributeCallback callback + ) { + readTotalApparentPowerAttribute(chipClusterPtr, callback); + } + public void subscribeTotalApparentPowerAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTotalApparentPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured1stHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured1stHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured1stHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured1stHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured3rdHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured3rdHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured3rdHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured3rdHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured5thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured5thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured5thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured5thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured7thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured7thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured7thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured7thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured9thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured9thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured9thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured9thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasured11thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasured11thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasured11thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasured11thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase1stHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase1stHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase1stHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase1stHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase3rdHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase3rdHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase3rdHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase3rdHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase5thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase5thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase5thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase5thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase7thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase7thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase7thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase7thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase9thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase9thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase9thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase9thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readMeasuredPhase11thHarmonicCurrentAttribute( + IntegerAttributeCallback callback + ) { + readMeasuredPhase11thHarmonicCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeMeasuredPhase11thHarmonicCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMeasuredPhase11thHarmonicCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcFrequencyMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readAcFrequencyMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeAcFrequencyMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcFrequencyMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcFrequencyDivisorAttribute( + IntegerAttributeCallback callback + ) { + readAcFrequencyDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeAcFrequencyDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcFrequencyDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerMultiplierAttribute( + LongAttributeCallback callback + ) { + readPowerMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribePowerMultiplierAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerDivisorAttribute( + LongAttributeCallback callback + ) { + readPowerDivisorAttribute(chipClusterPtr, callback); + } + public void subscribePowerDivisorAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readHarmonicCurrentMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeHarmonicCurrentMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPhaseHarmonicCurrentMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readPhaseHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribePhaseHarmonicCurrentMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePhaseHarmonicCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstantaneousVoltageAttribute( + IntegerAttributeCallback callback + ) { + readInstantaneousVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeInstantaneousVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstantaneousVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstantaneousLineCurrentAttribute( + IntegerAttributeCallback callback + ) { + readInstantaneousLineCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeInstantaneousLineCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstantaneousLineCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstantaneousActiveCurrentAttribute( + IntegerAttributeCallback callback + ) { + readInstantaneousActiveCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeInstantaneousActiveCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstantaneousActiveCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstantaneousReactiveCurrentAttribute( + IntegerAttributeCallback callback + ) { + readInstantaneousReactiveCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeInstantaneousReactiveCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstantaneousReactiveCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInstantaneousPowerAttribute( + IntegerAttributeCallback callback + ) { + readInstantaneousPowerAttribute(chipClusterPtr, callback); + } + public void subscribeInstantaneousPowerAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInstantaneousPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMinAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMinAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMaxAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMaxAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMinAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMinAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMaxAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMaxAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMinAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMinAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMinAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMinAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMaxAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMaxAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMaxAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMaxAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReactivePowerAttribute( + IntegerAttributeCallback callback + ) { + readReactivePowerAttribute(chipClusterPtr, callback); + } + public void subscribeReactivePowerAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReactivePowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApparentPowerAttribute( + IntegerAttributeCallback callback + ) { + readApparentPowerAttribute(chipClusterPtr, callback); + } + public void subscribeApparentPowerAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApparentPowerAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerFactorAttribute( + IntegerAttributeCallback callback + ) { + readPowerFactorAttribute(chipClusterPtr, callback); + } + public void subscribePowerFactorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePowerFactorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsVoltageMeasurementPeriodAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback); + } + public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAverageRmsVoltageMeasurementPeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsVoltageMeasurementPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsUnderVoltageCounterAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback); + } + public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value) { + writeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAverageRmsUnderVoltageCounterAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsUnderVoltageCounterAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeOverVoltagePeriodAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback); + } + public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRmsExtremeOverVoltagePeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeOverVoltagePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeUnderVoltagePeriodAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback); + } + public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRmsExtremeUnderVoltagePeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeUnderVoltagePeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSagPeriodAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSagPeriodAttribute(chipClusterPtr, callback); + } + public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRmsVoltageSagPeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSagPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSwellPeriodAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback); + } + public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value) { + writeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRmsVoltageSwellPeriodAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSwellPeriodAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcVoltageMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readAcVoltageMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeAcVoltageMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcVoltageMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcVoltageDivisorAttribute( + IntegerAttributeCallback callback + ) { + readAcVoltageDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeAcVoltageDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcVoltageDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcCurrentMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readAcCurrentMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeAcCurrentMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcCurrentMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcCurrentDivisorAttribute( + IntegerAttributeCallback callback + ) { + readAcCurrentDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeAcCurrentDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcCurrentDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcPowerMultiplierAttribute( + IntegerAttributeCallback callback + ) { + readAcPowerMultiplierAttribute(chipClusterPtr, callback); + } + public void subscribeAcPowerMultiplierAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcPowerMultiplierAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcPowerDivisorAttribute( + IntegerAttributeCallback callback + ) { + readAcPowerDivisorAttribute(chipClusterPtr, callback); + } + public void subscribeAcPowerDivisorAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcPowerDivisorAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOverloadAlarmsMaskAttribute( + IntegerAttributeCallback callback + ) { + readOverloadAlarmsMaskAttribute(chipClusterPtr, callback); + } + public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { + writeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOverloadAlarmsMaskAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOverloadAlarmsMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVoltageOverloadAttribute( + IntegerAttributeCallback callback + ) { + readVoltageOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeVoltageOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVoltageOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCurrentOverloadAttribute( + IntegerAttributeCallback callback + ) { + readCurrentOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeCurrentOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCurrentOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcOverloadAlarmsMaskAttribute( + IntegerAttributeCallback callback + ) { + readAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback); + } + public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { + writeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, null); + } + + public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeAcOverloadAlarmsMaskAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcOverloadAlarmsMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcVoltageOverloadAttribute( + IntegerAttributeCallback callback + ) { + readAcVoltageOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeAcVoltageOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcVoltageOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcCurrentOverloadAttribute( + IntegerAttributeCallback callback + ) { + readAcCurrentOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeAcCurrentOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcCurrentOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcActivePowerOverloadAttribute( + IntegerAttributeCallback callback + ) { + readAcActivePowerOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeAcActivePowerOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcActivePowerOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcReactivePowerOverloadAttribute( + IntegerAttributeCallback callback + ) { + readAcReactivePowerOverloadAttribute(chipClusterPtr, callback); + } + public void subscribeAcReactivePowerOverloadAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAcReactivePowerOverloadAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsOverVoltageAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsOverVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsOverVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsOverVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsUnderVoltageAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsUnderVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsUnderVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsUnderVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeOverVoltageAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeOverVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeOverVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeOverVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeUnderVoltageAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeUnderVoltageAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeUnderVoltageAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeUnderVoltageAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSagAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSagAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSagAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSagAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSwellAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSwellAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSwellAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSwellAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLineCurrentPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readLineCurrentPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeLineCurrentPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLineCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveCurrentPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readActiveCurrentPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeActiveCurrentPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReactiveCurrentPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readReactiveCurrentPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeReactiveCurrentPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReactiveCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltagePhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltagePhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltagePhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltagePhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMinPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMinPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMinPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMaxPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMaxPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMaxPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMinPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMinPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMinPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMaxPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMaxPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMaxPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMinPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMinPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMinPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMinPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMaxPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMaxPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMaxPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMaxPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReactivePowerPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readReactivePowerPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeReactivePowerPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReactivePowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApparentPowerPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readApparentPowerPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeApparentPowerPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApparentPowerPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerFactorPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readPowerFactorPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribePowerFactorPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePowerFactorPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsVoltageMeasurementPeriodPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsVoltageMeasurementPeriodPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsOverVoltageCounterPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsOverVoltageCounterPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsOverVoltageCounterPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsOverVoltageCounterPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsUnderVoltageCounterPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsUnderVoltageCounterPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsUnderVoltageCounterPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsUnderVoltageCounterPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeOverVoltagePeriodPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeOverVoltagePeriodPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeUnderVoltagePeriodPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeUnderVoltagePeriodPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSagPeriodPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSagPeriodPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSagPeriodPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSagPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSwellPeriodPhaseBAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSwellPeriodPhaseBAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSwellPeriodPhaseBAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSwellPeriodPhaseBAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLineCurrentPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readLineCurrentPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeLineCurrentPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLineCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActiveCurrentPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readActiveCurrentPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeActiveCurrentPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActiveCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReactiveCurrentPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readReactiveCurrentPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeReactiveCurrentPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReactiveCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltagePhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltagePhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltagePhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltagePhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMinPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMinPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMinPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageMaxPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageMaxPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageMaxPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMinPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMinPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMinPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsCurrentMaxPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsCurrentMaxPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsCurrentMaxPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsCurrentMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMinPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMinPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMinPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMinPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readActivePowerMaxPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readActivePowerMaxPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeActivePowerMaxPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeActivePowerMaxPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readReactivePowerPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readReactivePowerPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeReactivePowerPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeReactivePowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readApparentPowerPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readApparentPowerPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeApparentPowerPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeApparentPowerPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readPowerFactorPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readPowerFactorPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribePowerFactorPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribePowerFactorPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsVoltageMeasurementPeriodPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsVoltageMeasurementPeriodPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsOverVoltageCounterPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsOverVoltageCounterPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsOverVoltageCounterPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsOverVoltageCounterPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAverageRmsUnderVoltageCounterPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readAverageRmsUnderVoltageCounterPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeAverageRmsUnderVoltageCounterPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeAverageRmsUnderVoltageCounterPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeOverVoltagePeriodPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeOverVoltagePeriodPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsExtremeUnderVoltagePeriodPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsExtremeUnderVoltagePeriodPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSagPeriodPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSagPeriodPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSagPeriodPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSagPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRmsVoltageSwellPeriodPhaseCAttribute( + IntegerAttributeCallback callback + ) { + readRmsVoltageSwellPeriodPhaseCAttribute(chipClusterPtr, callback); + } + public void subscribeRmsVoltageSwellPeriodPhaseCAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRmsVoltageSwellPeriodPhaseCAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMeasurementTypeAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeMeasurementTypeAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcVoltageMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcVoltageMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcVoltageMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcVoltageMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcCurrentMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcCurrentMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcCurrentMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcCurrentMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcPowerMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcPowerMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcPowerMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcPowerMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcVoltageMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcVoltageMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcVoltageDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcVoltageDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcCurrentDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcCurrentDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcPowerMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcPowerMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readDcPowerDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeDcPowerDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcFrequencyAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcFrequencyMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcFrequencyMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcFrequencyMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcFrequencyMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNeutralCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeNeutralCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTotalActivePowerAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTotalActivePowerAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTotalReactivePowerAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTotalReactivePowerAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readTotalApparentPowerAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeTotalApparentPowerAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured1stHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured1stHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured3rdHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured3rdHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured5thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured5thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured7thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured7thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured9thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured9thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasured11thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasured11thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase1stHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase1stHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase3rdHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase3rdHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase5thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase5thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase7thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase7thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase9thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase9thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readMeasuredPhase11thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeMeasuredPhase11thHarmonicCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcFrequencyMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcFrequencyMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcFrequencyDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcFrequencyDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPowerMultiplierAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePowerMultiplierAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPowerDivisorAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribePowerDivisorAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readHarmonicCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeHarmonicCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPhaseHarmonicCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePhaseHarmonicCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstantaneousVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstantaneousVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstantaneousLineCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstantaneousLineCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstantaneousActiveCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstantaneousActiveCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstantaneousReactiveCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstantaneousReactiveCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInstantaneousPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeInstantaneousPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMinAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMaxAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReactivePowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeReactivePowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApparentPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeApparentPowerAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPowerFactorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePowerFactorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAverageRmsVoltageMeasurementPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAverageRmsUnderVoltageCounterAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRmsExtremeOverVoltagePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRmsExtremeUnderVoltagePeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSagPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRmsVoltageSagPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRmsVoltageSagPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSwellPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRmsVoltageSwellPeriodAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRmsVoltageSwellPeriodAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcVoltageMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcVoltageMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcVoltageDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcVoltageDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcCurrentMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcCurrentDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcCurrentDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcPowerMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcPowerMultiplierAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcPowerDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcPowerDivisorAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOverloadAlarmsMaskAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeOverloadAlarmsMaskAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOverloadAlarmsMaskAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVoltageOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeVoltageOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCurrentOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeCurrentOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcOverloadAlarmsMaskAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeAcOverloadAlarmsMaskAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeAcOverloadAlarmsMaskAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcVoltageOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcVoltageOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcCurrentOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcCurrentOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcActivePowerOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcActivePowerOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAcReactivePowerOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAcReactivePowerOverloadAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsOverVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsOverVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsUnderVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsUnderVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeOverVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeOverVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeUnderVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeUnderVoltageAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSagAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSagAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSwellAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSwellAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLineCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLineCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActiveCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReactiveCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeReactiveCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltagePhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltagePhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMinPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMaxPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReactivePowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeReactivePowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApparentPowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeApparentPowerPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPowerFactorPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePowerFactorPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsVoltageMeasurementPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsOverVoltageCounterPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsOverVoltageCounterPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsUnderVoltageCounterPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsUnderVoltageCounterPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeOverVoltagePeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeUnderVoltagePeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSagPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSagPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSwellPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSwellPeriodPhaseBAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLineCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeLineCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActiveCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActiveCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReactiveCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeReactiveCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltagePhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltagePhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsCurrentMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsCurrentMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMinPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readActivePowerMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeActivePowerMaxPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readReactivePowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeReactivePowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readApparentPowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeApparentPowerPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readPowerFactorPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribePowerFactorPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsVoltageMeasurementPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsOverVoltageCounterPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsOverVoltageCounterPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readAverageRmsUnderVoltageCounterPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeAverageRmsUnderVoltageCounterPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeOverVoltagePeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsExtremeUnderVoltagePeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSagPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSagPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRmsVoltageSwellPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeRmsVoltageSwellPeriodPhaseCAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class UnitTestingCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0xFFF1FC05L; + + public UnitTestingCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void test(DefaultClusterCallback callback + ) { + test(chipClusterPtr, callback, null); + } + + public void test(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + test(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void testNotHandled(DefaultClusterCallback callback + ) { + testNotHandled(chipClusterPtr, callback, null); + } + + public void testNotHandled(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + testNotHandled(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void testSpecific(TestSpecificResponseCallback callback + ) { + testSpecific(chipClusterPtr, callback, null); + } + + public void testSpecific(TestSpecificResponseCallback callback + + , int timedInvokeTimeoutMs) { + testSpecific(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void testUnknownCommand(DefaultClusterCallback callback + ) { + testUnknownCommand(chipClusterPtr, callback, null); + } + + public void testUnknownCommand(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + testUnknownCommand(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void testAddArguments(TestAddArgumentsResponseCallback callback + , Integer arg1, Integer arg2) { + testAddArguments(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testAddArguments(TestAddArgumentsResponseCallback callback + , Integer arg1, Integer arg2 + , int timedInvokeTimeoutMs) { + testAddArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); + } + + public void testSimpleArgumentRequest(TestSimpleArgumentResponseCallback callback + , Boolean arg1) { + testSimpleArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testSimpleArgumentRequest(TestSimpleArgumentResponseCallback callback + , Boolean arg1 + , int timedInvokeTimeoutMs) { + testSimpleArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testStructArrayArgumentRequest(TestStructArrayArgumentResponseCallback callback + , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6) { + testStructArrayArgumentRequest(chipClusterPtr, callback, arg1, arg2, arg3, arg4, arg5, arg6, null); + } + + public void testStructArrayArgumentRequest(TestStructArrayArgumentResponseCallback callback + , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6 + , int timedInvokeTimeoutMs) { + testStructArrayArgumentRequest(chipClusterPtr, callback, arg1, arg2, arg3, arg4, arg5, arg6, timedInvokeTimeoutMs); + } + + public void testStructArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1) { + testStructArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testStructArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1 + , int timedInvokeTimeoutMs) { + testStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testNestedStructArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterNestedStruct arg1) { + testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testNestedStructArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterNestedStruct arg1 + , int timedInvokeTimeoutMs) { + testNestedStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testListStructArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1) { + testListStructArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListStructArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1 + , int timedInvokeTimeoutMs) { + testListStructArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testListInt8UArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1) { + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1 + , int timedInvokeTimeoutMs) { + testListInt8UArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testNestedStructListArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterNestedStructList arg1) { + testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testNestedStructListArgumentRequest(BooleanResponseCallback callback + , ChipStructs.UnitTestingClusterNestedStructList arg1 + , int timedInvokeTimeoutMs) { + testNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testListNestedStructListArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1) { + testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListNestedStructListArgumentRequest(BooleanResponseCallback callback + , ArrayList arg1 + , int timedInvokeTimeoutMs) { + testListNestedStructListArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testListInt8UReverseRequest(TestListInt8UReverseResponseCallback callback + , ArrayList arg1) { + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, null); + } + + public void testListInt8UReverseRequest(TestListInt8UReverseResponseCallback callback + , ArrayList arg1 + , int timedInvokeTimeoutMs) { + testListInt8UReverseRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testEnumsRequest(TestEnumsResponseCallback callback + , Integer arg1, Integer arg2) { + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, null); + } + + public void testEnumsRequest(TestEnumsResponseCallback callback + , Integer arg1, Integer arg2 + , int timedInvokeTimeoutMs) { + testEnumsRequest(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); + } + + public void testNullableOptionalRequest(TestNullableOptionalResponseCallback callback + , @Nullable Optional arg1) { + testNullableOptionalRequest(chipClusterPtr, callback, arg1, null); + } + + public void testNullableOptionalRequest(TestNullableOptionalResponseCallback callback + , @Nullable Optional arg1 + , int timedInvokeTimeoutMs) { + testNullableOptionalRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testComplexNullableOptionalRequest(TestComplexNullableOptionalResponseCallback callback + , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList) { + testComplexNullableOptionalRequest(chipClusterPtr, callback, nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList, null); + } + + public void testComplexNullableOptionalRequest(TestComplexNullableOptionalResponseCallback callback + , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList + , int timedInvokeTimeoutMs) { + testComplexNullableOptionalRequest(chipClusterPtr, callback, nullableInt, optionalInt, nullableOptionalInt, nullableString, optionalString, nullableOptionalString, nullableStruct, optionalStruct, nullableOptionalStruct, nullableList, optionalList, nullableOptionalList, timedInvokeTimeoutMs); + } + + public void simpleStructEchoRequest(SimpleStructResponseCallback callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1) { + simpleStructEchoRequest(chipClusterPtr, callback, arg1, null); + } + + public void simpleStructEchoRequest(SimpleStructResponseCallback callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1 + , int timedInvokeTimeoutMs) { + simpleStructEchoRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + + public void timedInvokeRequest(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + timedInvokeRequest(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void testSimpleOptionalArgumentRequest(DefaultClusterCallback callback + , Optional arg1) { + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, null); + } + + public void testSimpleOptionalArgumentRequest(DefaultClusterCallback callback + , Optional arg1 + , int timedInvokeTimeoutMs) { + testSimpleOptionalArgumentRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + + public void testEmitTestEventRequest(TestEmitTestEventResponseCallback callback + , Integer arg1, Integer arg2, Boolean arg3) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, null); + } + + public void testEmitTestEventRequest(TestEmitTestEventResponseCallback callback + , Integer arg1, Integer arg2, Boolean arg3 + , int timedInvokeTimeoutMs) { + testEmitTestEventRequest(chipClusterPtr, callback, arg1, arg2, arg3, timedInvokeTimeoutMs); + } + + public void testEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventResponseCallback callback + , Integer arg1) { + testEmitTestFabricScopedEventRequest(chipClusterPtr, callback, arg1, null); + } + + public void testEmitTestFabricScopedEventRequest(TestEmitTestFabricScopedEventResponseCallback callback + , Integer arg1 + , int timedInvokeTimeoutMs) { + testEmitTestFabricScopedEventRequest(chipClusterPtr, callback, arg1, timedInvokeTimeoutMs); + } + private native void test(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void testNotHandled(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void testSpecific(long chipClusterPtr, TestSpecificResponseCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void testUnknownCommand(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void testAddArguments(long chipClusterPtr, TestAddArgumentsResponseCallback Callback + , Integer arg1, Integer arg2 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testSimpleArgumentRequest(long chipClusterPtr, TestSimpleArgumentResponseCallback Callback + , Boolean arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testStructArrayArgumentRequest(long chipClusterPtr, TestStructArrayArgumentResponseCallback Callback + , ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testNestedStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ChipStructs.UnitTestingClusterNestedStruct arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testListStructArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ArrayList arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testListInt8UArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ArrayList arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testNestedStructListArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ChipStructs.UnitTestingClusterNestedStructList arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testListNestedStructListArgumentRequest(long chipClusterPtr, BooleanResponseCallback Callback + , ArrayList arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testListInt8UReverseRequest(long chipClusterPtr, TestListInt8UReverseResponseCallback Callback + , ArrayList arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testEnumsRequest(long chipClusterPtr, TestEnumsResponseCallback Callback + , Integer arg1, Integer arg2 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testNullableOptionalRequest(long chipClusterPtr, TestNullableOptionalResponseCallback Callback + , @Nullable Optional arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testComplexNullableOptionalRequest(long chipClusterPtr, TestComplexNullableOptionalResponseCallback Callback + , @Nullable Integer nullableInt, Optional optionalInt, @Nullable Optional nullableOptionalInt, @Nullable String nullableString, Optional optionalString, @Nullable Optional nullableOptionalString, @Nullable ChipStructs.UnitTestingClusterSimpleStruct nullableStruct, Optional optionalStruct, @Nullable Optional nullableOptionalStruct, @Nullable ArrayList nullableList, Optional> optionalList, @Nullable Optional> nullableOptionalList + , @Nullable Integer timedInvokeTimeoutMs); + private native void simpleStructEchoRequest(long chipClusterPtr, SimpleStructResponseCallback Callback + , ChipStructs.UnitTestingClusterSimpleStruct arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void timedInvokeRequest(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void testSimpleOptionalArgumentRequest(long chipClusterPtr, DefaultClusterCallback Callback + , Optional arg1 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testEmitTestEventRequest(long chipClusterPtr, TestEmitTestEventResponseCallback Callback + , Integer arg1, Integer arg2, Boolean arg3 + , @Nullable Integer timedInvokeTimeoutMs); + private native void testEmitTestFabricScopedEventRequest(long chipClusterPtr, TestEmitTestFabricScopedEventResponseCallback Callback + , Integer arg1 + , @Nullable Integer timedInvokeTimeoutMs); + public interface TestSpecificResponseCallback { + void onSuccess(Integer returnValue); + + void onError(Exception error); + } + + public interface TestAddArgumentsResponseCallback { + void onSuccess(Integer returnValue); + + void onError(Exception error); + } + + public interface TestSimpleArgumentResponseCallback { + void onSuccess(Boolean returnValue); + + void onError(Exception error); + } + + public interface TestStructArrayArgumentResponseCallback { + void onSuccess(ArrayList arg1, ArrayList arg2, ArrayList arg3, ArrayList arg4, Integer arg5, Boolean arg6); + + void onError(Exception error); + } + + public interface TestListInt8UReverseResponseCallback { + void onSuccess(ArrayList arg1); + + void onError(Exception error); + } + + public interface TestEnumsResponseCallback { + void onSuccess(Integer arg1, Integer arg2); + + void onError(Exception error); + } + + public interface TestNullableOptionalResponseCallback { + void onSuccess(Boolean wasPresent, Optional wasNull, Optional value, @Nullable Optional originalValue); + + void onError(Exception error); + } + + public interface TestComplexNullableOptionalResponseCallback { + void onSuccess(Boolean nullableIntWasNull, Optional nullableIntValue, Boolean optionalIntWasPresent, Optional optionalIntValue, Boolean nullableOptionalIntWasPresent, Optional nullableOptionalIntWasNull, Optional nullableOptionalIntValue, Boolean nullableStringWasNull, Optional nullableStringValue, Boolean optionalStringWasPresent, Optional optionalStringValue, Boolean nullableOptionalStringWasPresent, Optional nullableOptionalStringWasNull, Optional nullableOptionalStringValue, Boolean nullableStructWasNull, Optional nullableStructValue, Boolean optionalStructWasPresent, Optional optionalStructValue, Boolean nullableOptionalStructWasPresent, Optional nullableOptionalStructWasNull, Optional nullableOptionalStructValue, Boolean nullableListWasNull, Optional> nullableListValue, Boolean optionalListWasPresent, Optional> optionalListValue, Boolean nullableOptionalListWasPresent, Optional nullableOptionalListWasNull, Optional> nullableOptionalListValue); + + void onError(Exception error); + } + + public interface BooleanResponseCallback { + void onSuccess(Boolean value); + + void onError(Exception error); + } + + public interface SimpleStructResponseCallback { + void onSuccess(ChipStructs.UnitTestingClusterSimpleStruct arg1); + + void onError(Exception error); + } + + public interface TestEmitTestEventResponseCallback { + void onSuccess(Long value); + + void onError(Exception error); + } + + public interface TestEmitTestFabricScopedEventResponseCallback { + void onSuccess(Long value); + + void onError(Exception error); + } + + + public interface ListInt8uAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ListOctetStringAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ListStructOctetStringAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ListNullablesAndOptionalsStructAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ListLongOctetStringAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface ListFabricScopedAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableBooleanAttributeCallback { + void onSuccess(@Nullable Boolean value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableBitmap8AttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableBitmap16AttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableBitmap32AttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableBitmap64AttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt8uAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt16uAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt24uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt32uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt40uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt48uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt56uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt64uAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt8sAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt16sAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt24sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt32sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt40sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt48sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt56sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableInt64sAttributeCallback { + void onSuccess(@Nullable Long value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableEnum8AttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableEnum16AttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableFloatSingleAttributeCallback { + void onSuccess(@Nullable Float value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableFloatDoubleAttributeCallback { + void onSuccess(@Nullable Double value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableOctetStringAttributeCallback { + void onSuccess(@Nullable byte[] value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableCharStringAttributeCallback { + void onSuccess(@Nullable String value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableEnumAttrAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableRangeRestrictedInt8uAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableRangeRestrictedInt8sAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableRangeRestrictedInt16uAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface NullableRangeRestrictedInt16sAttributeCallback { + void onSuccess(@Nullable Integer value); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readBooleanAttribute( + BooleanAttributeCallback callback + ) { + readBooleanAttribute(chipClusterPtr, callback); + } + public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value) { + writeBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBooleanAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBitmap8Attribute( + IntegerAttributeCallback callback + ) { + readBitmap8Attribute(chipClusterPtr, callback); + } + public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value) { + writeBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBitmap8Attribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBitmap8Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBitmap16Attribute( + IntegerAttributeCallback callback + ) { + readBitmap16Attribute(chipClusterPtr, callback); + } + public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value) { + writeBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBitmap16Attribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBitmap16Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBitmap32Attribute( + LongAttributeCallback callback + ) { + readBitmap32Attribute(chipClusterPtr, callback); + } + public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value) { + writeBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap32Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBitmap32Attribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBitmap32Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readBitmap64Attribute( + LongAttributeCallback callback + ) { + readBitmap64Attribute(chipClusterPtr, callback); + } + public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value) { + writeBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeBitmap64Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeBitmap64Attribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeBitmap64Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt8uAttribute( + IntegerAttributeCallback callback + ) { + readInt8uAttribute(chipClusterPtr, callback); + } + public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt8uAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt16uAttribute( + IntegerAttributeCallback callback + ) { + readInt16uAttribute(chipClusterPtr, callback); + } + public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value) { + writeInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt16uAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt24uAttribute( + LongAttributeCallback callback + ) { + readInt24uAttribute(chipClusterPtr, callback); + } + public void writeInt24uAttribute(DefaultClusterCallback callback, Long value) { + writeInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt24uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt24uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt32uAttribute( + LongAttributeCallback callback + ) { + readInt32uAttribute(chipClusterPtr, callback); + } + public void writeInt32uAttribute(DefaultClusterCallback callback, Long value) { + writeInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt32uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt32uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt40uAttribute( + LongAttributeCallback callback + ) { + readInt40uAttribute(chipClusterPtr, callback); + } + public void writeInt40uAttribute(DefaultClusterCallback callback, Long value) { + writeInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt40uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt40uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt48uAttribute( + LongAttributeCallback callback + ) { + readInt48uAttribute(chipClusterPtr, callback); + } + public void writeInt48uAttribute(DefaultClusterCallback callback, Long value) { + writeInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt48uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt48uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt56uAttribute( + LongAttributeCallback callback + ) { + readInt56uAttribute(chipClusterPtr, callback); + } + public void writeInt56uAttribute(DefaultClusterCallback callback, Long value) { + writeInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt56uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt56uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt64uAttribute( + LongAttributeCallback callback + ) { + readInt64uAttribute(chipClusterPtr, callback); + } + public void writeInt64uAttribute(DefaultClusterCallback callback, Long value) { + writeInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt64uAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt64uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt8sAttribute( + IntegerAttributeCallback callback + ) { + readInt8sAttribute(chipClusterPtr, callback); + } + public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value) { + writeInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt8sAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt16sAttribute( + IntegerAttributeCallback callback + ) { + readInt16sAttribute(chipClusterPtr, callback); + } + public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value) { + writeInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt16sAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt24sAttribute( + LongAttributeCallback callback + ) { + readInt24sAttribute(chipClusterPtr, callback); + } + public void writeInt24sAttribute(DefaultClusterCallback callback, Long value) { + writeInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt24sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt24sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt24sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt32sAttribute( + LongAttributeCallback callback + ) { + readInt32sAttribute(chipClusterPtr, callback); + } + public void writeInt32sAttribute(DefaultClusterCallback callback, Long value) { + writeInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt32sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt32sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt32sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt40sAttribute( + LongAttributeCallback callback + ) { + readInt40sAttribute(chipClusterPtr, callback); + } + public void writeInt40sAttribute(DefaultClusterCallback callback, Long value) { + writeInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt40sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt40sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt40sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt48sAttribute( + LongAttributeCallback callback + ) { + readInt48sAttribute(chipClusterPtr, callback); + } + public void writeInt48sAttribute(DefaultClusterCallback callback, Long value) { + writeInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt48sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt48sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt48sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt56sAttribute( + LongAttributeCallback callback + ) { + readInt56sAttribute(chipClusterPtr, callback); + } + public void writeInt56sAttribute(DefaultClusterCallback callback, Long value) { + writeInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt56sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt56sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt56sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readInt64sAttribute( + LongAttributeCallback callback + ) { + readInt64sAttribute(chipClusterPtr, callback); + } + public void writeInt64sAttribute(DefaultClusterCallback callback, Long value) { + writeInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeInt64sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeInt64sAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeInt64sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnum8Attribute( + IntegerAttributeCallback callback + ) { + readEnum8Attribute(chipClusterPtr, callback); + } + public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value) { + writeEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnum8Attribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnum8Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnum16Attribute( + IntegerAttributeCallback callback + ) { + readEnum16Attribute(chipClusterPtr, callback); + } + public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value) { + writeEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeEnum16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnum16Attribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnum16Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFloatSingleAttribute( + FloatAttributeCallback callback + ) { + readFloatSingleAttribute(chipClusterPtr, callback); + } + public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value) { + writeFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatSingleAttribute(DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { + writeFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeFloatSingleAttribute( + FloatAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFloatSingleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFloatDoubleAttribute( + DoubleAttributeCallback callback + ) { + readFloatDoubleAttribute(chipClusterPtr, callback); + } + public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { + writeFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFloatDoubleAttribute(DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { + writeFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeFloatDoubleAttribute( + DoubleAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFloatDoubleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readOctetStringAttribute( + OctetStringAttributeCallback callback + ) { + readOctetStringAttribute(chipClusterPtr, callback); + } + public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { + writeOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeOctetStringAttribute( + OctetStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListInt8uAttribute( + ListInt8uAttributeCallback callback + ) { + readListInt8uAttribute(chipClusterPtr, callback); + } + public void writeListInt8uAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListInt8uAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListInt8uAttribute( + ListInt8uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListOctetStringAttribute( + ListOctetStringAttributeCallback callback + ) { + readListOctetStringAttribute(chipClusterPtr, callback); + } + public void writeListOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListOctetStringAttribute( + ListOctetStringAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListStructOctetStringAttribute( + ListStructOctetStringAttributeCallback callback + ) { + readListStructOctetStringAttribute(chipClusterPtr, callback); + } + public void writeListStructOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListStructOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListStructOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListStructOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListStructOctetStringAttribute( + ListStructOctetStringAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListStructOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLongOctetStringAttribute( + OctetStringAttributeCallback callback + ) { + readLongOctetStringAttribute(chipClusterPtr, callback); + } + public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { + writeLongOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLongOctetStringAttribute( + OctetStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLongOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readCharStringAttribute( + CharStringAttributeCallback callback + ) { + readCharStringAttribute(chipClusterPtr, callback); + } + public void writeCharStringAttribute(DefaultClusterCallback callback, String value) { + writeCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeCharStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLongCharStringAttribute( + CharStringAttributeCallback callback + ) { + readLongCharStringAttribute(chipClusterPtr, callback); + } + public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value) { + writeLongCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeLongCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeLongCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeLongCharStringAttribute( + CharStringAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLongCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEpochUsAttribute( + LongAttributeCallback callback + ) { + readEpochUsAttribute(chipClusterPtr, callback); + } + public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value) { + writeEpochUsAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochUsAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochUsAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEpochUsAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEpochUsAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEpochSAttribute( + LongAttributeCallback callback + ) { + readEpochSAttribute(chipClusterPtr, callback); + } + public void writeEpochSAttribute(DefaultClusterCallback callback, Long value) { + writeEpochSAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEpochSAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeEpochSAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEpochSAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEpochSAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readVendorIdAttribute( + IntegerAttributeCallback callback + ) { + readVendorIdAttribute(chipClusterPtr, callback); + } + public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value) { + writeVendorIdAttribute(chipClusterPtr, callback, value, null); + } + + public void writeVendorIdAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeVendorIdAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeVendorIdAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeVendorIdAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListNullablesAndOptionalsStructAttribute( + ListNullablesAndOptionalsStructAttributeCallback callback + ) { + readListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback); + } + public void writeListNullablesAndOptionalsStructAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListNullablesAndOptionalsStructAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListNullablesAndOptionalsStructAttribute( + ListNullablesAndOptionalsStructAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListNullablesAndOptionalsStructAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEnumAttrAttribute( + IntegerAttributeCallback callback + ) { + readEnumAttrAttribute(chipClusterPtr, callback); + } + public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { + writeEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeEnumAttrAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeEnumAttrAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeEnumAttrAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRangeRestrictedInt8uAttribute( + IntegerAttributeCallback callback + ) { + readRangeRestrictedInt8uAttribute(chipClusterPtr, callback); + } + public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRangeRestrictedInt8uAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRangeRestrictedInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRangeRestrictedInt8sAttribute( + IntegerAttributeCallback callback + ) { + readRangeRestrictedInt8sAttribute(chipClusterPtr, callback); + } + public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRangeRestrictedInt8sAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRangeRestrictedInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRangeRestrictedInt16uAttribute( + IntegerAttributeCallback callback + ) { + readRangeRestrictedInt16uAttribute(chipClusterPtr, callback); + } + public void writeRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value) { + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRangeRestrictedInt16uAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRangeRestrictedInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readRangeRestrictedInt16sAttribute( + IntegerAttributeCallback callback + ) { + readRangeRestrictedInt16sAttribute(chipClusterPtr, callback); + } + public void writeRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value) { + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeRangeRestrictedInt16sAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeRangeRestrictedInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListLongOctetStringAttribute( + ListLongOctetStringAttributeCallback callback + ) { + readListLongOctetStringAttribute(chipClusterPtr, callback); + } + public void writeListLongOctetStringAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListLongOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListLongOctetStringAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListLongOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListLongOctetStringAttribute( + ListLongOctetStringAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListLongOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readListFabricScopedAttribute( + ListFabricScopedAttributeCallback callback + ) { + readListFabricScopedAttribute(chipClusterPtr, callback, true); + } + public void readListFabricScopedAttributeWithFabricFilter( + ListFabricScopedAttributeCallback callback + , + boolean isFabricFiltered + ) { + readListFabricScopedAttribute(chipClusterPtr, callback, isFabricFiltered); + } + public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value) { + writeListFabricScopedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeListFabricScopedAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + writeListFabricScopedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeListFabricScopedAttribute( + ListFabricScopedAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeListFabricScopedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readTimedWriteBooleanAttribute( + BooleanAttributeCallback callback + ) { + readTimedWriteBooleanAttribute(chipClusterPtr, callback); + } + + public void writeTimedWriteBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeTimedWriteBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeTimedWriteBooleanAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeTimedWriteBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneralErrorBooleanAttribute( + BooleanAttributeCallback callback + ) { + readGeneralErrorBooleanAttribute(chipClusterPtr, callback); + } + public void writeGeneralErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value) { + writeGeneralErrorBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeGeneralErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeGeneralErrorBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeGeneralErrorBooleanAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeGeneralErrorBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterErrorBooleanAttribute( + BooleanAttributeCallback callback + ) { + readClusterErrorBooleanAttribute(chipClusterPtr, callback); + } + public void writeClusterErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value) { + writeClusterErrorBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeClusterErrorBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeClusterErrorBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeClusterErrorBooleanAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterErrorBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readUnsupportedAttribute( + BooleanAttributeCallback callback + ) { + readUnsupportedAttribute(chipClusterPtr, callback); + } + public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value) { + writeUnsupportedAttribute(chipClusterPtr, callback, value, null); + } + + public void writeUnsupportedAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeUnsupportedAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeUnsupportedAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeUnsupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableBooleanAttribute( + NullableBooleanAttributeCallback callback + ) { + readNullableBooleanAttribute(chipClusterPtr, callback); + } + public void writeNullableBooleanAttribute(DefaultClusterCallback callback, Boolean value) { + writeNullableBooleanAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBooleanAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeNullableBooleanAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableBooleanAttribute( + NullableBooleanAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableBooleanAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableBitmap8Attribute( + NullableBitmap8AttributeCallback callback + ) { + readNullableBitmap8Attribute(chipClusterPtr, callback); + } + public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, Integer value) { + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableBitmap8Attribute( + NullableBitmap8AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableBitmap8Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableBitmap16Attribute( + NullableBitmap16AttributeCallback callback + ) { + readNullableBitmap16Attribute(chipClusterPtr, callback); + } + public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, Integer value) { + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableBitmap16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableBitmap16Attribute( + NullableBitmap16AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableBitmap16Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableBitmap32Attribute( + NullableBitmap32AttributeCallback callback + ) { + readNullableBitmap32Attribute(chipClusterPtr, callback); + } + public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, Long value) { + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap32Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableBitmap32Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableBitmap32Attribute( + NullableBitmap32AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableBitmap32Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableBitmap64Attribute( + NullableBitmap64AttributeCallback callback + ) { + readNullableBitmap64Attribute(chipClusterPtr, callback); + } + public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, Long value) { + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableBitmap64Attribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableBitmap64Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableBitmap64Attribute( + NullableBitmap64AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableBitmap64Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt8uAttribute( + NullableInt8uAttributeCallback callback + ) { + readNullableInt8uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt8uAttribute( + NullableInt8uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt16uAttribute( + NullableInt16uAttributeCallback callback + ) { + readNullableInt16uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt16uAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt16uAttribute( + NullableInt16uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt24uAttribute( + NullableInt24uAttributeCallback callback + ) { + readNullableInt24uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt24uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt24uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt24uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt24uAttribute( + NullableInt24uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt24uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt32uAttribute( + NullableInt32uAttributeCallback callback + ) { + readNullableInt32uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt32uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt32uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt32uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt32uAttribute( + NullableInt32uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt32uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt40uAttribute( + NullableInt40uAttributeCallback callback + ) { + readNullableInt40uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt40uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt40uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt40uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt40uAttribute( + NullableInt40uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt40uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt48uAttribute( + NullableInt48uAttributeCallback callback + ) { + readNullableInt48uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt48uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt48uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt48uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt48uAttribute( + NullableInt48uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt48uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt56uAttribute( + NullableInt56uAttributeCallback callback + ) { + readNullableInt56uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt56uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt56uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt56uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt56uAttribute( + NullableInt56uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt56uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt64uAttribute( + NullableInt64uAttributeCallback callback + ) { + readNullableInt64uAttribute(chipClusterPtr, callback); + } + public void writeNullableInt64uAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt64uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64uAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt64uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt64uAttribute( + NullableInt64uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt64uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt8sAttribute( + NullableInt8sAttributeCallback callback + ) { + readNullableInt8sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt8sAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt8sAttribute( + NullableInt8sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt16sAttribute( + NullableInt16sAttributeCallback callback + ) { + readNullableInt16sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt16sAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt16sAttribute( + NullableInt16sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt24sAttribute( + NullableInt24sAttributeCallback callback + ) { + readNullableInt24sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt24sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt24sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt24sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt24sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt24sAttribute( + NullableInt24sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt24sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt32sAttribute( + NullableInt32sAttributeCallback callback + ) { + readNullableInt32sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt32sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt32sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt32sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt32sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt32sAttribute( + NullableInt32sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt32sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt40sAttribute( + NullableInt40sAttributeCallback callback + ) { + readNullableInt40sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt40sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt40sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt40sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt40sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt40sAttribute( + NullableInt40sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt40sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt48sAttribute( + NullableInt48sAttributeCallback callback + ) { + readNullableInt48sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt48sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt48sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt48sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt48sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt48sAttribute( + NullableInt48sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt48sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt56sAttribute( + NullableInt56sAttributeCallback callback + ) { + readNullableInt56sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt56sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt56sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt56sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt56sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt56sAttribute( + NullableInt56sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt56sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableInt64sAttribute( + NullableInt64sAttributeCallback callback + ) { + readNullableInt64sAttribute(chipClusterPtr, callback); + } + public void writeNullableInt64sAttribute(DefaultClusterCallback callback, Long value) { + writeNullableInt64sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableInt64sAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + writeNullableInt64sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableInt64sAttribute( + NullableInt64sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableInt64sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableEnum8Attribute( + NullableEnum8AttributeCallback callback + ) { + readNullableEnum8Attribute(chipClusterPtr, callback); + } + public void writeNullableEnum8Attribute(DefaultClusterCallback callback, Integer value) { + writeNullableEnum8Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum8Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableEnum8Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableEnum8Attribute( + NullableEnum8AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableEnum8Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableEnum16Attribute( + NullableEnum16AttributeCallback callback + ) { + readNullableEnum16Attribute(chipClusterPtr, callback); + } + public void writeNullableEnum16Attribute(DefaultClusterCallback callback, Integer value) { + writeNullableEnum16Attribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnum16Attribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableEnum16Attribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableEnum16Attribute( + NullableEnum16AttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableEnum16Attribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableFloatSingleAttribute( + NullableFloatSingleAttributeCallback callback + ) { + readNullableFloatSingleAttribute(chipClusterPtr, callback); + } + public void writeNullableFloatSingleAttribute(DefaultClusterCallback callback, Float value) { + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatSingleAttribute(DefaultClusterCallback callback, Float value, int timedWriteTimeoutMs) { + writeNullableFloatSingleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableFloatSingleAttribute( + NullableFloatSingleAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableFloatSingleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableFloatDoubleAttribute( + NullableFloatDoubleAttributeCallback callback + ) { + readNullableFloatDoubleAttribute(chipClusterPtr, callback); + } + public void writeNullableFloatDoubleAttribute(DefaultClusterCallback callback, Double value) { + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableFloatDoubleAttribute(DefaultClusterCallback callback, Double value, int timedWriteTimeoutMs) { + writeNullableFloatDoubleAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableFloatDoubleAttribute( + NullableFloatDoubleAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableFloatDoubleAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableOctetStringAttribute( + NullableOctetStringAttributeCallback callback + ) { + readNullableOctetStringAttribute(chipClusterPtr, callback); + } + public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value) { + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableOctetStringAttribute(DefaultClusterCallback callback, byte[] value, int timedWriteTimeoutMs) { + writeNullableOctetStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableOctetStringAttribute( + NullableOctetStringAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableOctetStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableCharStringAttribute( + NullableCharStringAttributeCallback callback + ) { + readNullableCharStringAttribute(chipClusterPtr, callback); + } + public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value) { + writeNullableCharStringAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableCharStringAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { + writeNullableCharStringAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableCharStringAttribute( + NullableCharStringAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableCharStringAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableEnumAttrAttribute( + NullableEnumAttrAttributeCallback callback + ) { + readNullableEnumAttrAttribute(chipClusterPtr, callback); + } + public void writeNullableEnumAttrAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableEnumAttrAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableEnumAttrAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableEnumAttrAttribute( + NullableEnumAttrAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableEnumAttrAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableRangeRestrictedInt8uAttribute( + NullableRangeRestrictedInt8uAttributeCallback callback + ) { + readNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback); + } + public void writeNullableRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableRangeRestrictedInt8uAttribute( + NullableRangeRestrictedInt8uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableRangeRestrictedInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableRangeRestrictedInt8sAttribute( + NullableRangeRestrictedInt8sAttributeCallback callback + ) { + readNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback); + } + public void writeNullableRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt8sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableRangeRestrictedInt8sAttribute( + NullableRangeRestrictedInt8sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableRangeRestrictedInt8sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableRangeRestrictedInt16uAttribute( + NullableRangeRestrictedInt16uAttributeCallback callback + ) { + readNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback); + } + public void writeNullableRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableRangeRestrictedInt16uAttribute( + NullableRangeRestrictedInt16uAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableRangeRestrictedInt16uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readNullableRangeRestrictedInt16sAttribute( + NullableRangeRestrictedInt16sAttributeCallback callback + ) { + readNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback); + } + public void writeNullableRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value) { + writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, null); + } + + public void writeNullableRangeRestrictedInt16sAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeNullableRangeRestrictedInt16sAttribute( + NullableRangeRestrictedInt16sAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeNullableRangeRestrictedInt16sAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readWriteOnlyInt8uAttribute( + IntegerAttributeCallback callback + ) { + readWriteOnlyInt8uAttribute(chipClusterPtr, callback); + } + public void writeWriteOnlyInt8uAttribute(DefaultClusterCallback callback, Integer value) { + writeWriteOnlyInt8uAttribute(chipClusterPtr, callback, value, null); + } + + public void writeWriteOnlyInt8uAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + writeWriteOnlyInt8uAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeWriteOnlyInt8uAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeWriteOnlyInt8uAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBitmap8Attribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBitmap8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBitmap8Attribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBitmap16Attribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeBitmap16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBitmap16Attribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBitmap32Attribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeBitmap32Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBitmap32Attribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readBitmap64Attribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeBitmap64Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeBitmap64Attribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt16uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt16uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt24uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt24uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt24uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt32uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt32uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt32uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt40uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt40uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt40uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt48uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt48uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt48uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt56uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt56uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt56uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt64uAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt64uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt64uAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt8sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt8sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt16sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt16sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt24sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt24sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt24sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt32sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt32sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt32sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt40sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt40sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt40sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt48sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt48sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt48sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt56sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt56sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt56sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readInt64sAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeInt64sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeInt64sAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnum8Attribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeEnum8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnum8Attribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEnum16Attribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeEnum16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnum16Attribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readFloatSingleAttribute(long chipClusterPtr, + FloatAttributeCallback callback + ); + + private native void writeFloatSingleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Float value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeFloatSingleAttribute(long chipClusterPtr, + FloatAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readFloatDoubleAttribute(long chipClusterPtr, + DoubleAttributeCallback callback + ); + + private native void writeFloatDoubleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Double value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeFloatDoubleAttribute(long chipClusterPtr, + DoubleAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readOctetStringAttribute(long chipClusterPtr, + OctetStringAttributeCallback callback + ); + + private native void writeOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeOctetStringAttribute(long chipClusterPtr, + OctetStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readListInt8uAttribute(long chipClusterPtr, + ListInt8uAttributeCallback callback + ); + + private native void writeListInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListInt8uAttribute(long chipClusterPtr, + ListInt8uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readListOctetStringAttribute(long chipClusterPtr, + ListOctetStringAttributeCallback callback + ); + + private native void writeListOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListOctetStringAttribute(long chipClusterPtr, + ListOctetStringAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readListStructOctetStringAttribute(long chipClusterPtr, + ListStructOctetStringAttributeCallback callback + ); + + private native void writeListStructOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListStructOctetStringAttribute(long chipClusterPtr, + ListStructOctetStringAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readLongOctetStringAttribute(long chipClusterPtr, + OctetStringAttributeCallback callback + ); + + private native void writeLongOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLongOctetStringAttribute(long chipClusterPtr, + OctetStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readCharStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeCharStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLongCharStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback + ); + + private native void writeLongCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeLongCharStringAttribute(long chipClusterPtr, + CharStringAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEpochUsAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeEpochUsAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEpochUsAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readEpochSAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + + private native void writeEpochSAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEpochSAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readVendorIdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeVendorIdAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeVendorIdAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readListNullablesAndOptionalsStructAttribute(long chipClusterPtr, + ListNullablesAndOptionalsStructAttributeCallback callback + ); + + private native void writeListNullablesAndOptionalsStructAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListNullablesAndOptionalsStructAttribute(long chipClusterPtr, + ListNullablesAndOptionalsStructAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEnumAttrAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeEnumAttrAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeEnumAttrAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRangeRestrictedInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRangeRestrictedInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRangeRestrictedInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRangeRestrictedInt8sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRangeRestrictedInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRangeRestrictedInt8sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRangeRestrictedInt16uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRangeRestrictedInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRangeRestrictedInt16uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readRangeRestrictedInt16sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeRangeRestrictedInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeRangeRestrictedInt16sAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readListLongOctetStringAttribute(long chipClusterPtr, + ListLongOctetStringAttributeCallback callback + ); + + private native void writeListLongOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListLongOctetStringAttribute(long chipClusterPtr, + ListLongOctetStringAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readListFabricScopedAttribute(long chipClusterPtr, + ListFabricScopedAttributeCallback callback + , boolean isFabricFiltered + ); + + private native void writeListFabricScopedAttribute(long chipClusterPtr, DefaultClusterCallback callback, ArrayList value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeListFabricScopedAttribute(long chipClusterPtr, + ListFabricScopedAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readTimedWriteBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeTimedWriteBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeTimedWriteBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneralErrorBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeGeneralErrorBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeGeneralErrorBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterErrorBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeClusterErrorBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeClusterErrorBooleanAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readUnsupportedAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeUnsupportedAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeUnsupportedAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readNullableBooleanAttribute(long chipClusterPtr, + NullableBooleanAttributeCallback callback + ); + + private native void writeNullableBooleanAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableBooleanAttribute(long chipClusterPtr, + NullableBooleanAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableBitmap8Attribute(long chipClusterPtr, + NullableBitmap8AttributeCallback callback + ); + + private native void writeNullableBitmap8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableBitmap8Attribute(long chipClusterPtr, + NullableBitmap8AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableBitmap16Attribute(long chipClusterPtr, + NullableBitmap16AttributeCallback callback + ); + + private native void writeNullableBitmap16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableBitmap16Attribute(long chipClusterPtr, + NullableBitmap16AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableBitmap32Attribute(long chipClusterPtr, + NullableBitmap32AttributeCallback callback + ); + + private native void writeNullableBitmap32Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableBitmap32Attribute(long chipClusterPtr, + NullableBitmap32AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableBitmap64Attribute(long chipClusterPtr, + NullableBitmap64AttributeCallback callback + ); + + private native void writeNullableBitmap64Attribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableBitmap64Attribute(long chipClusterPtr, + NullableBitmap64AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt8uAttribute(long chipClusterPtr, + NullableInt8uAttributeCallback callback + ); + + private native void writeNullableInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt8uAttribute(long chipClusterPtr, + NullableInt8uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt16uAttribute(long chipClusterPtr, + NullableInt16uAttributeCallback callback + ); + + private native void writeNullableInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt16uAttribute(long chipClusterPtr, + NullableInt16uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt24uAttribute(long chipClusterPtr, + NullableInt24uAttributeCallback callback + ); + + private native void writeNullableInt24uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt24uAttribute(long chipClusterPtr, + NullableInt24uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt32uAttribute(long chipClusterPtr, + NullableInt32uAttributeCallback callback + ); + + private native void writeNullableInt32uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt32uAttribute(long chipClusterPtr, + NullableInt32uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt40uAttribute(long chipClusterPtr, + NullableInt40uAttributeCallback callback + ); + + private native void writeNullableInt40uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt40uAttribute(long chipClusterPtr, + NullableInt40uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt48uAttribute(long chipClusterPtr, + NullableInt48uAttributeCallback callback + ); + + private native void writeNullableInt48uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt48uAttribute(long chipClusterPtr, + NullableInt48uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt56uAttribute(long chipClusterPtr, + NullableInt56uAttributeCallback callback + ); + + private native void writeNullableInt56uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt56uAttribute(long chipClusterPtr, + NullableInt56uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt64uAttribute(long chipClusterPtr, + NullableInt64uAttributeCallback callback + ); + + private native void writeNullableInt64uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt64uAttribute(long chipClusterPtr, + NullableInt64uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt8sAttribute(long chipClusterPtr, + NullableInt8sAttributeCallback callback + ); + + private native void writeNullableInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt8sAttribute(long chipClusterPtr, + NullableInt8sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt16sAttribute(long chipClusterPtr, + NullableInt16sAttributeCallback callback + ); + + private native void writeNullableInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt16sAttribute(long chipClusterPtr, + NullableInt16sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt24sAttribute(long chipClusterPtr, + NullableInt24sAttributeCallback callback + ); + + private native void writeNullableInt24sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt24sAttribute(long chipClusterPtr, + NullableInt24sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt32sAttribute(long chipClusterPtr, + NullableInt32sAttributeCallback callback + ); + + private native void writeNullableInt32sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt32sAttribute(long chipClusterPtr, + NullableInt32sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt40sAttribute(long chipClusterPtr, + NullableInt40sAttributeCallback callback + ); + + private native void writeNullableInt40sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt40sAttribute(long chipClusterPtr, + NullableInt40sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt48sAttribute(long chipClusterPtr, + NullableInt48sAttributeCallback callback + ); + + private native void writeNullableInt48sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt48sAttribute(long chipClusterPtr, + NullableInt48sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt56sAttribute(long chipClusterPtr, + NullableInt56sAttributeCallback callback + ); + + private native void writeNullableInt56sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt56sAttribute(long chipClusterPtr, + NullableInt56sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableInt64sAttribute(long chipClusterPtr, + NullableInt64sAttributeCallback callback + ); + + private native void writeNullableInt64sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Long value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableInt64sAttribute(long chipClusterPtr, + NullableInt64sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableEnum8Attribute(long chipClusterPtr, + NullableEnum8AttributeCallback callback + ); + + private native void writeNullableEnum8Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableEnum8Attribute(long chipClusterPtr, + NullableEnum8AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableEnum16Attribute(long chipClusterPtr, + NullableEnum16AttributeCallback callback + ); + + private native void writeNullableEnum16Attribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableEnum16Attribute(long chipClusterPtr, + NullableEnum16AttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableFloatSingleAttribute(long chipClusterPtr, + NullableFloatSingleAttributeCallback callback + ); + + private native void writeNullableFloatSingleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Float value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableFloatSingleAttribute(long chipClusterPtr, + NullableFloatSingleAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableFloatDoubleAttribute(long chipClusterPtr, + NullableFloatDoubleAttributeCallback callback + ); + + private native void writeNullableFloatDoubleAttribute(long chipClusterPtr, DefaultClusterCallback callback, Double value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableFloatDoubleAttribute(long chipClusterPtr, + NullableFloatDoubleAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableOctetStringAttribute(long chipClusterPtr, + NullableOctetStringAttributeCallback callback + ); + + private native void writeNullableOctetStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, byte[] value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableOctetStringAttribute(long chipClusterPtr, + NullableOctetStringAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableCharStringAttribute(long chipClusterPtr, + NullableCharStringAttributeCallback callback + ); + + private native void writeNullableCharStringAttribute(long chipClusterPtr, DefaultClusterCallback callback, String value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableCharStringAttribute(long chipClusterPtr, + NullableCharStringAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableEnumAttrAttribute(long chipClusterPtr, + NullableEnumAttrAttributeCallback callback + ); + + private native void writeNullableEnumAttrAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableEnumAttrAttribute(long chipClusterPtr, + NullableEnumAttrAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, + NullableRangeRestrictedInt8uAttributeCallback callback + ); + + private native void writeNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableRangeRestrictedInt8uAttribute(long chipClusterPtr, + NullableRangeRestrictedInt8uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, + NullableRangeRestrictedInt8sAttributeCallback callback + ); + + private native void writeNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableRangeRestrictedInt8sAttribute(long chipClusterPtr, + NullableRangeRestrictedInt8sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, + NullableRangeRestrictedInt16uAttributeCallback callback + ); + + private native void writeNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableRangeRestrictedInt16uAttribute(long chipClusterPtr, + NullableRangeRestrictedInt16uAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, + NullableRangeRestrictedInt16sAttributeCallback callback + ); + + private native void writeNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeNullableRangeRestrictedInt16sAttribute(long chipClusterPtr, + NullableRangeRestrictedInt16sAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readWriteOnlyInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + + private native void writeWriteOnlyInt8uAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeWriteOnlyInt8uAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class FaultInjectionCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0xFFF1FC06L; + + public FaultInjectionCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void failAtFault(DefaultClusterCallback callback + , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex) { + failAtFault(chipClusterPtr, callback, type, id, numCallsToSkip, numCallsToFail, takeMutex, null); + } + + public void failAtFault(DefaultClusterCallback callback + , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex + , int timedInvokeTimeoutMs) { + failAtFault(chipClusterPtr, callback, type, id, numCallsToSkip, numCallsToFail, takeMutex, timedInvokeTimeoutMs); + } + + public void failRandomlyAtFault(DefaultClusterCallback callback + , Integer type, Long id, Integer percentage) { + failRandomlyAtFault(chipClusterPtr, callback, type, id, percentage, null); + } + + public void failRandomlyAtFault(DefaultClusterCallback callback + , Integer type, Long id, Integer percentage + , int timedInvokeTimeoutMs) { + failRandomlyAtFault(chipClusterPtr, callback, type, id, percentage, timedInvokeTimeoutMs); + } + private native void failAtFault(long chipClusterPtr, DefaultClusterCallback Callback + , Integer type, Long id, Long numCallsToSkip, Long numCallsToFail, Boolean takeMutex + , @Nullable Integer timedInvokeTimeoutMs); + private native void failRandomlyAtFault(long chipClusterPtr, DefaultClusterCallback Callback + , Integer type, Long id, Integer percentage + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + + public static class SampleMeiCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 0xFFF1FC20L; + + public SampleMeiCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void ping(DefaultClusterCallback callback + ) { + ping(chipClusterPtr, callback, null); + } + + public void ping(DefaultClusterCallback callback + + , int timedInvokeTimeoutMs) { + ping(chipClusterPtr, callback, timedInvokeTimeoutMs); + } + + public void addArguments(AddArgumentsResponseCallback callback + , Integer arg1, Integer arg2) { + addArguments(chipClusterPtr, callback, arg1, arg2, null); + } + + public void addArguments(AddArgumentsResponseCallback callback + , Integer arg1, Integer arg2 + , int timedInvokeTimeoutMs) { + addArguments(chipClusterPtr, callback, arg1, arg2, timedInvokeTimeoutMs); + } + private native void ping(long chipClusterPtr, DefaultClusterCallback Callback + + , @Nullable Integer timedInvokeTimeoutMs); + private native void addArguments(long chipClusterPtr, AddArgumentsResponseCallback Callback + , Integer arg1, Integer arg2 + , @Nullable Integer timedInvokeTimeoutMs); + public interface AddArgumentsResponseCallback { + void onSuccess(Integer returnValue); + + void onError(Exception error); + } + + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readFlipFlopAttribute( + BooleanAttributeCallback callback + ) { + readFlipFlopAttribute(chipClusterPtr, callback); + } + public void writeFlipFlopAttribute(DefaultClusterCallback callback, Boolean value) { + writeFlipFlopAttribute(chipClusterPtr, callback, value, null); + } + + public void writeFlipFlopAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { + writeFlipFlopAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); + } + public void subscribeFlipFlopAttribute( + BooleanAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFlipFlopAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readFlipFlopAttribute(long chipClusterPtr, + BooleanAttributeCallback callback + ); + + private native void writeFlipFlopAttribute(long chipClusterPtr, DefaultClusterCallback callback, Boolean value, @Nullable Integer timedWriteTimeoutMs); + private native void subscribeFlipFlopAttribute(long chipClusterPtr, + BooleanAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } +} + diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index cd139cb683e6e4..d5b1d44a09e243 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -332,9 +332,9 @@ class ChipClusters: "reportable": True, }, 0x00000007: { - "attributeName": "RemainingCapacity", + "attributeName": "FabricSceneInfo", "attributeId": 0x00000007, - "type": "int", + "type": "", "reportable": True, }, 0x0000FFF8: { @@ -1423,6 +1423,18 @@ class ChipClusters: "type": "", "reportable": True, }, + 0x00000015: { + "attributeName": "SpecificationVersion", + "attributeId": 0x00000015, + "type": "int", + "reportable": True, + }, + 0x00000016: { + "attributeName": "MaxPathsPerInvoke", + "attributeId": 0x00000016, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -4416,6 +4428,83 @@ class ChipClusters: }, }, } + _OVEN_MODE_CLUSTER_INFO = { + "clusterName": "OvenMode", + "clusterId": 0x00000049, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "ChangeToMode", + "args": { + "newMode": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "SupportedModes", + "attributeId": 0x00000000, + "type": "", + "reportable": True, + }, + 0x00000001: { + "attributeName": "CurrentMode", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "StartUpMode", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000003: { + "attributeName": "OnMode", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _MODE_SELECT_CLUSTER_INFO = { "clusterName": "ModeSelect", "clusterId": 0x00000050, @@ -5885,6 +5974,211 @@ class ChipClusters: }, }, } + _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO = { + "clusterName": "BooleanSensorConfiguration", + "clusterId": 0x00000080, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "SuppressRequest", + "args": { + "alarmsToSuppress": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "SensitivityLevel", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000001: { + "attributeName": "AlarmsActive", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "AlarmsSuppressed", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "AlarmsEnabled", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } + _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO = { + "clusterName": "ValveConfigurationAndControl", + "clusterId": 0x00000081, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "Open", + "args": { + "openDuration": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "Close", + "args": { + }, + }, + 0x00000002: { + "commandId": 0x00000002, + "commandName": "SetLevel", + "args": { + "level": "int", + "openDuration": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "OpenDuration", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000001: { + "attributeName": "AutoCloseTime", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "RemainingDuration", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "CurrentState", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x00000004: { + "attributeName": "TargetState", + "attributeId": 0x00000004, + "type": "int", + "reportable": True, + }, + 0x00000005: { + "attributeName": "StartUpState", + "attributeId": 0x00000005, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000006: { + "attributeName": "CurrentLevel", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "TargetLevel", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "OpenLevel", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00000009: { + "attributeName": "ValveFault", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO = { "clusterName": "DemandResponseLoadControl", "clusterId": 0x00000096, @@ -5927,57 +6221,51 @@ class ChipClusters: }, "attributes": { 0x00000000: { - "attributeName": "DeviceClass", + "attributeName": "LoadControlPrograms", "attributeId": 0x00000000, - "type": "int", + "type": "", "reportable": True, }, 0x00000001: { - "attributeName": "LoadControlPrograms", + "attributeName": "NumberOfLoadControlPrograms", "attributeId": 0x00000001, - "type": "", + "type": "int", "reportable": True, }, 0x00000002: { - "attributeName": "NumberOfLoadControlPrograms", + "attributeName": "Events", "attributeId": 0x00000002, - "type": "int", + "type": "", "reportable": True, }, 0x00000003: { - "attributeName": "Events", + "attributeName": "ActiveEvents", "attributeId": 0x00000003, "type": "", "reportable": True, }, 0x00000004: { - "attributeName": "ActiveEvents", + "attributeName": "NumberOfEventsPerProgram", "attributeId": 0x00000004, - "type": "", + "type": "int", "reportable": True, }, 0x00000005: { - "attributeName": "NumberOfEventsPerProgram", + "attributeName": "NumberOfTransitions", "attributeId": 0x00000005, "type": "int", "reportable": True, }, 0x00000006: { - "attributeName": "NumberOfTransistions", - "attributeId": 0x00000006, - "type": "int", - "reportable": True, - }, - 0x00000007: { "attributeName": "DefaultRandomStart", - "attributeId": 0x00000007, + "attributeId": 0x00000006, "type": "int", "reportable": True, "writable": True, }, - 0x00000008: { + 0x00000007: { "attributeName": "DefaultRandomDuration", - "attributeId": 0x00000008, + "attributeId": 0x00000007, "type": "int", "reportable": True, "writable": True, @@ -12615,6 +12903,7 @@ class ChipClusters: 0x00000045: _BOOLEAN_STATE_CLUSTER_INFO, 0x00000046: _ICD_MANAGEMENT_CLUSTER_INFO, 0x00000047: _TIMER_CLUSTER_INFO, + 0x00000049: _OVEN_MODE_CLUSTER_INFO, 0x00000050: _MODE_SELECT_CLUSTER_INFO, 0x00000051: _LAUNDRY_WASHER_MODE_CLUSTER_INFO, 0x00000052: _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, @@ -12633,6 +12922,8 @@ class ChipClusters: 0x00000061: _RVC_OPERATIONAL_STATE_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, 0x00000072: _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, + 0x00000080: _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO, + 0x00000081: _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, 0x00000096: _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, 0x00000101: _DOOR_LOCK_CLUSTER_INFO, 0x00000102: _WINDOW_COVERING_CLUSTER_INFO, @@ -12720,6 +13011,7 @@ class ChipClusters: "BooleanState": _BOOLEAN_STATE_CLUSTER_INFO, "IcdManagement": _ICD_MANAGEMENT_CLUSTER_INFO, "Timer": _TIMER_CLUSTER_INFO, + "OvenMode": _OVEN_MODE_CLUSTER_INFO, "ModeSelect": _MODE_SELECT_CLUSTER_INFO, "LaundryWasherMode": _LAUNDRY_WASHER_MODE_CLUSTER_INFO, "RefrigeratorAndTemperatureControlledCabinetMode": _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, @@ -12738,6 +13030,8 @@ class ChipClusters: "RvcOperationalState": _RVC_OPERATIONAL_STATE_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, "ActivatedCarbonFilterMonitoring": _ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER_INFO, + "BooleanSensorConfiguration": _BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_INFO, + "ValveConfigurationAndControl": _VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, "DemandResponseLoadControl": _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO, "DoorLock": _DOOR_LOCK_CLUSTER_INFO, "WindowCovering": _WINDOW_COVERING_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index f3f396633491fa..0cb204525c3926 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -590,14 +590,14 @@ class Scenes(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=bool), + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0x00000000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=0x00000003, Type=typing.Optional[bool]), ClusterObjectFieldDescriptor(Label="nameSupport", Tag=0x00000004, Type=uint), ClusterObjectFieldDescriptor(Label="lastConfiguredBy", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="sceneTableSize", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=0x00000007, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricSceneInfo", Tag=0x00000007, Type=typing.List[Scenes.Structs.SceneInfoStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -606,14 +606,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - sceneCount: 'uint' = None - currentScene: 'uint' = None - currentGroup: 'uint' = None - sceneValid: 'bool' = None + sceneCount: 'typing.Optional[uint]' = None + currentScene: 'typing.Optional[uint]' = None + currentGroup: 'typing.Optional[uint]' = None + sceneValid: 'typing.Optional[bool]' = None nameSupport: 'uint' = None lastConfiguredBy: 'typing.Union[None, Nullable, uint]' = None sceneTableSize: 'uint' = None - remainingCapacity: 'uint' = None + fabricSceneInfo: 'typing.List[Scenes.Structs.SceneInfoStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -661,6 +661,27 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterID: 'uint' = 0 attributeValueList: 'typing.List[Scenes.Structs.AttributeValuePair]' = field(default_factory=lambda: []) + @dataclass + class SceneInfoStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sceneCount", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="currentScene", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="currentGroup", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneValid", Tag=3, Type=bool), + ClusterObjectFieldDescriptor(Label="remainingCapacity", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), + ]) + + sceneCount: 'uint' = 0 + currentScene: 'uint' = 0 + currentGroup: 'uint' = 0 + sceneValid: 'bool' = False + remainingCapacity: 'uint' = 0 + fabricIndex: 'uint' = 0 + class Commands: @dataclass class AddScene(ClusterCommand): @@ -1063,9 +1084,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class CurrentScene(ClusterAttributeDescriptor): @@ -1079,9 +1100,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class CurrentGroup(ClusterAttributeDescriptor): @@ -1095,9 +1116,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - value: 'uint' = 0 + value: 'typing.Optional[uint]' = None @dataclass class SceneValid(ClusterAttributeDescriptor): @@ -1111,9 +1132,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) - value: 'bool' = False + value: 'typing.Optional[bool]' = None @dataclass class NameSupport(ClusterAttributeDescriptor): @@ -1164,7 +1185,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class RemainingCapacity(ClusterAttributeDescriptor): + class FabricSceneInfo(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000005 @@ -1175,9 +1196,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=typing.List[Scenes.Structs.SceneInfoStruct]) - value: 'uint' = 0 + value: 'typing.List[Scenes.Structs.SceneInfoStruct]' = field(default_factory=lambda: []) @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -4108,6 +4129,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="uniqueID", Tag=0x00000012, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="capabilityMinima", Tag=0x00000013, Type=BasicInformation.Structs.CapabilityMinimaStruct), ClusterObjectFieldDescriptor(Label="productAppearance", Tag=0x00000014, Type=typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]), + ClusterObjectFieldDescriptor(Label="specificationVersion", Tag=0x00000015, Type=uint), + ClusterObjectFieldDescriptor(Label="maxPathsPerInvoke", Tag=0x00000016, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -4137,6 +4160,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: uniqueID: 'typing.Optional[str]' = None capabilityMinima: 'BasicInformation.Structs.CapabilityMinimaStruct' = None productAppearance: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + specificationVersion: 'uint' = None + maxPathsPerInvoke: 'uint' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -4564,6 +4589,38 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[BasicInformation.Structs.ProductAppearanceStruct]' = None + @dataclass + class SpecificationVersion(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000015 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class MaxPathsPerInvoke(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000028 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000016 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -14902,14 +14959,30 @@ class StayActiveRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000046 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'StayActiveResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class StayActiveResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000046 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = False response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="promisedActiveDuration", Tag=0, Type=uint), ]) + promisedActiveDuration: 'uint' = 0 + class Attributes: @dataclass class IdleModeDuration(ClusterAttributeDescriptor): @@ -15390,19 +15463,17 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class ModeSelect(Cluster): - id: typing.ClassVar[int] = 0x00000050 +class OvenMode(Cluster): + id: typing.ClassVar[int] = 0x00000049 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), - ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[ModeSelect.Structs.ModeOptionStruct]), - ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[OvenMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15411,9 +15482,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - description: 'str' = None - standardNamespace: 'typing.Union[Nullable, uint]' = None - supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None + supportedModes: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -15424,22 +15493,39 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class ModeTag(MatterIntEnum): + kBake = 0x4000 + kConvection = 0x4001 + kGrill = 0x4002 + kRoast = 0x4003 + kClean = 0x4004 + kConvectionBake = 0x4005 + kConvectionRoast = 0x4006 + kWarming = 0x4007 + kProofing = 0x4008 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + class Bitmaps: class Feature(IntFlag): kOnOff = 0x1 class Structs: @dataclass - class SemanticTagStruct(ClusterObject): + class ModeTagStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), ]) - mfgCode: 'uint' = 0 + mfgCode: 'typing.Optional[uint]' = None value: 'uint' = 0 @dataclass @@ -15450,20 +15536,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="semanticTags", Tag=2, Type=typing.List[ModeSelect.Structs.SemanticTagStruct]), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[OvenMode.Structs.ModeTagStruct]), ]) label: 'str' = "" mode: 'uint' = 0 - semanticTags: 'typing.List[ModeSelect.Structs.SemanticTagStruct]' = field(default_factory=lambda: []) + modeTags: 'typing.List[OvenMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000050 + cluster_id: typing.ClassVar[int] = 0x00000049 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15474,64 +15560,50 @@ def descriptor(cls) -> ClusterObjectDescriptor: newMode: 'uint' = 0 - class Attributes: - @dataclass - class Description(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000050 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=str) - - value: 'str' = "" - @dataclass - class StandardNamespace(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000050 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000049 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) - value: 'typing.Union[Nullable, uint]' = NullValue + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + class Attributes: @dataclass class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ModeSelect.Structs.ModeOptionStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[OvenMode.Structs.ModeOptionStruct]) - value: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: 'typing.List[OvenMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15543,11 +15615,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15559,11 +15631,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15575,7 +15647,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15591,7 +15663,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15607,7 +15679,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15623,7 +15695,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15639,7 +15711,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15655,7 +15727,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000050 + return 0x00000049 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15669,17 +15741,19 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class LaundryWasherMode(Cluster): - id: typing.ClassVar[int] = 0x00000051 +class ModeSelect(Cluster): + id: typing.ClassVar[int] = 0x00000050 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]), - ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="description", Tag=0x00000000, Type=str), + ClusterObjectFieldDescriptor(Label="standardNamespace", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000002, Type=typing.List[ModeSelect.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000005, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15688,7 +15762,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None + description: 'str' = None + standardNamespace: 'typing.Union[Nullable, uint]' = None + supportedModes: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -15699,34 +15775,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None - class Enums: - class ModeTag(MatterIntEnum): - kNormal = 0x4000 - kDelicate = 0x4001 - kHeavy = 0x4002 - kWhites = 0x4003 - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. - class Bitmaps: class Feature(IntFlag): kOnOff = 0x1 class Structs: @dataclass - class ModeTagStruct(ClusterObject): + class SemanticTagStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), ]) - mfgCode: 'typing.Optional[uint]' = None + mfgCode: 'uint' = 0 value: 'uint' = 0 @dataclass @@ -15737,20 +15801,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[LaundryWasherMode.Structs.ModeTagStruct]), + ClusterObjectFieldDescriptor(Label="semanticTags", Tag=2, Type=typing.List[ModeSelect.Structs.SemanticTagStruct]), ]) label: 'str' = "" mode: 'uint' = 0 - modeTags: 'typing.List[LaundryWasherMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + semanticTags: 'typing.List[ModeSelect.Structs.SemanticTagStruct]' = field(default_factory=lambda: []) class Commands: @dataclass class ChangeToMode(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000051 + cluster_id: typing.ClassVar[int] = 0x00000050 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -15761,50 +15825,64 @@ def descriptor(cls) -> ClusterObjectDescriptor: newMode: 'uint' = 0 + class Attributes: @dataclass - class ChangeToModeResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000051 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None + class Description(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000050 @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), - ]) + def attribute_id(cls) -> int: + return 0x00000000 - status: 'uint' = 0 - statusText: 'typing.Optional[str]' = None + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=str) + + value: 'str' = "" + + @dataclass + class StandardNamespace(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000050 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue - class Attributes: @dataclass class SupportedModes(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000000 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[ModeSelect.Structs.ModeOptionStruct]) - value: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + value: 'typing.List[ModeSelect.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) @dataclass class CurrentMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15816,11 +15894,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class StartUpMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15832,11 +15910,11 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class OnMode(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -15848,7 +15926,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15864,7 +15942,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AcceptedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15880,7 +15958,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class EventList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15896,7 +15974,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class AttributeList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15912,7 +15990,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class FeatureMap(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15928,7 +16006,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: class ClusterRevision(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000051 + return 0x00000050 @ChipUtility.classproperty def attribute_id(cls) -> int: @@ -15942,14 +16020,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class RefrigeratorAndTemperatureControlledCabinetMode(Cluster): - id: typing.ClassVar[int] = 0x00000052 +class LaundryWasherMode(Cluster): + id: typing.ClassVar[int] = 0x00000051 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]), ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), @@ -15961,7 +16039,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None + supportedModes: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = None currentMode: 'uint' = None startUpMode: 'typing.Union[None, Nullable, uint]' = None onMode: 'typing.Union[None, Nullable, uint]' = None @@ -15974,8 +16052,281 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): - kRapidCool = 0x4000 - kRapidFreeze = 0x4001 + kNormal = 0x4000 + kDelicate = 0x4001 + kHeavy = 0x4002 + kWhites = 0x4003 + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. + + class Bitmaps: + class Feature(IntFlag): + kOnOff = 0x1 + + class Structs: + @dataclass + class ModeTagStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mfgCode", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="value", Tag=1, Type=uint), + ]) + + mfgCode: 'typing.Optional[uint]' = None + value: 'uint' = 0 + + @dataclass + class ModeOptionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=str), + ClusterObjectFieldDescriptor(Label="mode", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeTags", Tag=2, Type=typing.List[LaundryWasherMode.Structs.ModeTagStruct]), + ]) + + label: 'str' = "" + mode: 'uint' = 0 + modeTags: 'typing.List[LaundryWasherMode.Structs.ModeTagStruct]' = field(default_factory=lambda: []) + + class Commands: + @dataclass + class ChangeToMode(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000051 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'ChangeToModeResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="newMode", Tag=0, Type=uint), + ]) + + newMode: 'uint' = 0 + + @dataclass + class ChangeToModeResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000051 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), + ]) + + status: 'uint' = 0 + statusText: 'typing.Optional[str]' = None + + class Attributes: + @dataclass + class SupportedModes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[LaundryWasherMode.Structs.ModeOptionStruct]) + + value: 'typing.List[LaundryWasherMode.Structs.ModeOptionStruct]' = field(default_factory=lambda: []) + + @dataclass + class CurrentMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class StartUpMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OnMode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + +@dataclass +class RefrigeratorAndTemperatureControlledCabinetMode(Cluster): + id: typing.ClassVar[int] = 0x00000052 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="supportedModes", Tag=0x00000000, Type=typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]), + ClusterObjectFieldDescriptor(Label="currentMode", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="startUpMode", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="onMode", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + supportedModes: 'typing.List[RefrigeratorAndTemperatureControlledCabinetMode.Structs.ModeOptionStruct]' = None + currentMode: 'uint' = None + startUpMode: 'typing.Union[None, Nullable, uint]' = None + onMode: 'typing.Union[None, Nullable, uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ModeTag(MatterIntEnum): + kRapidCool = 0x4000 + kRapidFreeze = 0x4001 # kUnknownEnumValue intentionally not defined. This enum never goes # through DataModel::Decode, likely because it is a part of a derived # cluster. As a result having kUnknownEnumValue in this enum is error @@ -20567,6 +20918,684 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 +@dataclass +class BooleanSensorConfiguration(Cluster): + id: typing.ClassVar[int] = 0x00000080 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="sensitivityLevel", Tag=0x00000000, Type=typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]), + ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=0x00000002, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="alarmsEnabled", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + sensitivityLevel: 'typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]' = None + alarmsActive: 'typing.Optional[uint]' = None + alarmsSuppressed: 'typing.Optional[uint]' = None + alarmsEnabled: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class SensitivityEnum(MatterIntEnum): + kHigh = 0x00 + kStandard = 0x01 + kLow = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class Bitmaps: + class AlarmModeBitmap(IntFlag): + kVisual = 0x1 + kAudible = 0x2 + + class Feature(IntFlag): + kVisual = 0x1 + kAudible = 0x2 + kAlarmSuppress = 0x4 + kSensitivityLevel = 0x8 + + class Commands: + @dataclass + class SuppressRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000080 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsToSuppress", Tag=0, Type=uint), + ]) + + alarmsToSuppress: 'uint' = 0 + + class Attributes: + @dataclass + class SensitivityLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]) + + value: 'typing.Optional[BooleanSensorConfiguration.Enums.SensitivityEnum]' = None + + @dataclass + class AlarmsActive(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsSuppressed(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class AlarmsEnabled(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class AlarmsStateChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarmsActive", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="alarmsSuppressed", Tag=1, Type=typing.Optional[uint]), + ]) + + alarmsActive: 'uint' = 0 + alarmsSuppressed: 'typing.Optional[uint]' = None + + @dataclass + class SensorFault(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000080 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + +@dataclass +class ValveConfigurationAndControl(Cluster): + id: typing.ClassVar[int] = 0x00000081 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="openDuration", Tag=0x00000000, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="autoCloseTime", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="remainingDuration", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="currentState", Tag=0x00000003, Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]), + ClusterObjectFieldDescriptor(Label="targetState", Tag=0x00000004, Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]), + ClusterObjectFieldDescriptor(Label="startUpState", Tag=0x00000005, Type=typing.Optional[ValveConfigurationAndControl.Enums.ValveStateEnum]), + ClusterObjectFieldDescriptor(Label="currentLevel", Tag=0x00000006, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="targetLevel", Tag=0x00000007, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="openLevel", Tag=0x00000008, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="valveFault", Tag=0x00000009, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + openDuration: 'typing.Union[Nullable, uint]' = None + autoCloseTime: 'typing.Union[None, Nullable, uint]' = None + remainingDuration: 'typing.Union[None, Nullable, uint]' = None + currentState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + targetState: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + startUpState: 'typing.Optional[ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + currentLevel: 'typing.Union[None, Nullable, uint]' = None + targetLevel: 'typing.Union[None, Nullable, uint]' = None + openLevel: 'typing.Union[None, Nullable, uint]' = None + valveFault: 'typing.Optional[uint]' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Enums: + class ValveStateEnum(MatterIntEnum): + kOpen = 0x00 + kClosed = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + + class Bitmaps: + class Feature(IntFlag): + kTimeSync = 0x1 + kLevel = 0x2 + + class ValveFaultBitmap(IntFlag): + kGeneralFault = 0x1 + kBlocked = 0x2 + kLeaking = 0x4 + + class Commands: + @dataclass + class Open(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000081 + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="openDuration", Tag=0, Type=typing.Optional[uint]), + ]) + + openDuration: 'typing.Optional[uint]' = None + + @dataclass + class Close(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000081 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class SetLevel(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000081 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="level", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="openDuration", Tag=1, Type=typing.Optional[uint]), + ]) + + level: 'uint' = 0 + openDuration: 'typing.Optional[uint]' = None + + class Attributes: + @dataclass + class OpenDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint]) + + value: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class AutoCloseTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class RemainingDuration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class CurrentState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) + + value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + + @dataclass + class TargetState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000004 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]) + + value: 'typing.Union[Nullable, ValveConfigurationAndControl.Enums.ValveStateEnum]' = NullValue + + @dataclass + class StartUpState(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000005 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[ValveConfigurationAndControl.Enums.ValveStateEnum]) + + value: 'typing.Optional[ValveConfigurationAndControl.Enums.ValveStateEnum]' = None + + @dataclass + class CurrentLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000006 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class TargetLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000007 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class OpenLevel(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000008 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class ValveFault(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class ValveStateChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="valveState", Tag=0, Type=ValveConfigurationAndControl.Enums.ValveStateEnum), + ]) + + valveState: 'ValveConfigurationAndControl.Enums.ValveStateEnum' = 0 + + @dataclass + class ValveFault(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000081 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="valveFault", Tag=0, Type=uint), + ]) + + valveFault: 'uint' = 0 + + @dataclass class DemandResponseLoadControl(Cluster): id: typing.ClassVar[int] = 0x00000096 @@ -20575,15 +21604,14 @@ class DemandResponseLoadControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="deviceClass", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="loadControlPrograms", Tag=0x00000001, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]), - ClusterObjectFieldDescriptor(Label="numberOfLoadControlPrograms", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="events", Tag=0x00000003, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), - ClusterObjectFieldDescriptor(Label="activeEvents", Tag=0x00000004, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), - ClusterObjectFieldDescriptor(Label="numberOfEventsPerProgram", Tag=0x00000005, Type=uint), - ClusterObjectFieldDescriptor(Label="numberOfTransistions", Tag=0x00000006, Type=uint), - ClusterObjectFieldDescriptor(Label="defaultRandomStart", Tag=0x00000007, Type=uint), - ClusterObjectFieldDescriptor(Label="defaultRandomDuration", Tag=0x00000008, Type=uint), + ClusterObjectFieldDescriptor(Label="loadControlPrograms", Tag=0x00000000, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]), + ClusterObjectFieldDescriptor(Label="numberOfLoadControlPrograms", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="events", Tag=0x00000002, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), + ClusterObjectFieldDescriptor(Label="activeEvents", Tag=0x00000003, Type=typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]), + ClusterObjectFieldDescriptor(Label="numberOfEventsPerProgram", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="numberOfTransitions", Tag=0x00000005, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultRandomStart", Tag=0x00000006, Type=uint), + ClusterObjectFieldDescriptor(Label="defaultRandomDuration", Tag=0x00000007, Type=uint), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -20592,13 +21620,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - deviceClass: 'uint' = None loadControlPrograms: 'typing.List[DemandResponseLoadControl.Structs.LoadControlProgramStruct]' = None numberOfLoadControlPrograms: 'uint' = None events: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None activeEvents: 'typing.List[DemandResponseLoadControl.Structs.LoadControlEventStruct]' = None numberOfEventsPerProgram: 'uint' = None - numberOfTransistions: 'uint' = None + numberOfTransitions: 'uint' = None defaultRandomStart: 'uint' = None defaultRandomDuration: 'uint' = None generatedCommandList: 'typing.List[uint]' = None @@ -20665,16 +21692,6 @@ class LoadControlEventStatusEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 13, - class PowerSavingsEnum(MatterIntEnum): - kLow = 0x00 - kMedium = 0x01 - kHigh = 0x02 - # All received enum values that are not listed above will be mapped - # to kUnknownEnumValue. This is a helper enum value that should only - # be used by code to process how it handles receiving and unknown - # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, - class Bitmaps: class CancelControlBitmap(IntFlag): kRandomEnd = 0x1 @@ -20732,10 +21749,10 @@ class PowerSavingsControlStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="powerSavings", Tag=0, Type=DemandResponseLoadControl.Enums.PowerSavingsEnum), + ClusterObjectFieldDescriptor(Label="powerSavings", Tag=0, Type=uint), ]) - powerSavings: 'DemandResponseLoadControl.Enums.PowerSavingsEnum' = 0 + powerSavings: 'uint' = 0 @dataclass class DutyCycleControlStruct(ClusterObject): @@ -20924,22 +21941,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) class Attributes: - @dataclass - class DeviceClass(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000096 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - @dataclass class LoadControlPrograms(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -20948,7 +21949,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -20964,7 +21965,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -20980,7 +21981,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000002 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -20996,7 +21997,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000003 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -21012,7 +22013,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000004 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -21021,14 +22022,14 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class NumberOfTransistions(ClusterAttributeDescriptor): + class NumberOfTransitions(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000096 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000006 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -21044,7 +22045,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000007 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -21060,7 +22061,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000008 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -35446,7 +36447,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class CecKeyCode(MatterIntEnum): + class CECKeyCodeEnum(MatterIntEnum): kSelect = 0x00 kUp = 0x01 kDown = 0x02 @@ -35567,10 +36568,10 @@ class SendKey(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="keyCode", Tag=0, Type=KeypadInput.Enums.CecKeyCode), + ClusterObjectFieldDescriptor(Label="keyCode", Tag=0, Type=KeypadInput.Enums.CECKeyCodeEnum), ]) - keyCode: 'KeypadInput.Enums.CecKeyCode' = 0 + keyCode: 'KeypadInput.Enums.CECKeyCodeEnum' = 0 @dataclass class SendKeyResponse(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.h b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.h index cef43549da5eb0..24bae8325b5212 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegateBridge.h @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 94b9a49173a49d..04f92e8e3bdf1a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -51,7 +51,7 @@ #import "MTRDeviceAttestationDelegateBridge.h" #import "MTRDeviceConnectionBridge.h" -#include +#include #include #include diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h index d13331f46bd2ac..d5b131d21ae8d9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h @@ -19,7 +19,7 @@ #include #include -#include +#include NS_ASSUME_NONNULL_BEGIN diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 6ac6a560fc9b89..4f27613843def4 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7464,7 +7464,6 @@ Scenes: # New scenes bits not stable yet. - SceneTableSize - - RemainingCapacity FanControl: # New Fan Control bits not stable yet. - AirflowDirection @@ -7737,6 +7736,7 @@ GeneralDiagnostics: # Not in the spec yet. - AverageWearCount + # New things, not quite finalized. renames: enums: OTASoftwareUpdateProvider: @@ -7774,6 +7774,12 @@ enums: ContentLauncher: - StatusEnum + KeypadInput: + - CECKeyCodeEnum + ThermostatUserInterfaceConfiguration: + - KeypadLockoutEnum + - ScheduleProgrammingVisibilityEnum + - TemperatureDisplayModeEnum enum values: ContentLauncher: StatusEnum: @@ -7784,10 +7790,111 @@ FanModeSequenceEnum: - OffHighAuto - OffHigh + KeypadInput: + CECKeyCodeEnum: + - Select + - Up + - Down + - Left + - Right + - RightUp + - RightDown + - LeftUp + - LeftDown + - RootMenu + - SetupMenu + - ContentsMenu + - FavoriteMenu + - Exit + - MediaTopMenu + - MediaContextSensitiveMenu + - NumberEntryMode + - Number11 + - Number12 + - Number0OrNumber10 + - Numbers1 + - Numbers2 + - Numbers3 + - Numbers4 + - Numbers5 + - Numbers6 + - Numbers7 + - Numbers8 + - Numbers9 + - Dot + - Enter + - Clear + - NextFavorite + - ChannelUp + - ChannelDown + - PreviousChannel + - SoundSelect + - InputSelect + - DisplayInformation + - Help + - PageUp + - PageDown + - Power + - VolumeUp + - VolumeDown + - Mute + - Play + - Stop + - Pause + - Record + - Rewind + - FastForward + - Eject + - Forward + - Backward + - StopRecord + - PauseRecord + - Reserved + - Angle + - SubPicture + - VideoOnDemand + - ElectronicProgramGuide + - TimerProgramming + - InitialConfiguration + - SelectBroadcastType + - SelectSoundPresentation + - PlayFunction + - PausePlayFunction + - RecordFunction + - PauseRecordFunction + - StopFunction + - MuteFunction + - RestoreVolumeFunction + - TuneFunction + - SelectMediaFunction + - SelectAvInputFunction + - SelectAudioInputFunction + - PowerToggleFunction + - PowerOffFunction + - PowerOnFunction + - F1Blue + - F2Red + - F3Green + - F4Yellow + - F5 + - Data + ThermostatUserInterfaceConfiguration: + KeypadLockoutEnum: + - NoLockout + - Lockout1 + - Lockout2 + - Lockout3 + - Lockout4 + - Lockout5 + ScheduleProgrammingVisibilityEnum: + - ScheduleProgrammingPermitted + - ScheduleProgrammingDenied + TemperatureDisplayModeEnum: + - Celsius + - Fahrenheit bitmaps: Scenes: - CopyModeBitmap - - NameSupportBitmap AdministratorCommissioning: - Feature ContentLauncher: @@ -7801,8 +7908,6 @@ Scenes: CopyModeBitmap: - CopyAllScenes - NameSupportBitmap: - - SceneNames SoftwareDiagnostics: Feature: - Watermarks @@ -7825,6 +7930,8 @@ enums: ContentLauncher: - ContentLaunchStatusEnum + KeypadInput: + - CecKeyCode enum values: FanControl: FanModeSequenceEnum: @@ -7850,6 +7957,10 @@ - MicrowaveOvenControl - MicrowaveOvenMode - DemandResponseLoadControl + - BooleanSensorConfiguration + - ValveConfigurationAndControl + - Timer + - OvenMode attributes: NetworkCommissioning: # Targeting Spring 2024 Matter release @@ -7859,6 +7970,13 @@ WakeOnLAN: # Targeting Spring 2024 Matter release - LinkLocalAddress + BasicInformation: + # Targeting Spring 2024 Matter release + - SpecificationVersion + - MaxPathsPerInvoke + Scenes: + # Targeting Spring 2024 Matter release + - FabricSceneInfo commands: GeneralDiagnostics: # Targeting Spring 2024 Matter release @@ -7884,6 +8002,10 @@ QueryIdentityResponse: - identity - possessionSignature + structs: + Scenes: + # Targeting Spring 2024 Matter release + - SceneInfoStruct struct fields: NetworkCommissioning: # Targeting Spring 2024 Matter release @@ -7894,6 +8016,9 @@ NetworkCommissioning: # Targeting Spring 2024 Matter release - ThreadCapabilitiesBitmap + Scenes: + # Targeting Spring 2024 Matter release + - NameSupportBitmap bitmap values: OnOff: Feature: @@ -7913,6 +8038,8 @@ enums: ContentLauncher: StatusEnum: ContentLaunchStatusEnum + KeypadInput: + CECKeyCodeEnum: CecKeyCode enum values: ContentLauncher: # The URLNotAvailable value got renamed at the same time diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 949803a3e07a23..d125a8f8e4cc99 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -111,7 +111,7 @@ static BOOL AttributeIsSpecifiedInScenesCluster(AttributeId aAttributeId) case Attributes::SceneTableSize::Id: { return YES; } - case Attributes::RemainingCapacity::Id: { + case Attributes::FabricSceneInfo::Id: { return YES; } case Attributes::GeneratedCommandList::Id: { @@ -579,6 +579,12 @@ static BOOL AttributeIsSpecifiedInBasicInformationCluster(AttributeId aAttribute case Attributes::ProductAppearance::Id: { return YES; } + case Attributes::SpecificationVersion::Id: { + return YES; + } + case Attributes::MaxPathsPerInvoke::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -1952,6 +1958,45 @@ static BOOL AttributeIsSpecifiedInTimerCluster(AttributeId aAttributeId) } } } +static BOOL AttributeIsSpecifiedInOvenModeCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + case Attributes::SupportedModes::Id: { + return YES; + } + case Attributes::CurrentMode::Id: { + return YES; + } + case Attributes::StartUpMode::Id: { + return YES; + } + case Attributes::OnMode::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) { using namespace Clusters::ModeSelect; @@ -2696,13 +2741,106 @@ static BOOL AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(Attribu } } } -static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId aAttributeId) +static BOOL AttributeIsSpecifiedInBooleanSensorConfigurationCluster(AttributeId aAttributeId) { - using namespace Clusters::DemandResponseLoadControl; + using namespace Clusters::BooleanSensorConfiguration; + switch (aAttributeId) { + case Attributes::SensitivityLevel::Id: { + return YES; + } + case Attributes::AlarmsActive::Id: { + return YES; + } + case Attributes::AlarmsSuppressed::Id: { + return YES; + } + case Attributes::AlarmsEnabled::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInValveConfigurationAndControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ValveConfigurationAndControl; switch (aAttributeId) { - case Attributes::DeviceClass::Id: { + case Attributes::OpenDuration::Id: { + return YES; + } + case Attributes::AutoCloseTime::Id: { + return YES; + } + case Attributes::RemainingDuration::Id: { + return YES; + } + case Attributes::CurrentState::Id: { + return YES; + } + case Attributes::TargetState::Id: { + return YES; + } + case Attributes::StartUpState::Id: { return YES; } + case Attributes::CurrentLevel::Id: { + return YES; + } + case Attributes::TargetLevel::Id: { + return YES; + } + case Attributes::OpenLevel::Id: { + return YES; + } + case Attributes::ValveFault::Id: { + return YES; + } + case Attributes::GeneratedCommandList::Id: { + return YES; + } + case Attributes::AcceptedCommandList::Id: { + return YES; + } + case Attributes::EventList::Id: { + return YES; + } + case Attributes::AttributeList::Id: { + return YES; + } + case Attributes::FeatureMap::Id: { + return YES; + } + case Attributes::ClusterRevision::Id: { + return YES; + } + default: { + return NO; + } + } +} +static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aAttributeId) { case Attributes::LoadControlPrograms::Id: { return YES; } @@ -2718,7 +2856,7 @@ static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId a case Attributes::NumberOfEventsPerProgram::Id: { return YES; } - case Attributes::NumberOfTransistions::Id: { + case Attributes::NumberOfTransitions::Id: { return YES; } case Attributes::DefaultRandomStart::Id: { @@ -5781,6 +5919,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::Timer::Id: { return AttributeIsSpecifiedInTimerCluster(aAttributeId); } + case Clusters::OvenMode::Id: { + return AttributeIsSpecifiedInOvenModeCluster(aAttributeId); + } case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); } @@ -5835,6 +5976,12 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ActivatedCarbonFilterMonitoring::Id: { return AttributeIsSpecifiedInActivatedCarbonFilterMonitoringCluster(aAttributeId); } + case Clusters::BooleanSensorConfiguration::Id: { + return AttributeIsSpecifiedInBooleanSensorConfigurationCluster(aAttributeId); + } + case Clusters::ValveConfigurationAndControl::Id: { + return AttributeIsSpecifiedInValveConfigurationAndControlCluster(aAttributeId); + } case Clusters::DemandResponseLoadControl::Id: { return AttributeIsSpecifiedInDemandResponseLoadControlCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 060a0c1de5d749..75d8cdf59d79e9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -313,15 +313,36 @@ static id _Nullable DecodeAttributeValueForScenesCluster(AttributeId aAttributeI value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RemainingCapacity::Id: { - using TypeInfo = Attributes::RemainingCapacity::TypeInfo; + case Attributes::FabricSceneInfo::Id: { + using TypeInfo = Attributes::FabricSceneInfo::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRScenesClusterSceneInfoStruct * newElement_0; + newElement_0 = [MTRScenesClusterSceneInfoStruct new]; + newElement_0.sceneCount = [NSNumber numberWithUnsignedChar:entry_0.sceneCount]; + newElement_0.currentScene = [NSNumber numberWithUnsignedChar:entry_0.currentScene]; + newElement_0.currentGroup = [NSNumber numberWithUnsignedShort:entry_0.currentGroup]; + newElement_0.sceneValid = [NSNumber numberWithBool:entry_0.sceneValid]; + newElement_0.remainingCapacity = [NSNumber numberWithUnsignedChar:entry_0.remainingCapacity]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } default: { @@ -1564,6 +1585,28 @@ static id _Nullable DecodeAttributeValueForBasicInformationCluster(AttributeId a } return value; } + case Attributes::SpecificationVersion::Id: { + using TypeInfo = Attributes::SpecificationVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::MaxPathsPerInvoke::Id: { + using TypeInfo = Attributes::MaxPathsPerInvoke::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: { break; } @@ -5236,6 +5279,114 @@ static id _Nullable DecodeAttributeValueForTimerCluster(AttributeId aAttributeId *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } +static id _Nullable DecodeAttributeValueForOvenModeCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + case Attributes::SupportedModes::Id: { + using TypeInfo = Attributes::SupportedModes::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROvenModeClusterModeOptionStruct * newElement_0; + newElement_0 = [MTROvenModeClusterModeOptionStruct new]; + newElement_0.label = AsString(entry_0.label); + if (newElement_0.label == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.modeTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTROvenModeClusterModeTagStruct * newElement_2; + newElement_2 = [MTROvenModeClusterModeTagStruct new]; + if (entry_2.mfgCode.HasValue()) { + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode.Value())]; + } else { + newElement_2.mfgCode = nil; + } + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.modeTags = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentMode::Id: { + using TypeInfo = Attributes::CurrentMode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::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; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} static id _Nullable DecodeAttributeValueForModeSelectCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ModeSelect; @@ -7020,21 +7171,220 @@ static id _Nullable DecodeAttributeValueForActivatedCarbonFilterMonitoringCluste *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForBooleanSensorConfigurationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::DemandResponseLoadControl; + using namespace Clusters::BooleanSensorConfiguration; switch (aAttributeId) { - case Attributes::DeviceClass::Id: { - using TypeInfo = Attributes::DeviceClass::TypeInfo; + case Attributes::SensitivityLevel::Id: { + using TypeInfo = Attributes::SensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::AlarmsActive::Id: { + using TypeInfo = Attributes::AlarmsActive::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + case Attributes::AlarmsSuppressed::Id: { + using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } + case Attributes::AlarmsEnabled::Id: { + using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForValveConfigurationAndControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aAttributeId) { + case Attributes::OpenDuration::Id: { + using TypeInfo = Attributes::OpenDuration::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 numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::AutoCloseTime::Id: { + using TypeInfo = Attributes::AutoCloseTime::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 numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::RemainingDuration::Id: { + using TypeInfo = Attributes::RemainingDuration::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 numberWithUnsignedInt:cppValue.Value()]; + } + return value; + } + case Attributes::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::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:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::TargetState::Id: { + using TypeInfo = Attributes::TargetState::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:chip::to_underlying(cppValue.Value())]; + } + return value; + } + case Attributes::StartUpState::Id: { + using TypeInfo = Attributes::StartUpState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::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::TargetLevel::Id: { + using TypeInfo = Attributes::TargetLevel::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::OpenLevel::Id: { + using TypeInfo = Attributes::OpenLevel::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::ValveFault::Id: { + using TypeInfo = Attributes::ValveFault::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + return nil; +} +static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::DemandResponseLoadControl; + switch (aAttributeId) { case Attributes::LoadControlPrograms::Id: { using TypeInfo = Attributes::LoadControlPrograms::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7192,7 +7542,7 @@ static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(Attr } if (entry_2.powerSavingsControl.HasValue()) { newElement_2.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; - newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.powerSavingsControl.Value().powerSavings)]; + newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_2.powerSavingsControl.Value().powerSavings]; } else { newElement_2.powerSavingsControl = nil; } @@ -7320,7 +7670,7 @@ static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(Attr } if (entry_2.powerSavingsControl.HasValue()) { newElement_2.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; - newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.powerSavingsControl.Value().powerSavings)]; + newElement_2.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_2.powerSavingsControl.Value().powerSavings]; } else { newElement_2.powerSavingsControl = nil; } @@ -7361,8 +7711,8 @@ static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(Attr value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::NumberOfTransistions::Id: { - using TypeInfo = Attributes::NumberOfTransistions::TypeInfo; + case Attributes::NumberOfTransitions::Id: { + using TypeInfo = Attributes::NumberOfTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16046,6 +16396,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::Timer::Id: { return DecodeAttributeValueForTimerCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::OvenMode::Id: { + return DecodeAttributeValueForOvenModeCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); } @@ -16100,6 +16453,12 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeAttributeValueForActivatedCarbonFilterMonitoringCluster(aPath.mAttributeId, aReader, aError); } + case Clusters::BooleanSensorConfiguration::Id: { + return DecodeAttributeValueForBooleanSensorConfigurationCluster(aPath.mAttributeId, aReader, aError); + } + case Clusters::ValveConfigurationAndControl::Id: { + return DecodeAttributeValueForValveConfigurationAndControlCluster(aPath.mAttributeId, aReader, aError); + } case Clusters::DemandResponseLoadControl::Id: { return DecodeAttributeValueForDemandResponseLoadControlCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index c02edc106a7d0d..fd1d09ee09e20a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -327,11 +327,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params @@ -1558,6 +1558,18 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -4641,8 +4653,8 @@ MTR_PROVISIONALLY_AVAILABLE * * Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithCompletion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; @@ -4852,6 +4864,103 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Oven Mode + * + * Attributes and commands for selecting a mode from a list of supported options. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterOvenMode : MTRGenericBaseCluster + +/** + * Command ChangeToMode + * + * This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. + */ +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_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; + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_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; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterOvenMode (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Mode Select * @@ -6669,6 +6778,250 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Boolean Sensor Configuration + * + * This cluster is used to configure a boolean sensor. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterBooleanSensorConfiguration : MTRGenericBaseCluster + +/** + * Command SuppressRequest + * + * This command is used to suppress the specified alarm. + */ +- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterBooleanSensorConfiguration (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Valve Configuration and Control + * + * This cluster is used to configure a valve. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterValveConfigurationAndControl : MTRGenericBaseCluster + +/** + * Command Open + * + * This command is used to set the valve to its fully open position. + */ +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command Close + * + * This command is used to set the valve to its fully closed position. + */ +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetLevel + * + * This command is used to set the valve to a specific level. + */ +- (void)setLevelWithParams:(MTRValveConfigurationAndControlClusterSetLevelParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeStartUpStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpStateWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpStateWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeStartUpStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeStartUpStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeOpenLevelWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterValveConfigurationAndControl (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Demand Response Load Control * @@ -6710,12 +7063,6 @@ MTR_PROVISIONALLY_AVAILABLE - (void)clearLoadControlEventsRequestWithCompletion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeDeviceClassWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeDeviceClassWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeDeviceClassWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6746,11 +7093,11 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeNumberOfTransistionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeNumberOfTransistionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNumberOfTransistionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; @@ -14124,8 +14471,8 @@ typedef NS_OPTIONS(uint32_t, MTRScenesFeature) { } MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); typedef NS_OPTIONS(uint8_t, MTRScenesNameSupportBitmap) { - MTRScenesNameSupportBitmapSceneNames MTR_NEWLY_AVAILABLE = 0x80, -} MTR_NEWLY_AVAILABLE; + MTRScenesNameSupportBitmapSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x80, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTROnOffDelayedAllOffEffectVariant) { MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, @@ -15151,6 +15498,22 @@ typedef NS_OPTIONS(uint32_t, MTRTimerFeature) { MTRTimerFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { + 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; + typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { MTRModeSelectFeatureOnOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, MTRModeSelectFeatureDEPONOFF MTR_DEPRECATED("Please use MTRModeSelectFeatureOnOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, @@ -15408,6 +15771,40 @@ typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_PROVISIONALLY_AVAILABLE = 0x4, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRBooleanSensorConfigurationSensitivity) { + MTRBooleanSensorConfigurationSensitivityHigh MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRBooleanSensorConfigurationSensitivityStandard MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRBooleanSensorConfigurationSensitivityLow MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRBooleanSensorConfigurationAlarmModeBitmap) { + MTRBooleanSensorConfigurationAlarmModeBitmapVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanSensorConfigurationAlarmModeBitmapAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRBooleanSensorConfigurationFeature) { + MTRBooleanSensorConfigurationFeatureVisual MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBooleanSensorConfigurationFeatureAudible MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRBooleanSensorConfigurationFeatureAlarmSuppress MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRBooleanSensorConfigurationFeatureSensitivityLevel MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { + MTRValveConfigurationAndControlValveStateOpen MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRValveConfigurationAndControlValveStateClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRValveConfigurationAndControlFeature) { + MTRValveConfigurationAndControlFeatureTimeSync MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRValveConfigurationAndControlFeatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRValveConfigurationAndControlValveFaultBitmap) { + MTRValveConfigurationAndControlValveFaultBitmapGeneralFault MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRValveConfigurationAndControlValveFaultBitmapBlocked MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRValveConfigurationAndControlValveFaultBitmapLeaking MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlCriticalityLevel) { MTRDemandResponseLoadControlCriticalityLevelUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRDemandResponseLoadControlCriticalityLevelGreen MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -15448,12 +15845,6 @@ typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventStatus) { MTRDemandResponseLoadControlLoadControlEventStatusFailed MTR_PROVISIONALLY_AVAILABLE = 0x0C, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlPowerSavings) { - MTRDemandResponseLoadControlPowerSavingsLow MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDemandResponseLoadControlPowerSavingsMedium MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDemandResponseLoadControlPowerSavingsHigh MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlCancelControlBitmap) { MTRDemandResponseLoadControlCancelControlBitmapRandomEnd MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; @@ -16277,23 +16668,23 @@ typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { } MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationKeypadLockout) { - MTRThermostatUserInterfaceConfigurationKeypadLockoutNoLockout MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout1 MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout2 MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout3 MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout4 MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout5 MTR_PROVISIONALLY_AVAILABLE = 0x05, -} MTR_PROVISIONALLY_AVAILABLE; + MTRThermostatUserInterfaceConfigurationKeypadLockoutNoLockout MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout1 MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout2 MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout3 MTR_NEWLY_AVAILABLE = 0x03, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout4 MTR_NEWLY_AVAILABLE = 0x04, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout5 MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibility) { - MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingPermitted MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingDenied MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingPermitted MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingDenied MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationTemperatureDisplayMode) { - MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeCelsius MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeFahrenheit MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeCelsius MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeFahrenheit MTR_NEWLY_AVAILABLE = 0x01, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { MTRColorControlColorLoopActionDeactivate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -16809,94 +17200,356 @@ typedef NS_OPTIONS(uint32_t, MTRMediaInputFeature) { MTRMediaInputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRKeypadInputCECKeyCode) { + MTRKeypadInputCECKeyCodeSelect MTR_NEWLY_AVAILABLE = 0x00, + MTRKeypadInputCECKeyCodeUp MTR_NEWLY_AVAILABLE = 0x01, + MTRKeypadInputCECKeyCodeDown MTR_NEWLY_AVAILABLE = 0x02, + MTRKeypadInputCECKeyCodeLeft MTR_NEWLY_AVAILABLE = 0x03, + MTRKeypadInputCECKeyCodeRight MTR_NEWLY_AVAILABLE = 0x04, + MTRKeypadInputCECKeyCodeRightUp MTR_NEWLY_AVAILABLE = 0x05, + MTRKeypadInputCECKeyCodeRightDown MTR_NEWLY_AVAILABLE = 0x06, + MTRKeypadInputCECKeyCodeLeftUp MTR_NEWLY_AVAILABLE = 0x07, + MTRKeypadInputCECKeyCodeLeftDown MTR_NEWLY_AVAILABLE = 0x08, + MTRKeypadInputCECKeyCodeRootMenu MTR_NEWLY_AVAILABLE = 0x09, + MTRKeypadInputCECKeyCodeSetupMenu MTR_NEWLY_AVAILABLE = 0x0A, + MTRKeypadInputCECKeyCodeContentsMenu MTR_NEWLY_AVAILABLE = 0x0B, + MTRKeypadInputCECKeyCodeFavoriteMenu MTR_NEWLY_AVAILABLE = 0x0C, + MTRKeypadInputCECKeyCodeExit MTR_NEWLY_AVAILABLE = 0x0D, + MTRKeypadInputCECKeyCodeMediaTopMenu MTR_NEWLY_AVAILABLE = 0x10, + MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu MTR_NEWLY_AVAILABLE = 0x11, + MTRKeypadInputCECKeyCodeNumberEntryMode MTR_NEWLY_AVAILABLE = 0x1D, + MTRKeypadInputCECKeyCodeNumber11 MTR_NEWLY_AVAILABLE = 0x1E, + MTRKeypadInputCECKeyCodeNumber12 MTR_NEWLY_AVAILABLE = 0x1F, + MTRKeypadInputCECKeyCodeNumber0OrNumber10 MTR_NEWLY_AVAILABLE = 0x20, + MTRKeypadInputCECKeyCodeNumbers1 MTR_NEWLY_AVAILABLE = 0x21, + MTRKeypadInputCECKeyCodeNumbers2 MTR_NEWLY_AVAILABLE = 0x22, + MTRKeypadInputCECKeyCodeNumbers3 MTR_NEWLY_AVAILABLE = 0x23, + MTRKeypadInputCECKeyCodeNumbers4 MTR_NEWLY_AVAILABLE = 0x24, + MTRKeypadInputCECKeyCodeNumbers5 MTR_NEWLY_AVAILABLE = 0x25, + MTRKeypadInputCECKeyCodeNumbers6 MTR_NEWLY_AVAILABLE = 0x26, + MTRKeypadInputCECKeyCodeNumbers7 MTR_NEWLY_AVAILABLE = 0x27, + MTRKeypadInputCECKeyCodeNumbers8 MTR_NEWLY_AVAILABLE = 0x28, + MTRKeypadInputCECKeyCodeNumbers9 MTR_NEWLY_AVAILABLE = 0x29, + MTRKeypadInputCECKeyCodeDot MTR_NEWLY_AVAILABLE = 0x2A, + MTRKeypadInputCECKeyCodeEnter MTR_NEWLY_AVAILABLE = 0x2B, + MTRKeypadInputCECKeyCodeClear MTR_NEWLY_AVAILABLE = 0x2C, + MTRKeypadInputCECKeyCodeNextFavorite MTR_NEWLY_AVAILABLE = 0x2F, + MTRKeypadInputCECKeyCodeChannelUp MTR_NEWLY_AVAILABLE = 0x30, + MTRKeypadInputCECKeyCodeChannelDown MTR_NEWLY_AVAILABLE = 0x31, + MTRKeypadInputCECKeyCodePreviousChannel MTR_NEWLY_AVAILABLE = 0x32, + MTRKeypadInputCECKeyCodeSoundSelect MTR_NEWLY_AVAILABLE = 0x33, + MTRKeypadInputCECKeyCodeInputSelect MTR_NEWLY_AVAILABLE = 0x34, + MTRKeypadInputCECKeyCodeDisplayInformation MTR_NEWLY_AVAILABLE = 0x35, + MTRKeypadInputCECKeyCodeHelp MTR_NEWLY_AVAILABLE = 0x36, + MTRKeypadInputCECKeyCodePageUp MTR_NEWLY_AVAILABLE = 0x37, + MTRKeypadInputCECKeyCodePageDown MTR_NEWLY_AVAILABLE = 0x38, + MTRKeypadInputCECKeyCodePower MTR_NEWLY_AVAILABLE = 0x40, + MTRKeypadInputCECKeyCodeVolumeUp MTR_NEWLY_AVAILABLE = 0x41, + MTRKeypadInputCECKeyCodeVolumeDown MTR_NEWLY_AVAILABLE = 0x42, + MTRKeypadInputCECKeyCodeMute MTR_NEWLY_AVAILABLE = 0x43, + MTRKeypadInputCECKeyCodePlay MTR_NEWLY_AVAILABLE = 0x44, + MTRKeypadInputCECKeyCodeStop MTR_NEWLY_AVAILABLE = 0x45, + MTRKeypadInputCECKeyCodePause MTR_NEWLY_AVAILABLE = 0x46, + MTRKeypadInputCECKeyCodeRecord MTR_NEWLY_AVAILABLE = 0x47, + MTRKeypadInputCECKeyCodeRewind MTR_NEWLY_AVAILABLE = 0x48, + MTRKeypadInputCECKeyCodeFastForward MTR_NEWLY_AVAILABLE = 0x49, + MTRKeypadInputCECKeyCodeEject MTR_NEWLY_AVAILABLE = 0x4A, + MTRKeypadInputCECKeyCodeForward MTR_NEWLY_AVAILABLE = 0x4B, + MTRKeypadInputCECKeyCodeBackward MTR_NEWLY_AVAILABLE = 0x4C, + MTRKeypadInputCECKeyCodeStopRecord MTR_NEWLY_AVAILABLE = 0x4D, + MTRKeypadInputCECKeyCodePauseRecord MTR_NEWLY_AVAILABLE = 0x4E, + MTRKeypadInputCECKeyCodeReserved MTR_NEWLY_AVAILABLE = 0x4F, + MTRKeypadInputCECKeyCodeAngle MTR_NEWLY_AVAILABLE = 0x50, + MTRKeypadInputCECKeyCodeSubPicture MTR_NEWLY_AVAILABLE = 0x51, + MTRKeypadInputCECKeyCodeVideoOnDemand MTR_NEWLY_AVAILABLE = 0x52, + MTRKeypadInputCECKeyCodeElectronicProgramGuide MTR_NEWLY_AVAILABLE = 0x53, + MTRKeypadInputCECKeyCodeTimerProgramming MTR_NEWLY_AVAILABLE = 0x54, + MTRKeypadInputCECKeyCodeInitialConfiguration MTR_NEWLY_AVAILABLE = 0x55, + MTRKeypadInputCECKeyCodeSelectBroadcastType MTR_NEWLY_AVAILABLE = 0x56, + MTRKeypadInputCECKeyCodeSelectSoundPresentation MTR_NEWLY_AVAILABLE = 0x57, + MTRKeypadInputCECKeyCodePlayFunction MTR_NEWLY_AVAILABLE = 0x60, + MTRKeypadInputCECKeyCodePausePlayFunction MTR_NEWLY_AVAILABLE = 0x61, + MTRKeypadInputCECKeyCodeRecordFunction MTR_NEWLY_AVAILABLE = 0x62, + MTRKeypadInputCECKeyCodePauseRecordFunction MTR_NEWLY_AVAILABLE = 0x63, + MTRKeypadInputCECKeyCodeStopFunction MTR_NEWLY_AVAILABLE = 0x64, + MTRKeypadInputCECKeyCodeMuteFunction MTR_NEWLY_AVAILABLE = 0x65, + MTRKeypadInputCECKeyCodeRestoreVolumeFunction MTR_NEWLY_AVAILABLE = 0x66, + MTRKeypadInputCECKeyCodeTuneFunction MTR_NEWLY_AVAILABLE = 0x67, + MTRKeypadInputCECKeyCodeSelectMediaFunction MTR_NEWLY_AVAILABLE = 0x68, + MTRKeypadInputCECKeyCodeSelectAvInputFunction MTR_NEWLY_AVAILABLE = 0x69, + MTRKeypadInputCECKeyCodeSelectAudioInputFunction MTR_NEWLY_AVAILABLE = 0x6A, + MTRKeypadInputCECKeyCodePowerToggleFunction MTR_NEWLY_AVAILABLE = 0x6B, + MTRKeypadInputCECKeyCodePowerOffFunction MTR_NEWLY_AVAILABLE = 0x6C, + MTRKeypadInputCECKeyCodePowerOnFunction MTR_NEWLY_AVAILABLE = 0x6D, + MTRKeypadInputCECKeyCodeF1Blue MTR_NEWLY_AVAILABLE = 0x71, + MTRKeypadInputCECKeyCodeF2Red MTR_NEWLY_AVAILABLE = 0x72, + MTRKeypadInputCECKeyCodeF3Green MTR_NEWLY_AVAILABLE = 0x73, + MTRKeypadInputCECKeyCodeF4Yellow MTR_NEWLY_AVAILABLE = 0x74, + MTRKeypadInputCECKeyCodeF5 MTR_NEWLY_AVAILABLE = 0x75, + MTRKeypadInputCECKeyCodeData MTR_NEWLY_AVAILABLE = 0x76, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRKeypadInputCecKeyCode) { - MTRKeypadInputCecKeyCodeSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRKeypadInputCecKeyCodeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRKeypadInputCecKeyCodeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRKeypadInputCecKeyCodeLeft MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRKeypadInputCecKeyCodeRight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRKeypadInputCecKeyCodeRightUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRKeypadInputCecKeyCodeRightDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRKeypadInputCecKeyCodeLeftUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRKeypadInputCecKeyCodeLeftDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRKeypadInputCecKeyCodeRootMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRKeypadInputCecKeyCodeSetupMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRKeypadInputCecKeyCodeContentsMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRKeypadInputCecKeyCodeFavoriteMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, - MTRKeypadInputCecKeyCodeExit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, - MTRKeypadInputCecKeyCodeMediaTopMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x11, - MTRKeypadInputCecKeyCodeNumberEntryMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1D, - MTRKeypadInputCecKeyCodeNumber11 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1E, - MTRKeypadInputCecKeyCodeNumber12 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1F, - MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRKeypadInputCecKeyCodeNumbers1 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x21, - MTRKeypadInputCecKeyCodeNumbers2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x22, - MTRKeypadInputCecKeyCodeNumbers3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x23, - MTRKeypadInputCecKeyCodeNumbers4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x24, - MTRKeypadInputCecKeyCodeNumbers5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x25, - MTRKeypadInputCecKeyCodeNumbers6 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x26, - MTRKeypadInputCecKeyCodeNumbers7 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x27, - MTRKeypadInputCecKeyCodeNumbers8 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x28, - MTRKeypadInputCecKeyCodeNumbers9 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x29, - MTRKeypadInputCecKeyCodeDot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2A, - MTRKeypadInputCecKeyCodeEnter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2B, - MTRKeypadInputCecKeyCodeClear MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2C, - MTRKeypadInputCecKeyCodeNextFavorite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2F, - MTRKeypadInputCecKeyCodeChannelUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x30, - MTRKeypadInputCecKeyCodeChannelDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x31, - MTRKeypadInputCecKeyCodePreviousChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x32, - MTRKeypadInputCecKeyCodeSoundSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x33, - MTRKeypadInputCecKeyCodeInputSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x34, - MTRKeypadInputCecKeyCodeDisplayInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x35, - MTRKeypadInputCecKeyCodeHelp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x36, - MTRKeypadInputCecKeyCodePageUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x37, - MTRKeypadInputCecKeyCodePageDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x38, - MTRKeypadInputCecKeyCodePower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRKeypadInputCecKeyCodeVolumeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x41, - MTRKeypadInputCecKeyCodeVolumeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x42, - MTRKeypadInputCecKeyCodeMute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x43, - MTRKeypadInputCecKeyCodePlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x44, - MTRKeypadInputCecKeyCodeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x45, - MTRKeypadInputCecKeyCodePause MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x46, - MTRKeypadInputCecKeyCodeRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x47, - MTRKeypadInputCecKeyCodeRewind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x48, - MTRKeypadInputCecKeyCodeFastForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x49, - MTRKeypadInputCecKeyCodeEject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4A, - MTRKeypadInputCecKeyCodeForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4B, - MTRKeypadInputCecKeyCodeBackward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4C, - MTRKeypadInputCecKeyCodeStopRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4D, - MTRKeypadInputCecKeyCodePauseRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4E, - MTRKeypadInputCecKeyCodeReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4F, - MTRKeypadInputCecKeyCodeAngle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x50, - MTRKeypadInputCecKeyCodeSubPicture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x51, - MTRKeypadInputCecKeyCodeVideoOnDemand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x52, - MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x53, - MTRKeypadInputCecKeyCodeTimerProgramming MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x54, - MTRKeypadInputCecKeyCodeInitialConfiguration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x55, - MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x56, - MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x57, - MTRKeypadInputCecKeyCodePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x60, - MTRKeypadInputCecKeyCodePausePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x61, - MTRKeypadInputCecKeyCodeRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x62, - MTRKeypadInputCecKeyCodePauseRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x63, - MTRKeypadInputCecKeyCodeStopFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x64, - MTRKeypadInputCecKeyCodeMuteFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x65, - MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x66, - MTRKeypadInputCecKeyCodeTuneFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x67, - MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x68, - MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x69, - MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6A, - MTRKeypadInputCecKeyCodePowerToggleFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6B, - MTRKeypadInputCecKeyCodePowerOffFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6C, - MTRKeypadInputCecKeyCodePowerOnFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x6D, - MTRKeypadInputCecKeyCodeF1Blue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x71, - MTRKeypadInputCecKeyCodeF2Red MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x72, - MTRKeypadInputCecKeyCodeF3Green MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x73, - MTRKeypadInputCecKeyCodeF4Yellow MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x74, - MTRKeypadInputCecKeyCodeF5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x75, - MTRKeypadInputCecKeyCodeData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x76, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRKeypadInputCecKeyCodeSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelect") + = 0x00, + MTRKeypadInputCecKeyCodeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeUp") + = 0x01, + MTRKeypadInputCecKeyCodeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDown") + = 0x02, + MTRKeypadInputCecKeyCodeLeft MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeft") + = 0x03, + MTRKeypadInputCecKeyCodeRight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRight") + = 0x04, + MTRKeypadInputCecKeyCodeRightUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightUp") + = 0x05, + MTRKeypadInputCecKeyCodeRightDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightDown") + = 0x06, + MTRKeypadInputCecKeyCodeLeftUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftUp") + = 0x07, + MTRKeypadInputCecKeyCodeLeftDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftDown") + = 0x08, + MTRKeypadInputCecKeyCodeRootMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRootMenu") + = 0x09, + MTRKeypadInputCecKeyCodeSetupMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSetupMenu") + = 0x0A, + MTRKeypadInputCecKeyCodeContentsMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeContentsMenu") + = 0x0B, + MTRKeypadInputCecKeyCodeFavoriteMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFavoriteMenu") + = 0x0C, + MTRKeypadInputCecKeyCodeExit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeExit") + = 0x0D, + MTRKeypadInputCecKeyCodeMediaTopMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaTopMenu") + = 0x10, + MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu") + = 0x11, + MTRKeypadInputCecKeyCodeNumberEntryMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumberEntryMode") + = 0x1D, + MTRKeypadInputCecKeyCodeNumber11 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber11") + = 0x1E, + MTRKeypadInputCecKeyCodeNumber12 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber12") + = 0x1F, + MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber0OrNumber10") + = 0x20, + MTRKeypadInputCecKeyCodeNumbers1 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers1") + = 0x21, + MTRKeypadInputCecKeyCodeNumbers2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers2") + = 0x22, + MTRKeypadInputCecKeyCodeNumbers3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers3") + = 0x23, + MTRKeypadInputCecKeyCodeNumbers4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers4") + = 0x24, + MTRKeypadInputCecKeyCodeNumbers5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers5") + = 0x25, + MTRKeypadInputCecKeyCodeNumbers6 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers6") + = 0x26, + MTRKeypadInputCecKeyCodeNumbers7 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers7") + = 0x27, + MTRKeypadInputCecKeyCodeNumbers8 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers8") + = 0x28, + MTRKeypadInputCecKeyCodeNumbers9 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers9") + = 0x29, + MTRKeypadInputCecKeyCodeDot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDot") + = 0x2A, + MTRKeypadInputCecKeyCodeEnter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEnter") + = 0x2B, + MTRKeypadInputCecKeyCodeClear MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeClear") + = 0x2C, + MTRKeypadInputCecKeyCodeNextFavorite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNextFavorite") + = 0x2F, + MTRKeypadInputCecKeyCodeChannelUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelUp") + = 0x30, + MTRKeypadInputCecKeyCodeChannelDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelDown") + = 0x31, + MTRKeypadInputCecKeyCodePreviousChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePreviousChannel") + = 0x32, + MTRKeypadInputCecKeyCodeSoundSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSoundSelect") + = 0x33, + MTRKeypadInputCecKeyCodeInputSelect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInputSelect") + = 0x34, + MTRKeypadInputCecKeyCodeDisplayInformation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDisplayInformation") + = 0x35, + MTRKeypadInputCecKeyCodeHelp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeHelp") + = 0x36, + MTRKeypadInputCecKeyCodePageUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageUp") + = 0x37, + MTRKeypadInputCecKeyCodePageDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageDown") + = 0x38, + MTRKeypadInputCecKeyCodePower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePower") + = 0x40, + MTRKeypadInputCecKeyCodeVolumeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeUp") + = 0x41, + MTRKeypadInputCecKeyCodeVolumeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeDown") + = 0x42, + MTRKeypadInputCecKeyCodeMute MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMute") + = 0x43, + MTRKeypadInputCecKeyCodePlay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlay") + = 0x44, + MTRKeypadInputCecKeyCodeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStop") + = 0x45, + MTRKeypadInputCecKeyCodePause MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePause") + = 0x46, + MTRKeypadInputCecKeyCodeRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecord") + = 0x47, + MTRKeypadInputCecKeyCodeRewind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRewind") + = 0x48, + MTRKeypadInputCecKeyCodeFastForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFastForward") + = 0x49, + MTRKeypadInputCecKeyCodeEject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEject") + = 0x4A, + MTRKeypadInputCecKeyCodeForward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeForward") + = 0x4B, + MTRKeypadInputCecKeyCodeBackward MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeBackward") + = 0x4C, + MTRKeypadInputCecKeyCodeStopRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopRecord") + = 0x4D, + MTRKeypadInputCecKeyCodePauseRecord MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecord") + = 0x4E, + MTRKeypadInputCecKeyCodeReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeReserved") + = 0x4F, + MTRKeypadInputCecKeyCodeAngle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeAngle") + = 0x50, + MTRKeypadInputCecKeyCodeSubPicture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSubPicture") + = 0x51, + MTRKeypadInputCecKeyCodeVideoOnDemand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVideoOnDemand") + = 0x52, + MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeElectronicProgramGuide") + = 0x53, + MTRKeypadInputCecKeyCodeTimerProgramming MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTimerProgramming") + = 0x54, + MTRKeypadInputCecKeyCodeInitialConfiguration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInitialConfiguration") + = 0x55, + MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectBroadcastType") + = 0x56, + MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectSoundPresentation") + = 0x57, + MTRKeypadInputCecKeyCodePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlayFunction") + = 0x60, + MTRKeypadInputCecKeyCodePausePlayFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePausePlayFunction") + = 0x61, + MTRKeypadInputCecKeyCodeRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecordFunction") + = 0x62, + MTRKeypadInputCecKeyCodePauseRecordFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecordFunction") + = 0x63, + MTRKeypadInputCecKeyCodeStopFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopFunction") + = 0x64, + MTRKeypadInputCecKeyCodeMuteFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMuteFunction") + = 0x65, + MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRestoreVolumeFunction") + = 0x66, + MTRKeypadInputCecKeyCodeTuneFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTuneFunction") + = 0x67, + MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectMediaFunction") + = 0x68, + MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAvInputFunction") + = 0x69, + MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAudioInputFunction") + = 0x6A, + MTRKeypadInputCecKeyCodePowerToggleFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerToggleFunction") + = 0x6B, + MTRKeypadInputCecKeyCodePowerOffFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOffFunction") + = 0x6C, + MTRKeypadInputCecKeyCodePowerOnFunction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOnFunction") + = 0x6D, + MTRKeypadInputCecKeyCodeF1Blue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF1Blue") + = 0x71, + MTRKeypadInputCecKeyCodeF2Red MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF2Red") + = 0x72, + MTRKeypadInputCecKeyCodeF3Green MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF3Green") + = 0x73, + MTRKeypadInputCecKeyCodeF4Yellow MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF4Yellow") + = 0x74, + MTRKeypadInputCecKeyCodeF5 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF5") + = 0x75, + MTRKeypadInputCecKeyCodeData MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCodeData") + = 0x76, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRKeypadInputCECKeyCode"); typedef NS_ENUM(uint8_t, MTRKeypadInputStatus) { MTRKeypadInputStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index affa6d51ceedd2..fac31821cf159a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1872,22 +1872,22 @@ + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeRemainingCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1897,9 +1897,9 @@ - (void)subscribeAttributeRemainingCapacityWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::RemainingCapacity::TypeInfo; + using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -11752,6 +11752,78 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } +- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::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 = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; @@ -38172,11 +38244,11 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam queue:self.callbackQueue completion:responseHandler]; } -- (void)stayActiveRequestWithCompletion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stayActiveRequestWithParams:nil completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRICDManagementClusterStayActiveRequestParams @@ -38184,7 +38256,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -38196,7 +38268,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRICDManagementClusterStayActiveResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -39136,6 +39208,461 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end +@implementation MTRBaseClusterOvenMode + +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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.endpoint); + 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.endpoint) + 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.endpoint) + 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.endpoint); + 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.endpoint) + 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; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = OvenMode::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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + @implementation MTRBaseClusterModeSelect - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion @@ -47681,6 +48208,1202 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end +@implementation MTRBaseClusterBooleanSensorConfiguration + +- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::SensitivityLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsActive::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAlarmsEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AlarmsEnabled::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 = BooleanSensorConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = BooleanSensorConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = BooleanSensorConfiguration::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 = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = BooleanSensorConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanSensorConfiguration::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterValveConfigurationAndControl + +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterOpenParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Open::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)closeWithCompletion:(MTRStatusCompletion)completion +{ + [self closeWithParams:nil completion:completion]; +} +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterCloseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Close::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setLevelWithParams:(MTRValveConfigurationAndControlClusterSetLevelParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterSetLevelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::SetLevel::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOpenDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOpenDurationWithValue:(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 = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::StartUpState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStartUpStateWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpStateWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpStateWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ValveConfigurationAndControl::Attributes::StartUpState::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::StartUpState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStartUpStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::StartUpState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOpenLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOpenLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOpenLevelWithValue:(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 = ValveConfigurationAndControl::Attributes::OpenLevel::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.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOpenLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::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 = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = ValveConfigurationAndControl::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 = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + 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 = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + 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 = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + @implementation MTRBaseClusterDemandResponseLoadControl - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion @@ -47808,42 +49531,6 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu completion:responseHandler]; } -- (void)readAttributeDeviceClassWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DemandResponseLoadControl::Attributes::DeviceClass::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeDeviceClassWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DemandResponseLoadControl::Attributes::DeviceClass::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDeviceClassWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DemandResponseLoadControl::Attributes::DeviceClass::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; @@ -48024,9 +49711,9 @@ + (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeNumberOfTransistionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransistions::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48035,11 +49722,11 @@ - (void)readAttributeNumberOfTransistionsWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeNumberOfTransistionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransistions::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48049,9 +49736,9 @@ - (void)subscribeAttributeNumberOfTransistionsWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfTransistionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransistions::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 6a10bcbf73ca5e..4d8b1bc810c398 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -127,6 +127,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeBooleanStateID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRClusterIDTypeICDManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000046, MTRClusterIDTypeTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000047, + MTRClusterIDTypeOvenModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000049, 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, @@ -145,6 +146,8 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeRVCOperationalStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000061, MTRClusterIDTypeHEPAFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000071, MTRClusterIDTypeActivatedCarbonFilterMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000072, + MTRClusterIDTypeBooleanSensorConfigurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000080, + MTRClusterIDTypeValveConfigurationAndControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000081, MTRClusterIDTypeDemandResponseLoadControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000096, MTRClusterIDTypeDoorLockID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000101, MTRClusterIDTypeWindowCoveringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000102, @@ -321,7 +324,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterScenesAttributeNameSupportID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterScenesAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -829,6 +832,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeUniqueIDID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, MTRAttributeIDTypeClusterBasicInformationAttributeCapabilityMinimaID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00000014, + MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000015, + MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID MTR_PROVISIONALLY_AVAILABLE = 0x00000016, MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -2263,6 +2268,18 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimerAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterTimerAttributeClusterRevisionID MTR_PROVISIONALLY_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, + MTRAttributeIDTypeClusterOvenModeAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ModeSelect deprecated attribute names MTRClusterModeSelectAttributeDescriptionID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterModeSelectAttributeDescriptionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -2528,16 +2545,45 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterActivatedCarbonFilterMonitoringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster BooleanSensorConfiguration attributes + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ValveConfigurationAndControl attributes + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeStartUpStateID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster DemandResponseLoadControl attributes - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDeviceClassID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransistionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, - MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeActiveEventsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomStartID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDefaultRandomDurationID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -5999,6 +6045,7 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterICDManagementCommandRegisterClientResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterICDManagementCommandUnregisterClientID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterICDManagementCommandStayActiveRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterICDManagementCommandStayActiveResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, // Cluster Timer commands MTRCommandIDTypeClusterTimerCommandSetTimerID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, @@ -6006,6 +6053,10 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterTimerCommandAddTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRCommandIDTypeClusterTimerCommandReduceTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + // Cluster OvenMode commands + MTRCommandIDTypeClusterOvenModeCommandChangeToModeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterOvenModeCommandChangeToModeResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster ModeSelect deprecated command id names MTRClusterModeSelectCommandChangeToModeID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterModeSelectCommandChangeToModeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -6068,6 +6119,14 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { // Cluster ActivatedCarbonFilterMonitoring commands MTRCommandIDTypeClusterActivatedCarbonFilterMonitoringCommandResetConditionID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster BooleanSensorConfiguration commands + MTRCommandIDTypeClusterBooleanSensorConfigurationCommandSuppressRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + + // Cluster ValveConfigurationAndControl commands + MTRCommandIDTypeClusterValveConfigurationAndControlCommandOpenID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterValveConfigurationAndControlCommandCloseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterValveConfigurationAndControlCommandSetLevelID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + // Cluster DemandResponseLoadControl commands MTRCommandIDTypeClusterDemandResponseLoadControlCommandRegisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterDemandResponseLoadControlCommandUnregisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, @@ -6911,6 +6970,14 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterRVCOperationalStateEventOperationalErrorID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTREventIDTypeClusterRVCOperationalStateEventOperationCompletionID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster BooleanSensorConfiguration events + MTREventIDTypeClusterBooleanSensorConfigurationEventAlarmsStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterBooleanSensorConfigurationEventSensorFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + + // Cluster ValveConfigurationAndControl events + MTREventIDTypeClusterValveConfigurationAndControlEventValveStateChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTREventIDTypeClusterValveConfigurationAndControlEventValveFaultID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + // Cluster DemandResponseLoadControl events MTREventIDTypeClusterDemandResponseLoadControlEventLoadControlEventStatusChangeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 574dab0174b722..c3e726a93bf8fa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -147,7 +147,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -728,6 +728,10 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary * _Nullable)readAttributeProductAppearanceWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +- (NSDictionary * _Nullable)readAttributeSpecificationVersionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeMaxPathsPerInvokeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2146,8 +2150,8 @@ 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_PROVISIONALLY_AVAILABLE; - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)stayActiveRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayActiveRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeIdleModeDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -2244,6 +2248,56 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Oven Mode + * Attributes and commands for selecting a mode from a list of supported options. + */ +MTR_PROVISIONALLY_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; + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterOvenMode (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Mode Select * Attributes and commands for selecting a mode from a list of supported options. @@ -3152,6 +3206,124 @@ MTR_PROVISIONALLY_AVAILABLE @end +/** + * Cluster Boolean Sensor Configuration + * This cluster is used to configure a boolean sensor. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterBooleanSensorConfiguration : MTRGenericCluster + +- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterBooleanSensorConfiguration (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + +/** + * Cluster Valve Configuration and Control + * This cluster is used to configure a valve. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterValveConfigurationAndControl : MTRGenericCluster + +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)closeWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)setLevelWithParams:(MTRValveConfigurationAndControlClusterSetLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOpenDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAutoCloseTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeRemainingDurationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTargetStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeStartUpStateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpStateWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeStartUpStateWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTargetLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeOpenLevelWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeValveFaultWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterValveConfigurationAndControl (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; + +@end + /** * Cluster Demand Response Load Control * This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. @@ -3167,8 +3339,6 @@ MTR_PROVISIONALLY_AVAILABLE - (void)clearLoadControlEventsRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeDeviceClassWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeNumberOfLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3179,7 +3349,7 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeNumberOfEventsPerProgramWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeNumberOfTransistionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeNumberOfTransitionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeDefaultRandomStartWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (void)writeAttributeDefaultRandomStartWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index afb24197208ed2..ca5a184f3b50b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -736,9 +736,9 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedVa return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeRemainingCapacityWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeRemainingCapacityID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID) params:params]; } - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params @@ -2760,6 +2760,16 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeProductAppearanceID) params:params]; } +- (NSDictionary * _Nullable)readAttributeSpecificationVersionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeSpecificationVersionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxPathsPerInvokeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeMaxPathsPerInvokeID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeGeneratedCommandListID) params:params]; @@ -6469,11 +6479,11 @@ - (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParam completion:responseHandler]; } -- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { [self stayActiveRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRICDManagementClusterStayActiveRequestParams @@ -6481,7 +6491,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -6495,7 +6505,7 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRICDManagementClusterStayActiveResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -6733,6 +6743,109 @@ - (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params expectedV @end +@implementation MTRClusterOvenMode + +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROvenModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedModesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeSupportedModesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeCurrentModeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) 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.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeStartUpModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOnModeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) 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.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeOnModeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOvenModeID) attributeID:@(MTRAttributeIDTypeClusterOvenModeAttributeClusterRevisionID) params:params]; +} + +@end + @implementation MTRClusterModeSelect - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -8592,6 +8705,311 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSDictionary *)d @end +@implementation MTRClusterBooleanSensorConfiguration + +- (void)suppressRequestWithParams:(MTRBooleanSensorConfigurationClusterSuppressRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BooleanSensorConfiguration::Commands::SuppressRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeSensitivityLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID) params:params]; +} + +- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSensitivityLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSensitivityLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeSensitivityLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsActiveWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsActiveID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsSuppressedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsSuppressedID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAlarmsEnabledWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID) params:params]; +} + +- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAlarmsEnabledWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAlarmsEnabledWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAlarmsEnabledID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeBooleanSensorConfigurationID) attributeID:@(MTRAttributeIDTypeClusterBooleanSensorConfigurationAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterValveConfigurationAndControl + +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterOpenParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Open::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)closeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self closeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterCloseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::Close::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)setLevelWithParams:(MTRValveConfigurationAndControlClusterSetLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterSetLevelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ValveConfigurationAndControl::Commands::SetLevel::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeOpenDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID) params:params]; +} + +- (void)writeAttributeOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOpenDurationWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOpenDurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenDurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAutoCloseTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAutoCloseTimeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRemainingDurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeRemainingDurationID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTargetStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeStartUpStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeStartUpStateID) params:params]; +} + +- (void)writeAttributeStartUpStateWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeStartUpStateWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeStartUpStateWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeStartUpStateID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeCurrentLevelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTargetLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeTargetLevelID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOpenLevelWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenLevelID) params:params]; +} + +- (void)writeAttributeOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOpenLevelWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOpenLevelWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeOpenLevelID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeValveFaultWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeValveFaultID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeEventListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeValveConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterValveConfigurationAndControlAttributeClusterRevisionID) params:params]; +} + +@end + @implementation MTRClusterDemandResponseLoadControl - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -8733,11 +9151,6 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeDeviceClassWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeDeviceClassID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeLoadControlProgramsWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID) params:params]; @@ -8763,9 +9176,9 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfEventsPerProgramID) params:params]; } -- (NSDictionary * _Nullable)readAttributeNumberOfTransistionsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNumberOfTransitionsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransistionsID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeDemandResponseLoadControlID) attributeID:@(MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfTransitionsID) params:params]; } - (NSDictionary * _Nullable)readAttributeDefaultRandomStartWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 4a697b150ee6d1..6acf413ead81d6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -4489,6 +4489,25 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterStayActiveResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRICDManagementClusterStayActiveResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRTimerClusterSetTimerParams : NSObject @@ -4607,6 +4626,57 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterChangeToModeResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTROvenModeClusterChangeToModeResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRModeSelectClusterChangeToModeParams : NSObject @@ -5394,6 +5464,126 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanSensorConfigurationClusterSuppressRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull alarmsToSuppress MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterOpenParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nullable openDuration MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterCloseParams : 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 +@interface MTRValveConfigurationAndControlClusterSetLevelParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull level MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable openDuration MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 2bda728e8cd493..77b3a652762a38 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -12065,6 +12065,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRICDManagementClusterStayActiveResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _promisedActiveDuration = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; + + other.promisedActiveDuration = self.promisedActiveDuration; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRICDManagementClusterStayActiveResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct +{ + { + self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRTimerClusterSetTimerParams - (instancetype)init { @@ -12375,6 +12454,178 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTROvenModeClusterChangeToModeParams +- (instancetype)init +{ + if (self = [super init]) { + + _newMode = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; + + other.newMode = self.newMode; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + return descriptionString; +} + +@end + +@implementation MTROvenModeClusterChangeToModeParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.newMode = self.newMode.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTROvenModeClusterChangeToModeResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _statusText = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROvenModeClusterChangeToModeResponseParams alloc] init]; + + other.status = self.status; + other.statusText = self.statusText; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +{ + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + if (decodableStruct.statusText.HasValue()) { + self.statusText = AsString(decodableStruct.statusText.Value()); + if (self.statusText == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } else { + self.statusText = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init { @@ -14741,6 +14992,328 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRBooleanSensorConfigurationClusterSuppressRequestParams +- (instancetype)init +{ + if (self = [super init]) { + + _alarmsToSuppress = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams alloc] init]; + + other.alarmsToSuppress = self.alarmsToSuppress; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToSuppress:%@; >", NSStringFromClass([self class]), _alarmsToSuppress]; + return descriptionString; +} + +@end + +@implementation MTRBooleanSensorConfigurationClusterSuppressRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRValveConfigurationAndControlClusterOpenParams +- (instancetype)init +{ + if (self = [super init]) { + + _openDuration = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; + + other.openDuration = self.openDuration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: openDuration:%@; >", NSStringFromClass([self class]), _openDuration]; + return descriptionString; +} + +@end + +@implementation MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type encodableStruct; + ListFreer listFreer; + { + if (self.openDuration != nil) { + auto & definedValue_0 = encodableStruct.openDuration.Emplace(); + definedValue_0 = self.openDuration.unsignedIntValue; + } + } + + 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 MTRValveConfigurationAndControlClusterCloseParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRValveConfigurationAndControlClusterCloseParams 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 MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::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 MTRValveConfigurationAndControlClusterSetLevelParams +- (instancetype)init +{ + if (self = [super init]) { + + _level = @(0); + + _openDuration = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRValveConfigurationAndControlClusterSetLevelParams alloc] init]; + + other.level = self.level; + other.openDuration = self.openDuration; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; openDuration:%@; >", NSStringFromClass([self class]), _level, _openDuration]; + return descriptionString; +} + +@end + +@implementation MTRValveConfigurationAndControlClusterSetLevelParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.level = self.level.unsignedCharValue; + } + { + if (self.openDuration != nil) { + auto & definedValue_0 = encodableStruct.openDuration.Emplace(); + definedValue_0 = self.openDuration.unsignedIntValue; + } + } + + 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 MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams - (instancetype)init { @@ -15042,7 +15615,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } if (element_1.powerSavingsControl != nil) { auto & definedValue_3 = listHolder_1->mList[i_1].powerSavingsControl.Emplace(); - definedValue_3.powerSavings = static_cast>(element_1.powerSavingsControl.powerSavings.unsignedCharValue); + definedValue_3.powerSavings = element_1.powerSavingsControl.powerSavings.unsignedCharValue; } if (element_1.heatingSourceControl != nil) { auto & definedValue_3 = listHolder_1->mList[i_1].heatingSourceControl.Emplace(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 720131619d587b..93339e7d817021 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -748,6 +748,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRICDManagementClusterStayActiveResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct; + +@end + @interface MTRTimerClusterSetTimerParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -772,6 +778,18 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTROvenModeClusterChangeToModeParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTROvenModeClusterChangeToModeResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct; + +@end + @interface MTRModeSelectClusterChangeToModeParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -946,6 +964,30 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRBooleanSensorConfigurationClusterSuppressRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRValveConfigurationAndControlClusterSetLevelParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 68e801089297d2..59217410fa3be4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -383,6 +383,15 @@ static BOOL CommandNeedsTimedInvokeInTimerCluster(AttributeId aAttributeId) } } } +static BOOL CommandNeedsTimedInvokeInOvenModeCluster(AttributeId aAttributeId) +{ + using namespace Clusters::OvenMode; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInModeSelectCluster(AttributeId aAttributeId) { using namespace Clusters::ModeSelect; @@ -545,6 +554,24 @@ static BOOL CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(Attr } } } +static BOOL CommandNeedsTimedInvokeInBooleanSensorConfigurationCluster(AttributeId aAttributeId) +{ + using namespace Clusters::BooleanSensorConfiguration; + switch (aAttributeId) { + default: { + return NO; + } + } +} +static BOOL CommandNeedsTimedInvokeInValveConfigurationAndControlCluster(AttributeId aAttributeId) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aAttributeId) { + default: { + return NO; + } + } +} static BOOL CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(AttributeId aAttributeId) { using namespace Clusters::DemandResponseLoadControl; @@ -1074,6 +1101,9 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::Timer::Id: { return CommandNeedsTimedInvokeInTimerCluster(commandID); } + case Clusters::OvenMode::Id: { + return CommandNeedsTimedInvokeInOvenModeCluster(commandID); + } case Clusters::ModeSelect::Id: { return CommandNeedsTimedInvokeInModeSelectCluster(commandID); } @@ -1128,6 +1158,12 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::ActivatedCarbonFilterMonitoring::Id: { return CommandNeedsTimedInvokeInActivatedCarbonFilterMonitoringCluster(commandID); } + case Clusters::BooleanSensorConfiguration::Id: { + return CommandNeedsTimedInvokeInBooleanSensorConfigurationCluster(commandID); + } + case Clusters::ValveConfigurationAndControl::Id: { + return CommandNeedsTimedInvokeInValveConfigurationAndControlCluster(commandID); + } case Clusters::DemandResponseLoadControl::Id: { return CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(commandID); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm index 1fe61e9f7b8839..43f045900f6aaf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm @@ -54,6 +54,9 @@ { 0x0000002B, DeviceTypeClass::Simple, "Matter Fan" }, { 0x0000002C, DeviceTypeClass::Simple, "Matter Air Quality Sensor" }, { 0x0000002D, DeviceTypeClass::Simple, "Matter Air Purifier" }, + { 0x00000041, DeviceTypeClass::Simple, "Matter Boolean Sensor" }, + { 0x00000042, DeviceTypeClass::Simple, "Matter Valve" }, + { 0x00000043, DeviceTypeClass::Simple, "Matter Water Leak Detector" }, { 0x00000070, DeviceTypeClass::Simple, "Matter Refrigerator" }, { 0x00000071, DeviceTypeClass::Simple, "Matter Temperature Controlled Cabinet" }, { 0x00000072, DeviceTypeClass::Simple, "Matter Room Air Conditioner" }, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index a7e313fec476a2..f6d730bdb68840 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1656,6 +1656,18 @@ static id _Nullable DecodeEventPayloadForTimerCluster(EventId aEventId, TLV::TLV *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForOvenModeCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::OvenMode; + switch (aEventId) { + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ModeSelect; @@ -2249,6 +2261,101 @@ static id _Nullable DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster( *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } +static id _Nullable DecodeEventPayloadForBooleanSensorConfigurationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::BooleanSensorConfiguration; + switch (aEventId) { + case Events::AlarmsStateChanged::Id: { + Events::AlarmsStateChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.alarmsActive.Raw()]; + value.alarmsActive = memberValue; + } while (0); + do { + NSNumber * _Nullable memberValue; + if (cppValue.alarmsSuppressed.HasValue()) { + memberValue = [NSNumber numberWithUnsignedChar:cppValue.alarmsSuppressed.Value().Raw()]; + } else { + memberValue = nil; + } + value.alarmsSuppressed = memberValue; + } while (0); + + return value; + } + case Events::SensorFault::Id: { + Events::SensorFault::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRBooleanSensorConfigurationClusterSensorFaultEvent new]; + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} +static id _Nullable DecodeEventPayloadForValveConfigurationAndControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +{ + using namespace Clusters::ValveConfigurationAndControl; + switch (aEventId) { + case Events::ValveStateChanged::Id: { + Events::ValveStateChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRValveConfigurationAndControlClusterValveStateChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.valveState)]; + value.valveState = memberValue; + } while (0); + + return value; + } + case Events::ValveFault::Id: { + Events::ValveFault::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTRValveConfigurationAndControlClusterValveFaultEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedShort:cppValue.valveFault.Raw()]; + value.valveFault = memberValue; + } while (0); + + return value; + } + default: { + break; + } + } + + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + return nil; +} static id _Nullable DecodeEventPayloadForDemandResponseLoadControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::DemandResponseLoadControl; @@ -2375,7 +2482,7 @@ static id _Nullable DecodeEventPayloadForDemandResponseLoadControlCluster(EventI memberValue = nil; } else { memberValue = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; - memberValue.powerSavings = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.powerSavingsControl.Value().Value().powerSavings)]; + memberValue.powerSavings = [NSNumber numberWithUnsignedChar:cppValue.powerSavingsControl.Value().Value().powerSavings]; } } else { memberValue = nil; @@ -3570,6 +3677,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::Timer::Id: { return DecodeEventPayloadForTimerCluster(aPath.mEventId, aReader, aError); } + case Clusters::OvenMode::Id: { + return DecodeEventPayloadForOvenModeCluster(aPath.mEventId, aReader, aError); + } case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); } @@ -3624,6 +3734,12 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ActivatedCarbonFilterMonitoring::Id: { return DecodeEventPayloadForActivatedCarbonFilterMonitoringCluster(aPath.mEventId, aReader, aError); } + case Clusters::BooleanSensorConfiguration::Id: { + return DecodeEventPayloadForBooleanSensorConfigurationCluster(aPath.mEventId, aReader, aError); + } + case Clusters::ValveConfigurationAndControl::Id: { + return DecodeEventPayloadForValveConfigurationAndControlCluster(aPath.mEventId, aReader, aError); + } case Clusters::DemandResponseLoadControl::Id: { return DecodeEventPayloadForDemandResponseLoadControlCluster(aPath.mEventId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 9533374a866d00..0c2d92b140f325 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -33,6 +33,16 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSArray * _Nonnull attributeValueList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRScenesClusterSceneInfoStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull sceneCount MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentScene MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull currentGroup MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull sceneValid MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull remainingCapacity MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) @interface MTRDescriptorClusterDeviceTypeStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -780,6 +790,19 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTROvenModeClusterModeTagStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nullable mfgCode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull value MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_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; +@end + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRModeSelectClusterSemanticTagStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull mfgCode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1004,6 +1027,26 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSString * _Nonnull productIdentifierValue MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull alarmsActive MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable alarmsSuppressed MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBooleanSensorConfigurationClusterSensorFaultEvent : NSObject +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterValveStateChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull valveState MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRValveConfigurationAndControlClusterValveFaultEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull valveFault MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRDemandResponseLoadControlClusterHeatingSourceControlStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull heatingSource MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 46dcf3cef0b058..52086da233a48f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -99,6 +99,48 @@ - (NSNumber * _Nonnull)clusterId @end +@implementation MTRScenesClusterSceneInfoStruct +- (instancetype)init +{ + if (self = [super init]) { + + _sceneCount = @(0); + + _currentScene = @(0); + + _currentGroup = @(0); + + _sceneValid = @(0); + + _remainingCapacity = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRScenesClusterSceneInfoStruct alloc] init]; + + other.sceneCount = self.sceneCount; + other.currentScene = self.currentScene; + other.currentGroup = self.currentGroup; + other.sceneValid = self.sceneValid; + other.remainingCapacity = self.remainingCapacity; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: sceneCount:%@; currentScene:%@; currentGroup:%@; sceneValid:%@; remainingCapacity:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _sceneCount, _currentScene, _currentGroup, _sceneValid, _remainingCapacity, _fabricIndex]; + return descriptionString; +} + +@end + @implementation MTRDescriptorClusterDeviceTypeStruct - (instancetype)init { @@ -2878,6 +2920,69 @@ - (NSString *)description @end +@implementation MTROvenModeClusterModeTagStruct +- (instancetype)init +{ + if (self = [super init]) { + + _mfgCode = nil; + + _value = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTROvenModeClusterModeTagStruct alloc] init]; + + other.mfgCode = self.mfgCode; + other.value = self.value; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mfgCode:%@; value:%@; >", NSStringFromClass([self class]), _mfgCode, _value]; + return descriptionString; +} + +@end + +@implementation MTROvenModeClusterModeOptionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _label = @""; + + _mode = @(0); + + _modeTags = [NSArray array]; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTROvenModeClusterModeOptionStruct alloc] init]; + + other.label = self.label; + other.mode = self.mode; + other.modeTags = self.modeTags; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; mode:%@; modeTags:%@; >", NSStringFromClass([self class]), _label, _mode, _modeTags]; + return descriptionString; +} + +@end + @implementation MTRModeSelectClusterSemanticTagStruct - (instancetype)init { @@ -3975,6 +4080,113 @@ - (NSString *)description @end +@implementation MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _alarmsActive = @(0); + + _alarmsSuppressed = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRBooleanSensorConfigurationClusterAlarmsStateChangedEvent alloc] init]; + + other.alarmsActive = self.alarmsActive; + other.alarmsSuppressed = self.alarmsSuppressed; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsActive:%@; alarmsSuppressed:%@; >", NSStringFromClass([self class]), _alarmsActive, _alarmsSuppressed]; + return descriptionString; +} + +@end + +@implementation MTRBooleanSensorConfigurationClusterSensorFaultEvent +- (instancetype)init +{ + if (self = [super init]) { + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRBooleanSensorConfigurationClusterSensorFaultEvent alloc] init]; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRValveConfigurationAndControlClusterValveStateChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _valveState = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRValveConfigurationAndControlClusterValveStateChangedEvent alloc] init]; + + other.valveState = self.valveState; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: valveState:%@; >", NSStringFromClass([self class]), _valveState]; + return descriptionString; +} + +@end + +@implementation MTRValveConfigurationAndControlClusterValveFaultEvent +- (instancetype)init +{ + if (self = [super init]) { + + _valveFault = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRValveConfigurationAndControlClusterValveFaultEvent alloc] init]; + + other.valveFault = self.valveFault; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: valveFault:%@; >", NSStringFromClass([self class]), _valveFault]; + return descriptionString; +} + +@end + @implementation MTRDemandResponseLoadControlClusterHeatingSourceControlStruct - (instancetype)init { diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index e29c00161337db..c5b2359fdcab89 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -346,6 +346,15 @@ #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 #endif +/** + * CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + * + * Enable support for WiFi Per-Device Credentials + */ +#ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC 0 +#endif + /** * CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL * diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 29addac5cb88d4..4ebf2c6edf4d36 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -26,8 +26,9 @@ #include +#include + #if CHIP_HAVE_CONFIG_H -#include #include #endif diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index d1bbd22a93a3a2..20be5ac9ae6b62 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include diff --git a/src/include/platform/DiagnosticDataProvider.h b/src/include/platform/DiagnosticDataProvider.h index 338c43947fb472..a99ca6ee61beb1 100644 --- a/src/include/platform/DiagnosticDataProvider.h +++ b/src/include/platform/DiagnosticDataProvider.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include namespace chip { diff --git a/src/include/platform/KeyValueStoreManager.h b/src/include/platform/KeyValueStoreManager.h index eb24efbb091763..cb777571d486b3 100644 --- a/src/include/platform/KeyValueStoreManager.h +++ b/src/include/platform/KeyValueStoreManager.h @@ -30,7 +30,7 @@ #include #include -#include +#include namespace chip { namespace DeviceLayer { diff --git a/src/include/platform/LockTracker.h b/src/include/platform/LockTracker.h index 0c240f229c0c03..3e0a7781479462 100644 --- a/src/include/platform/LockTracker.h +++ b/src/include/platform/LockTracker.h @@ -17,7 +17,7 @@ #pragma once -#include +#include /// Defines support for asserting that the chip stack is locked by the current thread via /// the macro: diff --git a/src/include/platform/NetworkCommissioning.h b/src/include/platform/NetworkCommissioning.h index 8ae56f3cd80d0b..90b0d515269147 100644 --- a/src/include/platform/NetworkCommissioning.h +++ b/src/include/platform/NetworkCommissioning.h @@ -23,10 +23,14 @@ #pragma once +#include +#include #include #include #include #include +#include +#include #include #include @@ -79,8 +83,12 @@ class Iterator struct Network { uint8_t networkID[kMaxNetworkIDLen]; - uint8_t networkIDLen; - bool connected; + uint8_t networkIDLen = 0; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + Optional networkIdentifier; + Optional clientIdentifier; +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + bool connected = false; }; static_assert(sizeof(Network::networkID) <= std::numeric_limits::max(), @@ -276,6 +284,72 @@ class WiFiDriver : public Internal::WirelessDriver */ virtual void ScanNetworks(ByteSpan ssid, ScanCallback * callback) = 0; +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + virtual bool SupportsPerDeviceCredentials() { return false; }; + + /** + * @brief Adds or updates a WiFi network with Per-Device Credentials on the device. + * + * @param ssid The SSID of the network to be added / updated. + * @param networkIdentity The Network Identity of the network, in compact-pdc-identity format. + * @param clientIdentityNetworkIndex If present, the index of the existing network configuration of which the Client + * Identity is to be re-used. Otherwise a new Client Identity shall be generated. + * @param outStatus The application-level status code (Status::kSuccess on success). + * @param outDebugText A debug text buffer that may be populated by the driver. The size of the span + * must be reduced to the length of text emitted (or 0, if none). + * @param outClientIdentity On success, the Client Identity that was generated or copied, depending on the + * presence of `clientIdentityNetworkIndex`. + * @param outNextworkIndex On success, the index of the network entry that was added or updated. + * + * @retval CHIP_NO_ERROR and outStatus == kSuccess on success. + * @retval CHIP_NO_ERROR and outStatus != kSuccess for application-level errors. outDebugText should be populated. + * @retval CHIP_ERROR_* on internal errors. None of the output parameters will be examined in this case. + */ + virtual CHIP_ERROR AddOrUpdateNetworkWithPDC(ByteSpan ssid, ByteSpan networkIdentity, + Optional clientIdentityNetworkIndex, Status & outStatus, + MutableCharSpan & outDebugText, MutableByteSpan & outClientIdentity, + uint8_t & outNetworkIndex) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + + /** + * @brief Retrieves the Network Identity associated with a network. + * + * @param networkIndex The 0-based index of the network. + * @param outNetworkIdentity The output buffer to be populated with the Network + * Identity in compact-pdc-identity TLV format. + * + * @return CHIP_NO_ERROR on success or a CHIP_ERROR on failure. + */ + virtual CHIP_ERROR GetNetworkIdentity(uint8_t networkIndex, MutableByteSpan & outNetworkIdentity) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + + /** + * @brief Retrieves the Network Client Identity associated with a network. + * + * @param networkIndex The 0-based index of the network. + * @param outNetworkIdentity The output buffer to be populated with the Network + * Client Identity in compact-pdc-identity TLV format. + * + * @return CHIP_NO_ERROR on success or a CHIP_ERROR on failure. + */ + virtual CHIP_ERROR GetClientIdentity(uint8_t networkIndex, MutableByteSpan & outClientIdentity) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } + + /** + * @brief Signs the specified message with the private key of a Network Client Identity. + */ + virtual CHIP_ERROR SignWithClientIdentity(uint8_t networkIndex, ByteSpan & message, Crypto::P256ECDSASignature & outSignature) + { + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC + ~WiFiDriver() override = default; }; diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h index a0f5abfec4e134..4ce673ec4129c4 100644 --- a/src/include/platform/PlatformManager.h +++ b/src/include/platform/PlatformManager.h @@ -24,7 +24,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp index ee87cfb7726989..5c50a8dfdaf6ca 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp @@ -107,7 +107,10 @@ void GenericPlatformManagerImpl_POSIX::_UnlockChipStack() #if CHIP_STACK_LOCK_TRACKING_ENABLED if (!mChipStackIsLocked) { - ChipLogError(DeviceLayer, "_UnlockChipStack may error status"); + ChipLogError(DeviceLayer, "_UnlockChipStack while unlocked"); +#if CHIP_STACK_LOCK_TRACKING_ERROR_FATAL + chipDie(); +#endif } mChipStackIsLocked = false; #endif diff --git a/src/inet/BUILD.gn b/src/inet/BUILD.gn index 3f81be89647e6f..08004fe337d519 100644 --- a/src/inet/BUILD.gn +++ b/src/inet/BUILD.gn @@ -56,6 +56,8 @@ buildconfig_header("inet_buildconfig") { defines += [ "INET_TCP_END_POINT_IMPL_CONFIG_FILE=" ] defines += [ "INET_UDP_END_POINT_IMPL_CONFIG_FILE=" ] + + visibility = [ ":inet_config_header" ] } source_set("inet_config_header") { @@ -63,10 +65,9 @@ source_set("inet_config_header") { public_configs = [ "${chip_root}/src:includes" ] - public_deps = [ - ":inet_buildconfig", - "${chip_root}/src/system:system_config_header", - ] + public_deps = [ "${chip_root}/src/system:system_config_header" ] + + deps = [ ":inet_buildconfig" ] } static_library("inet") { @@ -97,7 +98,7 @@ static_library("inet") { public_deps = [ ":inet_config_header", "${chip_root}/src/lib/support", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", "${chip_root}/src/system", "${nlio_root}:nlio", ] diff --git a/src/lib/address_resolve/tool.cpp b/src/lib/address_resolve/tool.cpp index 4252232e6e9ba8..8423649ca928a0 100644 --- a/src/lib/address_resolve/tool.cpp +++ b/src/lib/address_resolve/tool.cpp @@ -119,7 +119,8 @@ bool Cmd_Node(int argc, const char ** argv) return false; } - ChipLogProgress(NotSpecified, "Will search for node %" PRIx64 " on fabric %" PRIx64, node, fabric); + ChipLogProgress(NotSpecified, "Will search for node 0x" ChipLogFormatX64 " on fabric 0x" ChipLogFormatX64, + ChipLogValueX64(node), ChipLogValueX64(fabric)); AddressResolve::NodeLookupRequest request(PeerId().SetNodeId(node).SetCompressedFabricId(fabric)); diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn index 60c27502bb0f3c..85f8b8c6449592 100644 --- a/src/lib/core/BUILD.gn +++ b/src/lib/core/BUILD.gn @@ -69,6 +69,8 @@ buildconfig_header("chip_buildconfig") { "CHIP_CONFIG_TLV_VALIDATE_CHAR_STRING_ON_WRITE=${chip_tlv_validate_char_string_on_write}", "CHIP_CONFIG_TLV_VALIDATE_CHAR_STRING_ON_READ=${chip_tlv_validate_char_string_on_read}", ] + + visibility = [ ":chip_config_header" ] } source_set("chip_config_header") { @@ -77,12 +79,13 @@ source_set("chip_config_header") { public_configs = [ "${chip_root}/src:includes" ] public_deps = [ - ":chip_buildconfig", "${chip_root}/src/ble:ble_config_header", "${chip_root}/src/inet:inet_config_header", "${chip_root}/src/system:system_config_header", ] + deps = [ ":chip_buildconfig" ] + allow_circular_includes_from = [ "${chip_root}/src/ble:ble_config_header" ] } diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 1a25b18e339ec5..8e8856d34be78e 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1444,7 +1444,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #endif /** - * @ def CHIP_CONFIG_MAX_SCENES_TABLE_SIZE + * @def CHIP_CONFIG_MAX_SCENES_TABLE_SIZE * * @brief This defines how many scenes a single endpoint is allowed to allocate in flash memory. This value MUST at least 16 * per spec and MUST be increased to allow for configuring a greater scene table size from Zap. @@ -1457,6 +1457,17 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #endif // CHIP_CONFIG_TEST #endif // CHIP_CONFIG_MAX_SCENES_TABLE_SIZE +/** + * @def CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + * + * @brief This define enables the automatic registration of the default scene handlers in the scene table for each sceneable + * cluster. If a user wants to use their own scene handlers, they can disable this flag and implement their own handlers. They can + * use ScenesServer::Instance().RegisterSceneHandler() to have their handlers called when a scene is recalled or stored. + */ +#ifndef CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS +#define CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS 1 +#endif // CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS + /** * @def CHIP_CONFIG_TIME_ZONE_LIST_MAX_SIZE * @@ -1600,6 +1611,19 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED 0 #endif +/** + * @def CHIP_CONFIG_MAX_PATHS_PER_INVOKE + * + * @brief The maximum number of elements in the InvokeRequests list that the Node is able to process. + */ +#ifndef CHIP_CONFIG_MAX_PATHS_PER_INVOKE +#define CHIP_CONFIG_MAX_PATHS_PER_INVOKE 1 +#endif + +#if CHIP_CONFIG_MAX_PATHS_PER_INVOKE < 1 || CHIP_CONFIG_MAX_PATHS_PER_INVOKE > 65535 +#error "CHIP_CONFIG_MAX_PATHS_PER_INVOKE is not allowed to be a number less than 1 or greater than 65535" +#endif + /** * @def CHIP_CONFIG_ICD_OBSERVERS_POOL_SIZE * diff --git a/src/lib/core/TLVTags.cpp b/src/lib/core/TLVTags.cpp index 8d3e744b4667a3..bc44d52af12490 100644 --- a/src/lib/core/TLVTags.cpp +++ b/src/lib/core/TLVTags.cpp @@ -38,7 +38,7 @@ StringBuilderBase & Tag::AppendTo(StringBuilderBase & out) } else { - out.AddFormat("UnknownTag(0x%" PRIX64 ")", mVal); + out.AddFormat("UnknownTag(0x" ChipLogFormatX64 ")", ChipLogValueX64(mVal)); } return out; diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 1c44f3191445d5..fde92cc5adbe82 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -251,7 +251,8 @@ static_library("support") { ":verifymacros_no_logging", "${chip_root}/src/lib/core:chip_config_header", "${chip_root}/src/lib/core:error", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", + "${chip_root}/src/system:system_config_header", "${nlassert_root}:nlassert", "${nlio_root}:nlio", ] @@ -311,6 +312,7 @@ static_library("testing") { public_deps = [ ":support", "${chip_root}/src/lib/core", + "${chip_root}/src/platform", "${nlassert_root}:nlassert", "${nlunit_test_root}:nlunit-test", ] diff --git a/src/lib/support/PersistedCounter.h b/src/lib/support/PersistedCounter.h index a8caeb467a3f3e..8e52b9e6077699 100644 --- a/src/lib/support/PersistedCounter.h +++ b/src/lib/support/PersistedCounter.h @@ -95,7 +95,8 @@ class PersistedCounter : public MonotonicallyIncreasingCounter // Compiler should optimize these branches. if (is_same_v) { - ChipLogDetail(EventLogging, "PersistedCounter::Init() aEpoch 0x%" PRIx64 " startValue 0x%" PRIx64, aEpoch, startValue); + ChipLogDetail(EventLogging, "PersistedCounter::Init() aEpoch 0x" ChipLogFormatX64 " startValue 0x" ChipLogFormatX64, + ChipLogValueX64(aEpoch), ChipLogValueX64(startValue)); } else if (is_same_v) { @@ -153,7 +154,8 @@ class PersistedCounter : public MonotonicallyIncreasingCounter // Compiler should optimize these branches. if (is_same_v) { - ChipLogDetail(EventLogging, "PersistedCounter::WriteStartValue() aStartValue 0x%" PRIx64, aStartValue); + ChipLogDetail(EventLogging, "PersistedCounter::WriteStartValue() aStartValue 0x" ChipLogFormatX64, + ChipLogValueX64(aStartValue)); } else { diff --git a/src/lib/support/PersistentStorageMacros.h b/src/lib/support/PersistentStorageMacros.h index 57038b5751b861..986686d9facbb0 100644 --- a/src/lib/support/PersistentStorageMacros.h +++ b/src/lib/support/PersistentStorageMacros.h @@ -37,6 +37,7 @@ namespace chip { /* 2 * sizeof(chip::NodeId) to accommodate 2 character for each byte in Node Id */ \ char key[len + 2 * sizeof(chip::NodeId) + 1]; \ nlSTATIC_ASSERT_PRINT(sizeof(node) <= sizeof(uint64_t), "Node ID size is greater than expected"); \ + /* Be careful about switching to ChipLogFormatX64: it would change the storage keys! */ \ snprintf(key, sizeof(key), "%s%" PRIx64, keyPrefix, node); \ action; \ } while (0) diff --git a/src/lib/support/UnitTestUtils.cpp b/src/lib/support/UnitTestUtils.cpp index c63bd5be015596..84976405a20940 100644 --- a/src/lib/support/UnitTestUtils.cpp +++ b/src/lib/support/UnitTestUtils.cpp @@ -18,7 +18,7 @@ #include // Platform specific includes for test_utils -#include +#include #if CHIP_DEVICE_LAYER_TARGET_EFR32 || CHIP_DEVICE_LAYER_TARGET_AMEBA #include #include diff --git a/src/messaging/BUILD.gn b/src/messaging/BUILD.gn index cd32155d71a5d7..7289e7413b0039 100644 --- a/src/messaging/BUILD.gn +++ b/src/messaging/BUILD.gn @@ -77,8 +77,4 @@ static_library("messaging") { "${chip_root}/src/transport", "${chip_root}/src/transport/raw", ] - - if (chip_enable_icd_server) { - public_deps += [ "${chip_root}/src/app/icd:manager" ] - } } diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index e22bd4db24a517..53d0487b7b826b 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -89,9 +89,10 @@ void ReliableMessageMgr::TicklessDebugDumpRetransTable(const char * log) mRetransTable.ForEachActiveObject([&](auto * entry) { ChipLogDetail(ExchangeManager, - "EC:" ChipLogFormatExchange " MessageCounter:" ChipLogFormatMessageCounter " NextRetransTimeCtr:%" PRIu64, + "EC:" ChipLogFormatExchange " MessageCounter:" ChipLogFormatMessageCounter + " NextRetransTimeCtr: 0x" ChipLogFormatX64, ChipLogValueExchange(&entry->ec.Get()), entry->retainedBuf.GetMessageCounter(), - entry->nextRetransTime.count()); + ChipLogValueX64(entry->nextRetransTime.count())); return Loop::Continue; }); #endif @@ -102,7 +103,7 @@ void ReliableMessageMgr::ExecuteActions() System::Clock::Timestamp now = System::SystemClock().GetMonotonicTimestamp(); #if defined(RMP_TICKLESS_DEBUG) - ChipLogDetail(ExchangeManager, "ReliableMessageMgr::ExecuteActions at %" PRIu64 "ms", now.count()); + ChipLogDetail(ExchangeManager, "ReliableMessageMgr::ExecuteActions at 0x" ChipLogFormatX64 "ms", ChipLogValueX64(now.count())); #endif ExecuteForAllContext([&](ReliableMessageContext * rc) { @@ -397,8 +398,10 @@ void ReliableMessageMgr::StartTimer() const auto nextWakeDelay = (nextWakeTime > now) ? nextWakeTime - now : 0_ms; #if defined(RMP_TICKLESS_DEBUG) - ChipLogDetail(ExchangeManager, "ReliableMessageMgr::StartTimer at %" PRIu64 "ms wake at %" PRIu64 "ms (in %" PRIu64 "ms)", - now.count(), nextWakeTime.count(), nextWakeDelay.count()); + ChipLogDetail(ExchangeManager, + "ReliableMessageMgr::StartTimer at 0x" ChipLogFormatX64 "ms wake at 0x" ChipLogFormatX64 + "ms (in 0x" ChipLogFormatX64 "ms)", + ChipLogValueX64(now.count()), ChipLogValueX64(nextWakeTime.count()), ChipLogValueX64(nextWakeDelay.count())); #endif VerifyOrDie(mSystemLayer->StartTimer(nextWakeDelay, Timeout, this) == CHIP_NO_ERROR); } diff --git a/src/messaging/ReliableMessageProtocolConfig.cpp b/src/messaging/ReliableMessageProtocolConfig.cpp index 652531c8ee8567..c81325432cc51b 100644 --- a/src/messaging/ReliableMessageProtocolConfig.cpp +++ b/src/messaging/ReliableMessageProtocolConfig.cpp @@ -27,10 +27,7 @@ #include #include -#if CHIP_CONFIG_ENABLE_ICD_SERVER -#include // nogncheck -#include // nogncheck -#endif +#include namespace chip { @@ -73,9 +70,9 @@ Optional GetLocalMRPConfig() // TODO ICD LIT shall not advertise the SII key // Increase local MRP retry intervals by ICD polling intervals. That is, intervals for // which the device can be at sleep and not be able to receive any messages). - config.mIdleRetransTimeout += app::ICDManager::GetSlowPollingInterval(); - config.mActiveRetransTimeout += app::ICDManager::GetFastPollingInterval(); - config.mActiveThresholdTime = System::Clock::Milliseconds16(ICDManagementServer::GetInstance().GetActiveModeThresholdMs()); + config.mIdleRetransTimeout += CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; + config.mActiveRetransTimeout += CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; + config.mActiveThresholdTime = System::Clock::Milliseconds16(CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD_MS); #endif #if CONFIG_BUILD_FOR_HOST_UNIT_TEST diff --git a/src/messaging/tests/MessagingContext.cpp b/src/messaging/tests/MessagingContext.cpp index a7cf5369cccef1..3073d7490c8280 100644 --- a/src/messaging/tests/MessagingContext.cpp +++ b/src/messaging/tests/MessagingContext.cpp @@ -105,10 +105,10 @@ void MessagingContext::SetMRPMode(MRPMode mode) { if (mode == MRPMode::kDefault) { - mSessionBobToAlice->AsSecureSession()->SetRemoteMRPConfig(GetDefaultMRPConfig()); - mSessionAliceToBob->AsSecureSession()->SetRemoteMRPConfig(GetDefaultMRPConfig()); - mSessionCharlieToDavid->AsSecureSession()->SetRemoteMRPConfig(GetDefaultMRPConfig()); - mSessionDavidToCharlie->AsSecureSession()->SetRemoteMRPConfig(GetDefaultMRPConfig()); + mSessionBobToAlice->AsSecureSession()->SetRemoteSessionParameters(GetDefaultMRPConfig()); + mSessionAliceToBob->AsSecureSession()->SetRemoteSessionParameters(GetDefaultMRPConfig()); + mSessionCharlieToDavid->AsSecureSession()->SetRemoteSessionParameters(GetDefaultMRPConfig()); + mSessionDavidToCharlie->AsSecureSession()->SetRemoteSessionParameters(GetDefaultMRPConfig()); #if CONFIG_BUILD_FOR_HOST_UNIT_TEST ClearLocalMRPConfigOverride(); @@ -132,13 +132,13 @@ void MessagingContext::SetMRPMode(MRPMode mode) VerifyOrDie(false); #endif - mSessionBobToAlice->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + mSessionBobToAlice->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( MessagingContext::kResponsiveIdleRetransTimeout, MessagingContext::kResponsiveActiveRetransTimeout)); - mSessionAliceToBob->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + mSessionAliceToBob->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( MessagingContext::kResponsiveIdleRetransTimeout, MessagingContext::kResponsiveActiveRetransTimeout)); - mSessionCharlieToDavid->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + mSessionCharlieToDavid->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( MessagingContext::kResponsiveIdleRetransTimeout, MessagingContext::kResponsiveActiveRetransTimeout)); - mSessionDavidToCharlie->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + mSessionDavidToCharlie->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( MessagingContext::kResponsiveIdleRetransTimeout, MessagingContext::kResponsiveActiveRetransTimeout)); } } diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp index 257f95bfb76ade..5bf92fb69b30d7 100644 --- a/src/messaging/tests/TestAbortExchangesForFabric.cpp +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp @@ -163,10 +163,10 @@ void CommonCheckAbortAllButOneExchange(nlTestSuite * inSuite, TestContext & ctx, const auto & sessionHandle1 = session1.Get(); const auto & sessionHandle2 = session2.Get(); - session1->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + session1->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( Test::MessagingContext::kResponsiveIdleRetransTimeout, Test::MessagingContext::kResponsiveActiveRetransTimeout)); - session1Reply->AsSecureSession()->SetRemoteMRPConfig(ReliableMessageProtocolConfig( + session1Reply->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig( Test::MessagingContext::kResponsiveIdleRetransTimeout, Test::MessagingContext::kResponsiveActiveRetransTimeout)); NL_TEST_ASSERT(inSuite, session1); diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 6d4e53ecbca962..6ef5f796abc25d 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -395,10 +395,10 @@ void TestReliableMessageProtocol::CheckResendApplicationMessage(nlTestSuite * in ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ System::Clock::Timestamp(300), // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL System::Clock::Timestamp(300), // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // Let's drop the initial message auto & loopback = ctx.GetLoopback(); @@ -508,10 +508,10 @@ void TestReliableMessageProtocol::CheckCloseExchangeAndResendApplicationMessage( ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // Let's drop the initial message auto & loopback = ctx.GetLoopback(); @@ -567,10 +567,10 @@ void TestReliableMessageProtocol::CheckFailedMessageRetainOnSend(nlTestSuite * i ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); mockSender.mMessageDispatch.mRetainMessageOnSend = false; // Let's drop the initial message @@ -657,10 +657,10 @@ void TestReliableMessageProtocol::CheckResendApplicationMessageWithPeerExchange( ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // Let's drop the initial message auto & loopback = ctx.GetLoopback(); @@ -719,10 +719,10 @@ void TestReliableMessageProtocol::CheckDuplicateMessageClosedExchange(nlTestSuit ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_INITIAL_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_ACTIVE_RETRY_INTERVAL - }); + })); // Let's not drop the message. Expectation is that it is received by the peer, but the ack is dropped auto & loopback = ctx.GetLoopback(); @@ -786,10 +786,10 @@ void TestReliableMessageProtocol::CheckDuplicateOldMessageClosedExchange(nlTestS ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_INITIAL_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_ACTIVE_RETRY_INTERVAL - }); + })); // Let's not drop the message. Expectation is that it is received by the peer, but the ack is dropped auto & loopback = ctx.GetLoopback(); @@ -887,10 +887,10 @@ void TestReliableMessageProtocol::CheckResendSessionEstablishmentMessageWithPeer ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // Let's drop the initial message auto & loopback = inctx.GetLoopback(); @@ -951,10 +951,10 @@ void TestReliableMessageProtocol::CheckDuplicateMessage(nlTestSuite * inSuite, v ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_INITIAL_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_RMP_DEFAULT_ACTIVE_RETRY_INTERVAL - }); + })); // Let's not drop the message. Expectation is that it is received by the peer, but the ack is dropped auto & loopback = ctx.GetLoopback(); @@ -1453,10 +1453,10 @@ void TestReliableMessageProtocol::CheckLostResponseWithPiggyback(nlTestSuite * i NL_TEST_ASSERT(inSuite, rm->TestGetCountRetransTable() == 0); // Make sure that we resend our message before the other side does. - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // We send a message, the other side sends an application-level response // (which is lost), then we do a retransmit that is acked, then the other @@ -1491,10 +1491,10 @@ void TestReliableMessageProtocol::CheckLostResponseWithPiggyback(nlTestSuite * i // Make sure receiver resends after sender does, and there's enough of a gap // that we are very unlikely to actually trigger the resends on the receiver // when we trigger the resends on the sender. - mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 256_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 256_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); // Now send a message from the other side, but drop it. loopback.mNumMessagesToDrop = 1; @@ -1601,10 +1601,10 @@ void TestReliableMessageProtocol::CheckIsPeerActiveNotInitiator(nlTestSuite * in mockSender.mTestSuite = inSuite; - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); @@ -1655,10 +1655,10 @@ void TestReliableMessageProtocol::CheckIsPeerActiveNotInitiator(nlTestSuite * in NL_TEST_ASSERT(inSuite, !exchange->HasReceivedAtLeastOneMessage()); NL_TEST_ASSERT(inSuite, mockReceiver.mExchange->HasReceivedAtLeastOneMessage()); - mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 100_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); mockReceiver.mRetainExchange = false; mockSender.mRetainExchange = false; @@ -1870,10 +1870,10 @@ void TestReliableMessageProtocol::CheckApplicationResponseDelayed(nlTestSuite * ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 30_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 30_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); constexpr uint32_t kMaxMRPTransmits = 5; // Counting the initial message. @@ -1932,10 +1932,10 @@ void TestReliableMessageProtocol::CheckApplicationResponseDelayed(nlTestSuite * loopback.mNumMessagesToDrop = kMaxMRPTransmits - 1; loopback.mDroppedMessageCount = 0; - mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + mockReceiver.mExchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 30_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 30_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); buffer = chip::MessagePacketBuffer::NewWithData(PAYLOAD, sizeof(PAYLOAD)); NL_TEST_ASSERT(inSuite, !buffer.IsNull()); @@ -2032,10 +2032,10 @@ void TestReliableMessageProtocol::CheckApplicationResponseNeverComes(nlTestSuite ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); NL_TEST_ASSERT(inSuite, rm != nullptr); - exchange->GetSessionHandle()->AsSecureSession()->SetRemoteMRPConfig({ + exchange->GetSessionHandle()->AsSecureSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 30_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 30_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); constexpr uint32_t kMaxMRPTransmits = 5; // Counting the initial message. @@ -2133,8 +2133,8 @@ void TestReliableMessageProtocol::CheckApplicationResponseNeverComes(nlTestSuite int TestReliableMessageProtocol::InitializeTestCase(void * inContext) { TestContext & ctx = *static_cast(inContext); - ctx.GetSessionAliceToBob()->AsSecureSession()->SetRemoteMRPConfig(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); - ctx.GetSessionBobToAlice()->AsSecureSession()->SetRemoteMRPConfig(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); + ctx.GetSessionAliceToBob()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); + ctx.GetSessionBobToAlice()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); return SUCCESS; } diff --git a/src/platform/ASR/ASRConfig.cpp b/src/platform/ASR/ASRConfig.cpp index 86eb4ec9582ebf..1e87f3af518804 100644 --- a/src/platform/ASR/ASRConfig.cpp +++ b/src/platform/ASR/ASRConfig.cpp @@ -221,46 +221,35 @@ bool ASRConfig::ConfigValueExists(Key key) CHIP_ERROR ASRConfig::ReadFactoryConfigValue(asr_matter_partition_t matter_partition, uint8_t * buf, size_t bufSize, size_t & outLen) { - int32_t ret = 0; + factory_error_t ret = asr_factory_config_read(matter_partition, buf, (uint32_t) bufSize, (uint32_t *) &outLen); - ret = asr_factory_config_read(matter_partition, buf, (uint32_t) bufSize, (uint32_t *) &outLen); - - if (ret != 0) - ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, static_cast(ret)); - - if (ret == 0) - { - return CHIP_NO_ERROR; - } - else + if (ret != FACTORY_NO_ERROR) { + ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, err = %d\n", matter_partition, ret); outLen = 0; return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; } + return CHIP_NO_ERROR; } CHIP_ERROR ASRConfig::ReadFactoryConfigValue(asr_matter_partition_t matter_partition, uint32_t & val) { - int32_t ret = 0; uint8_t buf[4]; - size_t outlen = 0; - - ret = asr_factory_config_read(matter_partition, buf, sizeof(uint32_t), (uint32_t *) &outlen); + size_t outlen = 0; + factory_error_t ret = asr_factory_config_read(matter_partition, buf, sizeof(uint32_t), (uint32_t *) &outlen); if (outlen > sizeof(uint32_t)) - ret = -1; + return CHIP_ERROR_BUFFER_TOO_SMALL; - if (ret != 0) - ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, ret = %d\n", matter_partition, static_cast(ret)); - - if (ret == 0) + if (ret != FACTORY_NO_ERROR) { - val = *((uint32_t *) buf); - return CHIP_NO_ERROR; + ChipLogProgress(DeviceLayer, "asr_factory_config_read: %d failed, err = %d\n", matter_partition, ret); + return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; } else { - return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; + val = *((uint32_t *) buf); + return CHIP_NO_ERROR; } } #endif diff --git a/src/platform/ASR/ASRConfig.h b/src/platform/ASR/ASRConfig.h old mode 100644 new mode 100755 index af10b47b08d2f9..71c90a3a79b242 --- a/src/platform/ASR/ASRConfig.h +++ b/src/platform/ASR/ASRConfig.h @@ -25,7 +25,7 @@ #pragma once -#include "asr_factory_config.h" +#include "ASRFactoryDataParser.h" #include namespace chip { diff --git a/src/platform/ASR/ASRFactoryDataParser.cpp b/src/platform/ASR/ASRFactoryDataParser.cpp new file mode 100755 index 00000000000000..9483b5cdac5f94 --- /dev/null +++ b/src/platform/ASR/ASRFactoryDataParser.cpp @@ -0,0 +1,277 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ASRFactoryDataParser.h" + +#if CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER +/* Logic partition on flash devices for matter */ +const matter_partition_t asr_matter_partitions_table[] = +{ + [ASR_VERSION_PARTITION] = + { + .partition_name = "version", + }, + [ASR_CONFIG_PARTITION] = + { + .partition_name = "config", + }, + [ASR_ITERATION_COUNT_PARTITION] = + { + .partition_name = "iteration-count", + }, + [ASR_SALT_PARTITION] = + { + .partition_name = "salt", + }, + [ASR_VERIFIER_PARTITION] = + { + .partition_name = "verifier", + }, + [ASR_DISCRIMINATOR_PARTITION] = + { + .partition_name = "discriminator", + }, + [ASR_DAC_CERT_PARTITION] = + { + .partition_name = "dac-cert", + }, + [ASR_DAC_KEY_PARTITION] = + { + .partition_name = "dac-pri-key", + }, + [ASR_DAC_PUB_KEY_PARTITION] = + { + .partition_name = "dac-pub-key", + }, + [ASR_PAI_CERT_PARTITION] = + { + .partition_name = "pai-cert", + }, + [ASR_CERT_DCLRN_PARTITION] = + { + .partition_name = "cert-dclrn", + }, + [ASR_CHIP_ID_PARTITION] = + { + .partition_name = "chip-id", + }, +#if CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER + [ASR_VENDOR_NAME_PARTITION] = + { + .partition_name = "vendor-name", + }, + [ASR_VENDOR_ID_PARTITION] = + { + .partition_name = "vendor-id", + }, + [ASR_PRODUCT_NAME_PARTITION] = + { + .partition_name = "product-name", + }, + [ASR_PRODUCT_ID_PARTITION] = + { + .partition_name = "product-id", + }, + [ASR_ROTATING_UNIQUE_ID_PARTITION] = + { + .partition_name = "rd-id-uid", + }, + [ASR_MANUFACTURY_DATE_PARTITION] = + { + .partition_name = "mfg-date", + }, + [ASR_SERIAL_NUMBER_PARTITION] = + { + .partition_name = "serial-num", + }, + [ASR_HARDWARE_VERSION_PARTITION] = + { + .partition_name = "hardware-ver", + }, + [ASR_HARDWARE_VERSION_STR_PARTITION] = + { + .partition_name = "hw-ver-str", + }, + [ASR_PRODUCT_URL_PARTITION] = + { + .partition_name = "product-url", + }, + [ASR_PRODUCT_LABEL_PARTITION] = + { + .partition_name = "product-label", + }, + [ASR_PART_NUMBER_PARTITION] = + { + .partition_name = "part-number", + }, +#endif + [ASR_MATTER_PARTITION_MAX] = + { + .partition_name = NULL, //for end don't change, + } +}; + +static asr_tlv_context matter_tlv_ctx; + +static factory_error_t asr_matter_find_by_name(const char * name, uint8_t * buf, uint32_t buf_len, uint32_t * out_len) +{ + tlv_header_t tlv; + + if (asr_tlv_find_by_name(&matter_tlv_ctx, &tlv, MIXCLASS_MATTERCONFIG_TAG, + (char *) name)) // parse the data according to the tlv packaging tool + { + uint32_t value_len = tlv_htons(tlv->data_len); + + value_len -= MAX_NAME_LEN; + + if (value_len > buf_len) + { + return FACTORY_BUFFER_TOO_SMALL; + } + + *out_len = value_len; + + memcpy(buf, tlv->data + MAX_NAME_LEN, value_len); + + return FACTORY_NO_ERROR; + } + else + { + return FACTORY_VALUE_NOT_FOUND; + } +} + +static uint32_t asr_find_factory_version() +{ + uint8_t buf[4]; + size_t outlen = 0; + uint32_t value = 0; + if (FACTORY_NO_ERROR == + asr_matter_find_by_name((const char *) asr_matter_partitions_table[ASR_VERSION_PARTITION].partition_name, buf, + sizeof(uint32_t), (uint32_t *) &outlen)) + { + value = *(uint32_t *) buf; + } + return value; +} + +static uint32_t asr_find_factory_config() +{ + uint8_t buf[4]; + size_t outlen = 0; + uint32_t value = 0; + if (FACTORY_NO_ERROR == + asr_matter_find_by_name((const char *) asr_matter_partitions_table[ASR_CONFIG_PARTITION].partition_name, buf, + sizeof(uint32_t), (uint32_t *) &outlen)) + { + value = *(uint32_t *) buf; + } + return value; +} + +static factory_error_t asr_factory_dac_prvkey_get(uint8_t * pRdBuf, uint32_t * pOutLen) +{ + static constexpr uint32_t kDACPrivateKeySize = 32; + if (NULL == pRdBuf || NULL == pOutLen) + { + return FACTORY_INVALID_INPUT; + } + + if (asr_find_factory_config() & ASR_CONFIG_MATTER_NO_KEY) + { +#if defined(CFG_PLF_RV32) || defined(CFG_PLF_DUET) + uint32_t off_set; + uint8_t ucCipher[kDACPrivateKeySize]; + tlv_area_header_t tlv_headr_p = (tlv_area_header_t) MATTER_FLASH_START_ADDR; + off_set = tlv_headr_p->data_len + 3 * sizeof(uint32_t); // magic_num,crc32_value,data_len + // get DAC cipher + if (asr_flash_read(ASR_CONFIG_BASE, (uint32_t *) &off_set, (void *) ucCipher, kDACPrivateKeySize) == 0) + { + if (asr_factory_decrypt_dac_prvkey(ucCipher, kDACPrivateKeySize, pRdBuf, pOutLen) == 0) + { + return FACTORY_NO_ERROR; + } + } +#endif + return FACTORY_NOT_SUPPORTED; + } + else + { + return asr_matter_find_by_name((const char *) asr_matter_partitions_table[ASR_DAC_KEY_PARTITION].partition_name, pRdBuf, + kDACPrivateKeySize, pOutLen); + } +} + +static int asr_partition_members_count_cb(tlv_header_t tlv, void * arg1, void * arg2) +{ + int * count = (int *) arg1; + + *count = *count + 1; + + return 0; +} + +static factory_error_t asr_partition_table_load(void) +{ + int table_members = 0; + + if (asr_tlv_poll_class_members(&matter_tlv_ctx, MIXCLASS_MATTERCONFIG_TAG, asr_partition_members_count_cb, &table_members, + NULL)) + { + if (table_members > 0) + { + if (asr_find_factory_version() == ASR_MATTER_FACTORY_VERSION) + { + return FACTORY_NO_ERROR; + } + else + { + return FACTORY_VERSION_MISMATCH; + } + } + } + return FACTORY_DATA_CHECK_FAILED; +} + +factory_error_t asr_factory_config_read(asr_matter_partition_t matter_partition, uint8_t * buf, uint32_t buf_len, + uint32_t * out_len) +{ + + if (matter_partition >= ASR_MATTER_PARTITION_MAX) + { + return FACTORY_INVALID_INPUT; + } + + if (matter_partition == ASR_DAC_KEY_PARTITION) + { + return asr_factory_dac_prvkey_get(buf, out_len); + } + + return asr_matter_find_by_name((const char *) asr_matter_partitions_table[matter_partition].partition_name, buf, buf_len, + out_len); +} + +factory_error_t asr_factory_check() +{ + if (asr_tlv_init(&matter_tlv_ctx, MATTER_FLASH_START_ADDR) != 0) + { + return FACTORY_DATA_INIT_FAILED; + } + + return asr_partition_table_load(); +} +#endif // CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER diff --git a/src/platform/ASR/ASRFactoryDataParser.h b/src/platform/ASR/ASRFactoryDataParser.h new file mode 100644 index 00000000000000..e3de051fedf7f3 --- /dev/null +++ b/src/platform/ASR/ASRFactoryDataParser.h @@ -0,0 +1,116 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "stdint.h" +#include "string.h" +#include "tlv_decode.h" +#ifdef CFG_PLF_RV32 +#include "asr_flash.h" +#include "asr_rv32.h" +#elif defined CFG_PLF_DUET +#include "duet_cm4.h" +#include "duet_flash.h" +#define asr_flash_read duet_flash_read +#define asr_factory_decrypt_dac_prvkey duet_factory_decrypt_dac_prvkey +#else +#include "lega_cm4.h" +#include "lega_flash.h" +#define asr_flash_read lega_flash_read +#endif + +#ifndef CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER +#define CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER 0 +#endif // CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER + +#ifndef CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER +#define CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER 0 +#endif // CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER + +#define ASR_CONFIG_BASE PARTITION_MATTER_CONFIG +#define ASR_MATTER_FACTORY_VERSION 2 +#define ASR_CONFIG_MATTER_NO_KEY 0x01 + +#if CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER +typedef enum ASR_MATTER_PARTITION_T +{ + ASR_VERSION_PARTITION = 0x00, + ASR_CONFIG_PARTITION, + ASR_ITERATION_COUNT_PARTITION, + ASR_SALT_PARTITION, + ASR_VERIFIER_PARTITION, + ASR_DISCRIMINATOR_PARTITION, + ASR_DAC_CERT_PARTITION, + ASR_DAC_KEY_PARTITION, + ASR_DAC_PUB_KEY_PARTITION, + ASR_PAI_CERT_PARTITION, + ASR_CERT_DCLRN_PARTITION, + ASR_CHIP_ID_PARTITION, +#if CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER + ASR_VENDOR_NAME_PARTITION, + ASR_VENDOR_ID_PARTITION, + ASR_PRODUCT_NAME_PARTITION, + ASR_PRODUCT_ID_PARTITION, + ASR_ROTATING_UNIQUE_ID_PARTITION, + ASR_MANUFACTURY_DATE_PARTITION, + ASR_SERIAL_NUMBER_PARTITION, + ASR_HARDWARE_VERSION_PARTITION, + ASR_HARDWARE_VERSION_STR_PARTITION, + ASR_PRODUCT_URL_PARTITION, + ASR_PRODUCT_LABEL_PARTITION, + ASR_PART_NUMBER_PARTITION, +#endif + ASR_MATTER_PARTITION_MAX, +} asr_matter_partition_t; + +typedef struct +{ + const char * partition_name; +} matter_partition_t; + +typedef enum +{ + FACTORY_NO_ERROR = 0x00, + FACTORY_BUFFER_TOO_SMALL, + FACTORY_VALUE_NOT_FOUND, + FACTORY_INVALID_INPUT, + FACTORY_NOT_SUPPORTED, + FACTORY_VERSION_MISMATCH, + FACTORY_DATA_CHECK_FAILED, + FACTORY_DATA_INIT_FAILED, +} factory_error_t; + +/** + * @brief Tries to read the factory data within the given partition. + * + * @param matter_partition The matter partition to be find out. + * @param buf Output buffer to store found factory data. + * @param buf_len Size of buffer. + * @param outlen Actual size of found factory data. + * @return FACTORY_NO_ERROR on success, other factory_error_t values from implementation on other errors. + */ +factory_error_t asr_factory_config_read(asr_matter_partition_t matter_partition, uint8_t * buf, uint32_t buf_len, + uint32_t * out_len); +/** + * @brief Init and check if the factory data filed is valid. + * + * @return FACTORY_NO_ERROR on success, other factory_error_t values from implementation on other errors. + */ +factory_error_t asr_factory_check(); + +#endif // CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER diff --git a/src/platform/ASR/ASRFactoryDataProvider.cpp b/src/platform/ASR/ASRFactoryDataProvider.cpp index 0e28c014a72937..c1a436168f6246 100755 --- a/src/platform/ASR/ASRFactoryDataProvider.cpp +++ b/src/platform/ASR/ASRFactoryDataProvider.cpp @@ -46,11 +46,11 @@ CHIP_ERROR ASRFactoryDataProvider::Init() { CHIP_ERROR err = CHIP_NO_ERROR; #if CONFIG_ENABLE_ASR_FACTORY_DATA_PROVIDER - uint8_t ret = asr_factory_check(); - if (ret != 0) + factory_error_t ret = asr_factory_check(); + if (ret != FACTORY_NO_ERROR) { err = CHIP_ERROR_INTERNAL; - ChipLogError(DeviceLayer, "ASR factory data check failed."); + ChipLogError(DeviceLayer, "ASR factory data check failed. err = %d", ret); } #endif return err; @@ -355,9 +355,8 @@ CHIP_ERROR ASRFactoryDataProvider::GetVendorName(char * buf, size_t bufSize) ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME); #else -#define BUFFER_MAX_SIZE 32 - uint8_t buffer[BUFFER_MAX_SIZE + 1] = { 0 }; - size_t buffer_len = BUFFER_MAX_SIZE + 1; + size_t buffer_len = ConfigurationManager::kMaxVendorNameLength + 1; + uint8_t buffer[ConfigurationManager::kMaxVendorNameLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_VENDOR_NAME_PARTITION, buffer, buffer_len, buffer_len)); ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); @@ -373,7 +372,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetVendorId(uint16_t & vendorId) #else uint32_t vendorId32; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_VENDOR_ID_PARTITION, vendorId32)); - vendorId = static_cast(vendorId32); + vendorId = static_cast(vendorId32); #endif return CHIP_NO_ERROR; } @@ -384,9 +383,8 @@ CHIP_ERROR ASRFactoryDataProvider::GetProductName(char * buf, size_t bufSize) ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME); #else -#define BUFFER_MAX_SIZE 32 - uint8_t buffer[BUFFER_MAX_SIZE + 1] = { 0 }; - size_t buffer_len = BUFFER_MAX_SIZE + 1; + size_t buffer_len = ConfigurationManager::kMaxProductNameLength + 1; + uint8_t buffer[ConfigurationManager::kMaxProductNameLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_NAME_PARTITION, buffer, buffer_len, buffer_len)); ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); @@ -402,24 +400,54 @@ CHIP_ERROR ASRFactoryDataProvider::GetProductId(uint16_t & productId) #else uint32_t productId32; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_ID_PARTITION, productId32)); - productId = static_cast(productId32); + productId = static_cast(productId32); #endif return CHIP_NO_ERROR; } CHIP_ERROR ASRFactoryDataProvider::GetPartNumber(char * buf, size_t bufSize) { +#if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#else + size_t buffer_len = ConfigurationManager::kMaxPartNumberLength + 1; + uint8_t buffer[ConfigurationManager::kMaxPartNumberLength + 1] = { 0 }; + ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PART_NUMBER_PARTITION, buffer, buffer_len, buffer_len)); + ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(buf, buffer, buffer_len); + buf[buffer_len] = 0; +#endif + return CHIP_NO_ERROR; } CHIP_ERROR ASRFactoryDataProvider::GetProductURL(char * buf, size_t bufSize) { +#if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#else + size_t buffer_len = ConfigurationManager::kMaxProductURLLength + 1; + uint8_t buffer[ConfigurationManager::kMaxProductURLLength + 1] = { 0 }; + ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_URL_PARTITION, buffer, buffer_len, buffer_len)); + ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(buf, buffer, buffer_len); + buf[buffer_len] = 0; +#endif + return CHIP_NO_ERROR; } CHIP_ERROR ASRFactoryDataProvider::GetProductLabel(char * buf, size_t bufSize) { +#if !CONFIG_ENABLE_ASR_FACTORY_DEVICE_INFO_PROVIDER return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +#else + size_t buffer_len = ConfigurationManager::kMaxProductLabelLength + 1; + uint8_t buffer[ConfigurationManager::kMaxProductLabelLength + 1] = { 0 }; + ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_PRODUCT_LABEL_PARTITION, buffer, buffer_len, buffer_len)); + ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); + memcpy(buf, buffer, buffer_len); + buf[buffer_len] = 0; +#endif + return CHIP_NO_ERROR; } CHIP_ERROR ASRFactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) @@ -428,9 +456,8 @@ CHIP_ERROR ASRFactoryDataProvider::GetSerialNumber(char * buf, size_t bufSize) ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER); #else -#define BUFFER_MAX_SIZE 32 - uint8_t buffer[BUFFER_MAX_SIZE + 1] = { 0 }; - size_t buffer_len = BUFFER_MAX_SIZE + 1; + size_t buffer_len = ConfigurationManager::kMaxSerialNumberLength + 1; + uint8_t buffer[ConfigurationManager::kMaxSerialNumberLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_SERIAL_NUMBER_PARTITION, buffer, buffer_len, buffer_len)); ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); @@ -487,7 +514,7 @@ CHIP_ERROR ASRFactoryDataProvider::GetHardwareVersion(uint16_t & hardwareVersion #else uint32_t hardwareVersion32; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_HARDWARE_VERSION_PARTITION, hardwareVersion32)); - hardwareVersion = static_cast(hardwareVersion32); + hardwareVersion = static_cast(hardwareVersion32); #endif return CHIP_NO_ERROR; } @@ -498,9 +525,8 @@ CHIP_ERROR ASRFactoryDataProvider::GetHardwareVersionString(char * buf, size_t b ReturnErrorCodeIf(bufSize < sizeof(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING), CHIP_ERROR_BUFFER_TOO_SMALL); strcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING); #else -#define BUFFER_MAX_SIZE 32 - uint8_t buffer[BUFFER_MAX_SIZE + 1] = { 0 }; - size_t buffer_len = BUFFER_MAX_SIZE + 1; + size_t buffer_len = ConfigurationManager::kMaxHardwareVersionStringLength + 1; + uint8_t buffer[ConfigurationManager::kMaxHardwareVersionStringLength + 1] = { 0 }; ReturnErrorOnFailure(ASRConfig::ReadFactoryConfigValue(ASR_HARDWARE_VERSION_STR_PARTITION, buffer, buffer_len, buffer_len)); ReturnErrorCodeIf(bufSize < buffer_len, CHIP_ERROR_BUFFER_TOO_SMALL); memcpy(buf, buffer, buffer_len); diff --git a/src/platform/ASR/BUILD.gn b/src/platform/ASR/BUILD.gn index eff3c98881cf94..033f07e977835a 100755 --- a/src/platform/ASR/BUILD.gn +++ b/src/platform/ASR/BUILD.gn @@ -26,6 +26,8 @@ static_library("ASR") { "../SingletonConfigurationManager.cpp", "ASRConfig.cpp", "ASRConfig.h", + "ASRFactoryDataParser.cpp", + "ASRFactoryDataParser.h", "ASRFactoryDataProvider.cpp", "ASRUtils.cpp", "ASRUtils.h", diff --git a/src/platform/ASR/route_hook/asr_route_hook.c b/src/platform/ASR/route_hook/asr_route_hook.c old mode 100644 new mode 100755 index 0dae344f057e99..85902550aebe19 --- a/src/platform/ASR/route_hook/asr_route_hook.c +++ b/src/platform/ASR/route_hook/asr_route_hook.c @@ -3,7 +3,7 @@ #include "asr_route_hook.h" #include "asr_route_table.h" - +#include "lega_rtos_api.h" #include "lwip/icmp6.h" #include "lwip/mld6.h" #include "lwip/netif.h" @@ -166,7 +166,7 @@ int8_t asr_route_hook_init() return -1; } - for (asr_route_hook_t * iter = s_hooks; iter != NULL; iter++) + for (asr_route_hook_t * iter = s_hooks; iter != NULL; iter = iter->next) { if (iter->netif == lwip_netif) { @@ -175,7 +175,7 @@ int8_t asr_route_hook_init() } } - hook = (asr_route_hook_t *) malloc(sizeof(asr_route_hook_t)); + hook = (asr_route_hook_t *) lega_rtos_malloc(sizeof(asr_route_hook_t)); if (hook == NULL) { ASR_LOG("Cannot allocate hook"); @@ -203,7 +203,7 @@ int8_t asr_route_hook_init() exit: if (ret != 0 && hook != NULL) { - free(hook); + lega_rtos_free(hook); } return ret; } diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 7a7b6a81e689f5..39d94748c117a6 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -371,6 +371,12 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { } defines += [ "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}" ] + + visibility = [ + ":platform_config_header", + "${chip_root}/src/ble:ble_config_header", + "${chip_root}/src/system:system_config_header", + ] } } else if (chip_device_platform == "none") { buildconfig_header("platform_buildconfig") { @@ -392,10 +398,16 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { } } +source_set("platform_config_header") { + sources = [ "../include/platform/CHIPDeviceConfig.h" ] + + deps = [ ":platform_buildconfig" ] +} + if (chip_device_platform != "none") { - group("platform_base") { + source_set("platform_base") { public_deps = [ - ":platform_buildconfig", + ":platform_config_header", "${chip_root}/src/ble", "${chip_root}/src/inet", "${chip_root}/src/lib/core", @@ -412,7 +424,6 @@ if (chip_device_platform != "none") { sources = [ "../include/platform/BuildTime.h", - "../include/platform/CHIPDeviceConfig.h", "../include/platform/CHIPDeviceError.h", "../include/platform/CHIPDeviceEvent.h", "../include/platform/CHIPDeviceLayer.h", diff --git a/src/platform/Darwin/CHIPDevicePlatformConfig.h b/src/platform/Darwin/CHIPDevicePlatformConfig.h index 8b4ee23eb78c9f..8cb779756bf95b 100644 --- a/src/platform/Darwin/CHIPDevicePlatformConfig.h +++ b/src/platform/Darwin/CHIPDevicePlatformConfig.h @@ -25,6 +25,7 @@ // ==================== Platform Adaptations ==================== +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC 1 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 6180eb77a9e37b..ff36ca21662152 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/platform/ESP32/PlatformManagerImpl.cpp b/src/platform/ESP32/PlatformManagerImpl.cpp index 81bc561cddc667..ed9f6aca7128c9 100644 --- a/src/platform/ESP32/PlatformManagerImpl.cpp +++ b/src/platform/ESP32/PlatformManagerImpl.cpp @@ -25,7 +25,6 @@ /* this file behaves like a config.h, comes first */ #include -#include #include #include #include diff --git a/src/platform/Linux/CHIPDevicePlatformConfig.h b/src/platform/Linux/CHIPDevicePlatformConfig.h index 530e2716308842..70ed39d62899d5 100644 --- a/src/platform/Linux/CHIPDevicePlatformConfig.h +++ b/src/platform/Linux/CHIPDevicePlatformConfig.h @@ -26,6 +26,7 @@ // ==================== Platform Adaptations ==================== #if CHIP_DEVICE_CONFIG_ENABLE_WIFI +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC 1 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 #else diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index bbc96914e64e4b..c93a723628fa81 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -1017,7 +1017,7 @@ ConnectivityManagerImpl::ConnectWiFiNetworkAsync(ByteSpan ssid, ByteSpan credent memcpy(keyStr, credentials.data(), credentials.size()); g_variant_builder_add(&builder, "{sv}", "ssid", g_variant_new_string(ssidStr)); g_variant_builder_add(&builder, "{sv}", "psk", g_variant_new_string(keyStr)); - g_variant_builder_add(&builder, "{sv}", "key_mgmt", g_variant_new_string("WPA-PSK")); + g_variant_builder_add(&builder, "{sv}", "key_mgmt", g_variant_new_string("SAE WPA-PSK")); args = g_variant_builder_end(&builder); result = wpa_fi_w1_wpa_supplicant1_interface_call_add_network_sync(mWpaSupplicant.iface, args, &mWpaSupplicant.networkPath, diff --git a/src/platform/Linux/ConnectivityUtils.cpp b/src/platform/Linux/ConnectivityUtils.cpp index 2924d48612317e..8084ceca43b55a 100644 --- a/src/platform/Linux/ConnectivityUtils.cpp +++ b/src/platform/Linux/ConnectivityUtils.cpp @@ -21,7 +21,6 @@ * statistics(extracted from /proc/net/wireless) on Linux platforms. */ -#include #include #include @@ -658,34 +657,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters:: switch (speed) { case 10: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M; break; case 100: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M; break; case 1000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G; break; case 25000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g; break; case 5000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G; break; case 10000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G; break; case 40000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G; break; case 100000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G; break; case 200000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G; break; case 400000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G; break; default: ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed); diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index f102b47b65ca6e..b363fa652a6cf2 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/platform/Linux/PlatformManagerImpl.cpp b/src/platform/Linux/PlatformManagerImpl.cpp index a1c83faf299389..0098eb01ae96eb 100644 --- a/src/platform/Linux/PlatformManagerImpl.cpp +++ b/src/platform/Linux/PlatformManagerImpl.cpp @@ -35,7 +35,6 @@ #include -#include #include #include #include diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp index a880490d85fb00..1eb5958bef17af 100644 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -663,9 +663,9 @@ void ThreadStackManagerImpl::_OnNetworkScanFinished(GAsyncResult * res) &joiner_udp_port, &channel, &rssi, &lqi, &version, &is_native, &is_joinable)) { ChipLogProgress(DeviceLayer, - "Thread Network: %s (%016" PRIx64 ") ExtPanId(%016" PRIx64 ") RSSI %d LQI %u" + "Thread Network: %s (" ChipLogFormatX64 ") ExtPanId(" ChipLogFormatX64 ") RSSI %d LQI %u" " Version %u", - network_name, ext_address, ext_panid, rssi, lqi, version); + network_name, ChipLogValueX64(ext_address), ChipLogValueX64(ext_panid), rssi, lqi, version); NetworkCommissioning::ThreadScanResponse networkScanned; networkScanned.panId = panid; networkScanned.extendedPanId = ext_panid; diff --git a/src/platform/Tizen/ConfigurationManagerImpl.cpp b/src/platform/Tizen/ConfigurationManagerImpl.cpp index 78d556881443a8..8efe079993b7aa 100644 --- a/src/platform/Tizen/ConfigurationManagerImpl.cpp +++ b/src/platform/Tizen/ConfigurationManagerImpl.cpp @@ -26,7 +26,6 @@ #include "ConfigurationManagerImpl.h" #include -#include #include #include #include diff --git a/src/platform/Tizen/ConnectivityManagerImpl.cpp b/src/platform/Tizen/ConnectivityManagerImpl.cpp index 9000ee710c0664..c97196babfbfcf 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.cpp +++ b/src/platform/Tizen/ConnectivityManagerImpl.cpp @@ -27,10 +27,9 @@ #include #endif -#include +#include #include #include -#include #include #include #include diff --git a/src/platform/Tizen/ConnectivityManagerImpl.h b/src/platform/Tizen/ConnectivityManagerImpl.h index 04d692a1f05f8f..a22eb71eb7deb2 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.h +++ b/src/platform/Tizen/ConnectivityManagerImpl.h @@ -21,9 +21,8 @@ #include -#include +#include #include -#include #include #include #include diff --git a/src/platform/Tizen/ConnectivityUtils.cpp b/src/platform/Tizen/ConnectivityUtils.cpp index b74a2832b93237..15a8ec60fd3a06 100644 --- a/src/platform/Tizen/ConnectivityUtils.cpp +++ b/src/platform/Tizen/ConnectivityUtils.cpp @@ -17,7 +17,6 @@ #include "ConnectivityUtils.h" -#include #include #include @@ -447,34 +446,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, PHYRateEnum & p switch (speed) { case 10: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M; break; case 100: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M; break; case 1000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G; break; case 25000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g; break; case 5000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G; break; case 10000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G; break; case 40000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G; break; case 100000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G; break; case 200000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G; break; case 400000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G; break; default: ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed); diff --git a/src/platform/Tizen/DnssdImpl.cpp b/src/platform/Tizen/DnssdImpl.cpp index 646d40af5a8f53..64b6d45932e2d2 100644 --- a/src/platform/Tizen/DnssdImpl.cpp +++ b/src/platform/Tizen/DnssdImpl.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/platform/Tizen/Logging.cpp b/src/platform/Tizen/Logging.cpp index da29fc8926ef69..117059e9d15569 100644 --- a/src/platform/Tizen/Logging.cpp +++ b/src/platform/Tizen/Logging.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include #include diff --git a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp index d6501cbde80e38..a92ead9764c203 100644 --- a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/platform/Tizen/SystemTimeSupport.cpp b/src/platform/Tizen/SystemTimeSupport.cpp index bfc33b7dd23a9c..452c9039bfb939 100644 --- a/src/platform/Tizen/SystemTimeSupport.cpp +++ b/src/platform/Tizen/SystemTimeSupport.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/platform/bouffalolab/common/Logging.cpp b/src/platform/bouffalolab/common/Logging.cpp index bc773c530d6bdc..b05912f180f33b 100644 --- a/src/platform/bouffalolab/common/Logging.cpp +++ b/src/platform/bouffalolab/common/Logging.cpp @@ -16,7 +16,7 @@ */ #include -#include +#include #include #include diff --git a/src/platform/logging/BUILD.gn b/src/platform/logging/BUILD.gn index 28a787d6e3f6fe..6039b101e20482 100644 --- a/src/platform/logging/BUILD.gn +++ b/src/platform/logging/BUILD.gn @@ -18,7 +18,7 @@ if (current_os == "android") { "${chip_root}/src/lib/core:chip_config_header", "${chip_root}/src/lib/support:attributes", "${chip_root}/src/lib/support:logging_constants", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", "${chip_root}/src/platform/logging:headers", ] @@ -43,7 +43,7 @@ static_library("stdio") { "${chip_root}/src/lib/core:chip_config_header", "${chip_root}/src/lib/support:attributes", "${chip_root}/src/lib/support:logging_constants", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", "${chip_root}/src/platform/logging:headers", ] diff --git a/src/platform/mbed/OTAImageProcessorImpl.cpp b/src/platform/mbed/OTAImageProcessorImpl.cpp index 0777c8606fb30b..a5a725f19ee0a4 100644 --- a/src/platform/mbed/OTAImageProcessorImpl.cpp +++ b/src/platform/mbed/OTAImageProcessorImpl.cpp @@ -543,8 +543,8 @@ int OTAImageProcessorImpl::ProgramMemory() } ChipLogProgress(SoftwareUpdate, "Secondary slot program with offset: " - "0x%" PRIx64, - mParams.downloadedBytes); + "0x" ChipLogFormatX64, + ChipLogValueX64(mParams.downloadedBytes)); mParams.downloadedBytes += mBlock.size(); return ret; diff --git a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp index 92ef8c0c310d29..10e9f8d528b12f 100644 --- a/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/common/DiagnosticDataProviderImpl.cpp @@ -22,7 +22,6 @@ * for nxp platform. */ -#include #include #include "DiagnosticDataProviderImpl.h" diff --git a/src/platform/nxp/mw320/ConnectivityUtils.cpp b/src/platform/nxp/mw320/ConnectivityUtils.cpp index 4756dc85065c84..a4e881c1e96df0 100644 --- a/src/platform/nxp/mw320/ConnectivityUtils.cpp +++ b/src/platform/nxp/mw320/ConnectivityUtils.cpp @@ -22,7 +22,6 @@ */ #include "ConnectivityUtils.h" -#include #include #include diff --git a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp index 3b357371b0c03a..f669ce4b937751 100644 --- a/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/mw320/DiagnosticDataProviderImpl.cpp @@ -21,7 +21,6 @@ * for k32w0 platform. */ -#include #include #include diff --git a/src/platform/tests/TestPlatformTime.cpp b/src/platform/tests/TestPlatformTime.cpp index 8c4e9b838e3dfe..aa7c931dd67782 100644 --- a/src/platform/tests/TestPlatformTime.cpp +++ b/src/platform/tests/TestPlatformTime.cpp @@ -67,8 +67,11 @@ static void TestDevice_GetMonotonicMicroseconds(nlTestSuite * inSuite, void * in const Clock::Microseconds64 Tend = System::SystemClock().GetMonotonicMicroseconds64(); const Clock::Microseconds64 Tdelta = Tend - Tstart; - ChipLogProgress(DeviceLayer, "Start=%" PRIu64 " End=%" PRIu64 " Delta=%" PRIu64 " Expected=%" PRIu64, Tstart.count(), - Tend.count(), Tdelta.count(), Tdelay.count()); + ChipLogProgress(DeviceLayer, + "Start=0x" ChipLogFormatX64 " End=0x" ChipLogFormatX64 " Delta=0x" ChipLogFormatX64 + " Expected=0x" ChipLogFormatX64, + ChipLogValueX64(Tstart.count()), ChipLogValueX64(Tend.count()), ChipLogValueX64(Tdelta.count()), + ChipLogValueX64(Tdelay.count())); // verify that timers don't fire early NL_TEST_ASSERT(inSuite, Tdelta > (Tdelay - margin)); @@ -98,8 +101,11 @@ static void TestDevice_GetMonotonicMilliseconds(nlTestSuite * inSuite, void * in const Clock::Milliseconds64 Tend = System::SystemClock().GetMonotonicMilliseconds64(); const Clock::Milliseconds64 Tdelta = Tend - Tstart; - ChipLogProgress(DeviceLayer, "Start=%" PRIu64 " End=%" PRIu64 " Delta=%" PRIu64 " Expected=%" PRIu64, Tstart.count(), - Tend.count(), Tdelta.count(), Tdelay.count()); + ChipLogProgress(DeviceLayer, + "Start=0x" ChipLogFormatX64 " End=0x" ChipLogFormatX64 " Delta=0x" ChipLogFormatX64 + " Expected=0x" ChipLogFormatX64, + ChipLogValueX64(Tstart.count()), ChipLogValueX64(Tend.count()), ChipLogValueX64(Tdelta.count()), + ChipLogValueX64(Tdelay.count())); // verify that timers don't fire early NL_TEST_ASSERT(inSuite, Tdelta > (Tdelay - margin)); diff --git a/src/platform/webos/ConnectivityUtils.cpp b/src/platform/webos/ConnectivityUtils.cpp index ff4ea526a0e6f0..f137ac8de2019a 100644 --- a/src/platform/webos/ConnectivityUtils.cpp +++ b/src/platform/webos/ConnectivityUtils.cpp @@ -21,7 +21,6 @@ * statistics(extracted from /proc/net/wireless) on webOS platforms. */ -#include #include #include @@ -566,34 +565,34 @@ CHIP_ERROR ConnectivityUtils::GetEthPHYRate(const char * ifname, app::Clusters:: switch (speed) { case 10: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10M; break; case 100: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_M; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100M; break; case 1000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE1_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate1G; break; case 25000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate25g; break; case 5000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE5_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate5G; break; case 10000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE10_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate10G; break; case 40000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE40_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate40G; break; case 100000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE100_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate100G; break; case 200000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE200_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate200G; break; case 400000: - pHYRate = EmberAfPHYRateEnum::EMBER_ZCL_PHY_RATE_ENUM_RATE400_G; + pHYRate = app::Clusters::EthernetNetworkDiagnostics::PHYRateEnum::kRate400G; break; default: ChipLogError(DeviceLayer, "Undefined speed! (%d)\n", speed); diff --git a/src/platform/webos/DiagnosticDataProviderImpl.cpp b/src/platform/webos/DiagnosticDataProviderImpl.cpp index 0c6136e8f0f584..22f90ed72e3bd6 100644 --- a/src/platform/webos/DiagnosticDataProviderImpl.cpp +++ b/src/platform/webos/DiagnosticDataProviderImpl.cpp @@ -23,7 +23,6 @@ #include -#include #include #include #include diff --git a/src/platform/webos/PlatformManagerImpl.cpp b/src/platform/webos/PlatformManagerImpl.cpp index fb353702ad622f..55995248caa5f0 100644 --- a/src/platform/webos/PlatformManagerImpl.cpp +++ b/src/platform/webos/PlatformManagerImpl.cpp @@ -35,7 +35,6 @@ #include -#include #include #include #include diff --git a/src/protocols/bdx/BdxMessages.cpp b/src/protocols/bdx/BdxMessages.cpp index 1db14be54ff3a9..861be46ea30013 100644 --- a/src/protocols/bdx/BdxMessages.cpp +++ b/src/protocols/bdx/BdxMessages.cpp @@ -585,6 +585,6 @@ void BlockQueryWithSkip::LogMessage(bdx::MessageType messageType) const { ChipLogAutomation("BlockQueryWithSkip"); ChipLogAutomation(" Block Counter: %" PRIu32, BlockCounter); - ChipLogAutomation(" Bytes To Skip: %" PRIu64, BytesToSkip); + ChipLogAutomation(" Bytes To Skip: 0x" ChipLogFormatX64, ChipLogValueX64(BytesToSkip)); } #endif // CHIP_AUTOMATION_LOGGING diff --git a/src/protocols/secure_channel/BUILD.gn b/src/protocols/secure_channel/BUILD.gn index 5a24a984719a5e..2061b04e82b6d5 100644 --- a/src/protocols/secure_channel/BUILD.gn +++ b/src/protocols/secure_channel/BUILD.gn @@ -61,4 +61,6 @@ static_library("secure_channel") { "${chip_root}/src/tracing:macros", "${chip_root}/src/transport", ] + + deps = [ "${chip_root}/src/app:revision_info" ] } diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 2afc40feacaf02..6e51d000e3822c 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -640,13 +641,11 @@ CHIP_ERROR CASESession::RecoverInitiatorIpk() CHIP_ERROR CASESession::SendSigma1() { MATTER_TRACE_SCOPE("SendSigma1", "CASESession"); - const size_t mrpParamsSize = - mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t), sizeof(uint16_t)) : 0; - size_t data_len = TLV::EstimateStructOverhead(kSigmaParamRandomNumberSize, // initiatorRandom - sizeof(uint16_t), // initiatorSessionId, - kSHA256_Hash_Length, // destinationId - kP256_PublicKey_Length, // InitiatorEphPubKey, - mrpParamsSize, // initiatorMRPParams + size_t data_len = TLV::EstimateStructOverhead(kSigmaParamRandomNumberSize, // initiatorRandom + sizeof(uint16_t), // initiatorSessionId, + kSHA256_Hash_Length, // destinationId + kP256_PublicKey_Length, // InitiatorEphPubKey, + SessionParameters::kEstimatedTLVSize, // initiatorSessionParams SessionResumptionStorage::kResumptionIdSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES); System::PacketBufferTLVWriter tlvWriter; @@ -699,11 +698,7 @@ CHIP_ERROR CASESession::SendSigma1() ReturnErrorOnFailure( tlvWriter.PutBytes(TLV::ContextTag(4), mEphemeralKey->Pubkey(), static_cast(mEphemeralKey->Pubkey().Length()))); - if (mLocalMRPConfig.HasValue()) - { - ChipLogDetail(SecureChannel, "Including MRP parameters"); - ReturnErrorOnFailure(EncodeMRPParameters(TLV::ContextTag(5), mLocalMRPConfig.Value(), tlvWriter)); - } + ReturnErrorOnFailure(EncodeSessionParameters(TLV::ContextTag(5), mLocalMRPConfig, tlvWriter)); // Try to find persistent session, and resume it. bool resuming = false; @@ -916,10 +911,9 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg) CHIP_ERROR CASESession::SendSigma2Resume() { MATTER_TRACE_SCOPE("SendSigma2Resume", "CASESession"); - const size_t mrpParamsSize = - mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t), sizeof(uint16_t)) : 0; - size_t max_sigma2_resume_data_len = TLV::EstimateStructOverhead( - SessionResumptionStorage::kResumptionIdSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, sizeof(uint16_t), mrpParamsSize); + size_t max_sigma2_resume_data_len = + TLV::EstimateStructOverhead(SessionResumptionStorage::kResumptionIdSize, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, + sizeof(uint16_t), SessionParameters::kEstimatedTLVSize); System::PacketBufferTLVWriter tlvWriter; System::PacketBufferHandle msg_R2_resume; @@ -948,11 +942,7 @@ CHIP_ERROR CASESession::SendSigma2Resume() ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(3), GetLocalSessionId().Value())); - if (mLocalMRPConfig.HasValue()) - { - ChipLogDetail(SecureChannel, "Including MRP parameters"); - ReturnErrorOnFailure(EncodeMRPParameters(TLV::ContextTag(4), mLocalMRPConfig.Value(), tlvWriter)); - } + ReturnErrorOnFailure(EncodeSessionParameters(TLV::ContextTag(4), mLocalMRPConfig, tlvWriter)); ReturnErrorOnFailure(tlvWriter.EndContainer(outerContainerType)); ReturnErrorOnFailure(tlvWriter.Finalize(&msg_R2_resume)); @@ -1067,10 +1057,10 @@ CHIP_ERROR CASESession::SendSigma2() msg_R2_Encrypted.Get() + msg_r2_signed_enc_len, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES)); // Construct Sigma2 Msg - const size_t mrpParamsSize = - mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t), sizeof(uint16_t)) : 0; - size_t data_len = TLV::EstimateStructOverhead(kSigmaParamRandomNumberSize, sizeof(uint16_t), kP256_PublicKey_Length, - msg_r2_signed_enc_len, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, mrpParamsSize); + size_t size_of_local_session_id = sizeof(uint16_t); + size_t data_len = + TLV::EstimateStructOverhead(kSigmaParamRandomNumberSize, size_of_local_session_id, kP256_PublicKey_Length, + msg_r2_signed_enc_len, CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, SessionParameters::kEstimatedTLVSize); System::PacketBufferHandle msg_R2 = System::PacketBufferHandle::New(data_len); VerifyOrReturnError(!msg_R2.IsNull(), CHIP_ERROR_NO_MEMORY); @@ -1086,11 +1076,9 @@ CHIP_ERROR CASESession::SendSigma2() static_cast(mEphemeralKey->Pubkey().Length()))); ReturnErrorOnFailure(tlvWriterMsg2.PutBytes(TLV::ContextTag(4), msg_R2_Encrypted.Get(), static_cast(msg_r2_signed_enc_len + CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES))); - if (mLocalMRPConfig.HasValue()) - { - ChipLogDetail(SecureChannel, "Including MRP parameters"); - ReturnErrorOnFailure(EncodeMRPParameters(TLV::ContextTag(5), mLocalMRPConfig.Value(), tlvWriterMsg2)); - } + + ReturnErrorOnFailure(EncodeSessionParameters(TLV::ContextTag(5), mLocalMRPConfig, tlvWriterMsg2)); + ReturnErrorOnFailure(tlvWriterMsg2.EndContainer(outerContainerType)); ReturnErrorOnFailure(tlvWriterMsg2.Finalize(&msg_R2)); @@ -1147,7 +1135,7 @@ CHIP_ERROR CASESession::HandleSigma2Resume(System::PacketBufferHandle && msg) if (tlvReader.Next() != CHIP_END_OF_TLV) { SuccessOrExit(err = DecodeMRPParametersIfPresent(TLV::ContextTag(4), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); } ChipLogDetail(SecureChannel, "Peer assigned session session ID %d", responderSessionId); @@ -1340,7 +1328,7 @@ CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg) if (tlvReader.Next() != CHIP_END_OF_TLV) { SuccessOrExit(err = DecodeMRPParametersIfPresent(TLV::ContextTag(kTag_Sigma2_ResponderMRPParams), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); } exit: @@ -2029,7 +2017,7 @@ CHIP_ERROR CASESession::ParseSigma1(TLV::ContiguousBufferTLVReader & tlvReader, if (err == CHIP_NO_ERROR && tlvReader.GetTag() == ContextTag(kInitiatorMRPParamsTag)) { ReturnErrorOnFailure(DecodeMRPParametersIfPresent(TLV::ContextTag(kInitiatorMRPParamsTag), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); err = tlvReader.Next(); } diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index 966bc1dbe8dae0..28979dc69e021d 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -270,13 +271,12 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFLocalRandomData, sizeof(mPBKDFLocalRandomData))); - const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; - const size_t max_msg_len = TLV::EstimateStructOverhead(kPBKDFParamRandomNumberSize, // initiatorRandom, - sizeof(uint16_t), // initiatorSessionId - sizeof(PasscodeId), // passcodeId, - sizeof(uint8_t), // hasPBKDFParameters - mrpParamsSize // MRP Parameters - ); + const size_t max_msg_len = TLV::EstimateStructOverhead(kPBKDFParamRandomNumberSize, // initiatorRandom, + sizeof(uint16_t), // initiatorSessionId + sizeof(PasscodeId), // passcodeId, + sizeof(uint8_t), // hasPBKDFParameters + SessionParameters::kEstimatedTLVSize // Session Parameters + ); System::PacketBufferHandle req = System::PacketBufferHandle::New(max_msg_len); VerifyOrReturnError(!req.IsNull(), CHIP_ERROR_NO_MEMORY); @@ -290,11 +290,9 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(2), GetLocalSessionId().Value())); ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(3), kDefaultCommissioningPasscodeId)); ReturnErrorOnFailure(tlvWriter.PutBoolean(TLV::ContextTag(4), mHavePBKDFParameters)); - if (mLocalMRPConfig.HasValue()) - { - ChipLogDetail(SecureChannel, "Including MRP parameters in PBKDF param request"); - ReturnErrorOnFailure(EncodeMRPParameters(TLV::ContextTag(5), mLocalMRPConfig.Value(), tlvWriter)); - } + + ReturnErrorOnFailure(EncodeSessionParameters(TLV::ContextTag(5), mLocalMRPConfig, tlvWriter)); + ReturnErrorOnFailure(tlvWriter.EndContainer(outerContainerType)); ReturnErrorOnFailure(tlvWriter.Finalize(&req)); @@ -357,7 +355,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamRequest(System::PacketBufferHandle && ms if (tlvReader.Next() != CHIP_END_OF_TLV) { SuccessOrExit(err = DecodeMRPParametersIfPresent(TLV::ContextTag(5), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); } err = SendPBKDFParamResponse(ByteSpan(initiatorRandom), hasPBKDFParameters); @@ -382,13 +380,12 @@ CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool in ReturnErrorOnFailure(DRBG_get_bytes(mPBKDFLocalRandomData, sizeof(mPBKDFLocalRandomData))); - const size_t mrpParamsSize = mLocalMRPConfig.HasValue() ? TLV::EstimateStructOverhead(sizeof(uint16_t), sizeof(uint16_t)) : 0; const size_t max_msg_len = TLV::EstimateStructOverhead(kPBKDFParamRandomNumberSize, // initiatorRandom kPBKDFParamRandomNumberSize, // responderRandom sizeof(uint16_t), // responderSessionId TLV::EstimateStructOverhead(sizeof(uint32_t), mSaltLength), // pbkdf_parameters - mrpParamsSize // MRP Parameters + SessionParameters::kEstimatedTLVSize // Session Parameters ); System::PacketBufferHandle resp = System::PacketBufferHandle::New(max_msg_len); @@ -413,11 +410,7 @@ CHIP_ERROR PASESession::SendPBKDFParamResponse(ByteSpan initiatorRandom, bool in ReturnErrorOnFailure(tlvWriter.EndContainer(pbkdfParamContainer)); } - if (mLocalMRPConfig.HasValue()) - { - ChipLogDetail(SecureChannel, "Including MRP parameters in PBKDF param response"); - ReturnErrorOnFailure(EncodeMRPParameters(TLV::ContextTag(5), mLocalMRPConfig.Value(), tlvWriter)); - } + ReturnErrorOnFailure(EncodeSessionParameters(TLV::ContextTag(5), mLocalMRPConfig, tlvWriter)); ReturnErrorOnFailure(tlvWriter.EndContainer(outerContainerType)); ReturnErrorOnFailure(tlvWriter.Finalize(&resp)); @@ -481,7 +474,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamResponse(System::PacketBufferHandle && m if (tlvReader.Next() != CHIP_END_OF_TLV) { SuccessOrExit(err = DecodeMRPParametersIfPresent(TLV::ContextTag(5), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); } // TODO - Add a unit test that exercises mHavePBKDFParameters path @@ -506,7 +499,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamResponse(System::PacketBufferHandle && m if (tlvReader.Next() != CHIP_END_OF_TLV) { SuccessOrExit(err = DecodeMRPParametersIfPresent(TLV::ContextTag(5), tlvReader)); - mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig(mRemoteMRPConfig); + mExchangeCtxt->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(GetRemoteSessionParameters()); } } diff --git a/src/protocols/secure_channel/PairingSession.cpp b/src/protocols/secure_channel/PairingSession.cpp index af555bfeee5046..63a1701e66541f 100644 --- a/src/protocols/secure_channel/PairingSession.cpp +++ b/src/protocols/secure_channel/PairingSession.cpp @@ -18,6 +18,10 @@ #include +#include +#include +#include +#include #include #include @@ -44,7 +48,7 @@ CHIP_ERROR PairingSession::ActivateSecureSession(const Transport::PeerAddress & // Call Activate last, otherwise errors on anything after would lead to // a partially valid session. - secureSession->Activate(GetLocalScopedNodeId(), GetPeer(), GetPeerCATs(), peerSessionId, mRemoteMRPConfig); + secureSession->Activate(GetLocalScopedNodeId(), GetPeer(), GetPeerCATs(), peerSessionId, GetRemoteSessionParameters()); ChipLogDetail(Inet, "New secure session activated for device " ChipLogFormatScopedNodeId ", LSID:%d PSID:%d!", ChipLogValueScopedNodeId(GetPeer()), secureSession->GetLocalSessionId(), peerSessionId); @@ -88,19 +92,44 @@ void PairingSession::DiscardExchange() } } -CHIP_ERROR PairingSession::EncodeMRPParameters(TLV::Tag tag, const ReliableMessageProtocolConfig & mrpLocalConfig, - TLV::TLVWriter & tlvWriter) +CHIP_ERROR PairingSession::EncodeSessionParameters(TLV::Tag tag, const Optional & providedMrpConfig, + TLV::TLVWriter & tlvWriter) { + // TODO: https://github.com/project-chip/connectedhomeip/issues/30456. Based on the spec we need to send values here now, + // but it is not entirely clear what we should be sending here when `providedMrpConfig.HasValue() == false`. For now we + // are sending the default MRP config values. + ReliableMessageProtocolConfig mrpLocalConfig = GetDefaultMRPConfig(); + if (providedMrpConfig.HasValue()) + { + mrpLocalConfig = providedMrpConfig.Value(); + } TLV::TLVType mrpParamsContainer; ReturnErrorOnFailure(tlvWriter.StartContainer(tag, TLV::kTLVType_Structure, mrpParamsContainer)); - ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(1), mrpLocalConfig.mIdleRetransTimeout.count())); - ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(2), mrpLocalConfig.mActiveRetransTimeout.count())); - ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(3), mrpLocalConfig.mActiveThresholdTime.count())); + ReturnErrorOnFailure( + tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kSessionIdleInterval), mrpLocalConfig.mIdleRetransTimeout.count())); + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kSessionActiveInterval), + mrpLocalConfig.mActiveRetransTimeout.count())); + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kSessionActiveThreshold), + mrpLocalConfig.mActiveThresholdTime.count())); + + uint16_t dataModel = CHIP_DEVICE_DATA_MODEL_REVISION; + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kDataModelRevision), dataModel)); + + uint16_t interactionModel = CHIP_DEVICE_INTERACTION_MODEL_REVISION; + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kInteractionModelRevision), interactionModel)); + + uint32_t specVersion = CHIP_DEVICE_SPECIFICATION_VERSION; + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kSpecificationVersion), specVersion)); + + uint16_t maxPathsPerInvoke = CHIP_CONFIG_MAX_PATHS_PER_INVOKE; + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(SessionParameters::Tag::kMaxPathsPerInvoke), maxPathsPerInvoke)); return tlvWriter.EndContainer(mrpParamsContainer); } CHIP_ERROR PairingSession::DecodeMRPParametersIfPresent(TLV::Tag expectedTag, TLV::ContiguousBufferTLVReader & tlvReader) { + CHIP_ERROR err = CHIP_NO_ERROR; + // The MRP parameters are optional. if (tlvReader.GetTag() != expectedTag) { @@ -110,50 +139,89 @@ CHIP_ERROR PairingSession::DecodeMRPParametersIfPresent(TLV::Tag expectedTag, TL TLV::TLVType containerType = TLV::kTLVType_Structure; ReturnErrorOnFailure(tlvReader.EnterContainer(containerType)); - uint32_t tlvElementValue = 0; - ReturnErrorOnFailure(tlvReader.Next()); ChipLogDetail(SecureChannel, "Found MRP parameters in the message"); // All TLV elements in the structure are optional. If the first element is present, process it and move // the TLV reader to the next element. - if (TLV::TagNumFromTag(tlvReader.GetTag()) == 1) + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kSessionIdleInterval) { - ReturnErrorOnFailure(tlvReader.Get(tlvElementValue)); - mRemoteMRPConfig.mIdleRetransTimeout = System::Clock::Milliseconds32(tlvElementValue); + uint32_t idleRetransTimeout; + ReturnErrorOnFailure(tlvReader.Get(idleRetransTimeout)); + mRemoteSessionParams.SetMRPIdleRetransTimeout(System::Clock::Milliseconds32(idleRetransTimeout)); // The next element is optional. If it's not present, return CHIP_NO_ERROR. - CHIP_ERROR err = tlvReader.Next(); - if (err == CHIP_END_OF_TLV) - { - return tlvReader.ExitContainer(containerType); - } - ReturnErrorOnFailure(err); + SuccessOrExit(err = tlvReader.Next()); } - if (TLV::TagNumFromTag(tlvReader.GetTag()) == 2) + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kSessionActiveInterval) { - ReturnErrorOnFailure(tlvReader.Get(tlvElementValue)); - mRemoteMRPConfig.mActiveRetransTimeout = System::Clock::Milliseconds32(tlvElementValue); + uint32_t activeRetransTimeout; + ReturnErrorOnFailure(tlvReader.Get(activeRetransTimeout)); + mRemoteSessionParams.SetMRPActiveRetransTimeout(System::Clock::Milliseconds32(activeRetransTimeout)); // The next element is optional. If it's not present, return CHIP_NO_ERROR. - CHIP_ERROR err = tlvReader.Next(); - if (err == CHIP_END_OF_TLV) - { - return tlvReader.ExitContainer(containerType); - } - ReturnErrorOnFailure(err); + SuccessOrExit(err = tlvReader.Next()); } - if (TLV::TagNumFromTag(tlvReader.GetTag()) == 3) + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kSessionActiveThreshold) { - ReturnErrorOnFailure(tlvReader.Get(tlvElementValue)); - mRemoteMRPConfig.mActiveThresholdTime = System::Clock::Milliseconds16(tlvElementValue); + uint16_t activeThresholdTime; + ReturnErrorOnFailure(tlvReader.Get(activeThresholdTime)); + mRemoteSessionParams.SetMRPActiveThresholdTime(System::Clock::Milliseconds16(activeThresholdTime)); + + // The next element is optional. If it's not present, return CHIP_NO_ERROR. + SuccessOrExit(err = tlvReader.Next()); + } + + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kDataModelRevision) + { + uint16_t dataModelRevision; + ReturnErrorOnFailure(tlvReader.Get(dataModelRevision)); + mRemoteSessionParams.SetDataModelRevision(dataModelRevision); + + // The next element is optional. If it's not present, return CHIP_NO_ERROR. + SuccessOrExit(err = tlvReader.Next()); + } + + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kInteractionModelRevision) + { + uint16_t interactionModelRevision; + ReturnErrorOnFailure(tlvReader.Get(interactionModelRevision)); + mRemoteSessionParams.SetInteractionModelRevision(interactionModelRevision); + + // The next element is optional. If it's not present, return CHIP_NO_ERROR. + SuccessOrExit(err = tlvReader.Next()); + } + + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kSpecificationVersion) + { + uint32_t specificationVersion; + ReturnErrorOnFailure(tlvReader.Get(specificationVersion)); + mRemoteSessionParams.SetSpecificationVersion(specificationVersion); + + // The next element is optional. If it's not present, return CHIP_NO_ERROR. + SuccessOrExit(err = tlvReader.Next()); } - // Future proofing - Don't error out if there are other tags - return tlvReader.ExitContainer(containerType); + if (TLV::TagNumFromTag(tlvReader.GetTag()) == SessionParameters::Tag::kMaxPathsPerInvoke) + { + uint16_t maxPathsPerInvoke; + ReturnErrorOnFailure(tlvReader.Get(maxPathsPerInvoke)); + mRemoteSessionParams.SetMaxPathsPerInvoke(maxPathsPerInvoke); + + // The next element is optional. If it's not present, return CHIP_NO_ERROR. + SuccessOrExit(err = tlvReader.Next()); + } + + // Future proofing - Don't error out if there are other tags +exit: + if (err == CHIP_END_OF_TLV) + { + return tlvReader.ExitContainer(containerType); + } + return err; } bool PairingSession::IsSessionEstablishmentInProgress() diff --git a/src/protocols/secure_channel/PairingSession.h b/src/protocols/secure_channel/PairingSession.h index c604cd0662dfd3..844fa33a41ae68 100644 --- a/src/protocols/secure_channel/PairingSession.h +++ b/src/protocols/secure_channel/PairingSession.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -96,14 +97,15 @@ class DLL_EXPORT PairingSession : public SessionDelegate */ virtual CHIP_ERROR DeriveSecureSession(CryptoContext & session) const = 0; - const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const { return mRemoteMRPConfig; } - void SetRemoteMRPConfig(const ReliableMessageProtocolConfig & config) { mRemoteMRPConfig = config; } + const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const { return mRemoteSessionParams.GetMRPConfig(); } + const SessionParameters & GetRemoteSessionParameters() const { return mRemoteSessionParams; } + void SetRemoteMRPConfig(const ReliableMessageProtocolConfig & config) { mRemoteSessionParams.SetMRPConfig(config); } /** - * Encode the provided MRP parameters using the provided TLV tag. + * Encode the Session Parameters using the provided TLV tag. */ - static CHIP_ERROR EncodeMRPParameters(TLV::Tag tag, const ReliableMessageProtocolConfig & mrpLocalConfig, - TLV::TLVWriter & tlvWriter); + static CHIP_ERROR EncodeSessionParameters(TLV::Tag tag, const Optional & mrpLocalConfig, + TLV::TLVWriter & tlvWriter); protected: /** @@ -200,7 +202,7 @@ class DLL_EXPORT PairingSession : public SessionDelegate /** * Try to decode the current element (pointed by the TLV reader) as MRP parameters. - * If the MRP parameters are found, mRemoteMRPConfig is updated with the devoded values. + * If the MRP parameters are found, mRemoteSessionParams is updated with the devoded values. * * MRP parameters are optional. So, if the TLV reader is not pointing to the MRP parameters, * the function is a noop. @@ -231,9 +233,9 @@ class DLL_EXPORT PairingSession : public SessionDelegate SessionEstablishmentDelegate * mDelegate = nullptr; // mLocalMRPConfig is our config which is sent to the other end and used by the peer session. - // mRemoteMRPConfig is received from other end and set to our session. + // mRemoteSessionParams is received from other end and set to our session. Optional mLocalMRPConfig; - ReliableMessageProtocolConfig mRemoteMRPConfig = GetDefaultMRPConfig(); + SessionParameters mRemoteSessionParams; private: Optional mPeerSessionId; diff --git a/src/protocols/secure_channel/SessionParameters.h b/src/protocols/secure_channel/SessionParameters.h new file mode 100644 index 00000000000000..a595e7803aa633 --- /dev/null +++ b/src/protocols/secure_channel/SessionParameters.h @@ -0,0 +1,109 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { + +// TODO We should get part of this from constexpr that is in ReliableMessageProtocolConfig.h + +class SessionParameters +{ +public: + SessionParameters(ReliableMessageProtocolConfig mrpConfig = GetDefaultMRPConfig()) : mMRPConfig(mrpConfig) {} + + // This estimated TLV size calc is here instead of messaging/ReliableMessageProtocolConfig.h + // because we would need to add `include `. While we could make it all work + // from a build standpoint, if any new MRP config gets added accessors will still need to be + // added here so having this calc done here isn't problematic. + static constexpr size_t kSizeOfSessionIdleInterval = sizeof(uint32_t); + static constexpr size_t kSizeOfSessionActiveInterval = sizeof(uint32_t); + static constexpr size_t kSizeOfSessionActiveThreshold = sizeof(uint16_t); + static constexpr size_t kSizeOfDataModelRevision = sizeof(uint16_t); + static constexpr size_t kSizeOfInteractionModelRevision = sizeof(uint16_t); + static constexpr size_t kSizeOfSpecificationVersion = sizeof(uint32_t); + static constexpr size_t kSizeOfMaxPathsPerInvoke = sizeof(uint16_t); + + static constexpr size_t kEstimatedTLVSize = TLV::EstimateStructOverhead( + kSizeOfSessionIdleInterval, kSizeOfSessionActiveInterval, kSizeOfSessionActiveThreshold, kSizeOfDataModelRevision, + kSizeOfInteractionModelRevision, kSizeOfSpecificationVersion, kSizeOfMaxPathsPerInvoke); + + // From Section 4.12.8 "Parameters and Constants" in chapter "Secure Channel". + enum Tag : uint32_t + { + kSessionIdleInterval = 1, + kSessionActiveInterval = 2, + kSessionActiveThreshold = 3, + kDataModelRevision = 4, + kInteractionModelRevision = 5, + kSpecificationVersion = 6, + kMaxPathsPerInvoke = 7, + }; + + const ReliableMessageProtocolConfig & GetMRPConfig() const { return mMRPConfig; } + void SetMRPConfig(const ReliableMessageProtocolConfig & config) { mMRPConfig = config; } + void SetMRPIdleRetransTimeout(const System::Clock::Milliseconds32 idleRetransTimeout) + { + mMRPConfig.mIdleRetransTimeout = idleRetransTimeout; + } + void SetMRPActiveRetransTimeout(const System::Clock::Milliseconds32 activeRetransTimeout) + { + mMRPConfig.mActiveRetransTimeout = activeRetransTimeout; + } + void SetMRPActiveThresholdTime(const System::Clock::Milliseconds16 activeThresholdTime) + { + mMRPConfig.mActiveThresholdTime = activeThresholdTime; + } + + const Optional & GetDataModelRevision() const { return mDataModelRevision; } + void SetDataModelRevision(const uint16_t dataModelRevision) { mDataModelRevision = MakeOptional(dataModelRevision); } + + const Optional & GetInteractionModelRevision() const { return mInteractionModelRevision; } + void SetInteractionModelRevision(const uint16_t interactionModelRevision) + { + mInteractionModelRevision = MakeOptional(interactionModelRevision); + } + + const Optional & GetSpecificationVersion() const { return mSpecificationVersion; } + void SetSpecificationVersion(const uint32_t specificationVersion) + { + mSpecificationVersion = MakeOptional(specificationVersion); + } + + uint16_t GetMaxPathsPerInvoke() const { return mMaxPathsPerInvoke; } + void SetMaxPathsPerInvoke(const uint16_t maxPathsPerInvoke) { mMaxPathsPerInvoke = maxPathsPerInvoke; } + +private: + ReliableMessageProtocolConfig mMRPConfig; + // For legacy reasons if we do not get DataModelRevision it means either 16 or 17. But there isn't + // a way to know for certain. + Optional mDataModelRevision; + // For legacy reasons if we do not get InteractionModelRevision it means either 10 or 11. But there + // isn't a way to know for certain. + Optional mInteractionModelRevision; + // For legacy reasons if we do not get SpecificationVersion it means that version is less than + // 0x01030000. But there isn't a way to know for certain. + Optional mSpecificationVersion; + // When maxPathsPerInvoke is not provided legacy is always 1 + uint16_t mMaxPathsPerInvoke = 1; +}; + +} // namespace chip diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 96035793dc0fd7..b22a899f7225d0 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -259,15 +259,17 @@ void SecurePairingHandshakeTestCommon(nlTestSuite * inSuite, void * inContext, S // Adding an if-else to avoid affecting non-ICD tests #if CHIP_CONFIG_ENABLE_ICD_SERVER == 1 // Increase local MRP retry intervals to take into account the increase response delay from an ICD - contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig({ - 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL - 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters( + ReliableMessageProtocolConfig({ + 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL + 1000_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + })); #else // CHIP_CONFIG_ENABLE_ICD_SERVER != 1 - contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig({ - 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL - 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters( + ReliableMessageProtocolConfig({ + 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL + 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL + })); #endif // CHIP_CONFIG_ENABLE_ICD_SERVER } @@ -455,10 +457,10 @@ void SecurePairingFailedHandshake(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, rm != nullptr); NL_TEST_ASSERT(inSuite, rc != nullptr); - contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteMRPConfig({ + contextCommissioner->GetSessionHandle()->AsUnauthenticatedSession()->SetRemoteSessionParameters(ReliableMessageProtocolConfig({ 64_ms32, // CHIP_CONFIG_MRP_LOCAL_IDLE_RETRY_INTERVAL 64_ms32, // CHIP_CONFIG_MRP_LOCAL_ACTIVE_RETRY_INTERVAL - }); + })); NL_TEST_ASSERT(inSuite, ctx.GetExchangeManager().RegisterUnsolicitedMessageHandlerForType( diff --git a/src/protocols/secure_channel/tests/TestPairingSession.cpp b/src/protocols/secure_channel/tests/TestPairingSession.cpp index 714a18e03fc1a4..ac1c4537888bc8 100644 --- a/src/protocols/secure_channel/tests/TestPairingSession.cpp +++ b/src/protocols/secure_channel/tests/TestPairingSession.cpp @@ -46,7 +46,7 @@ class TestPairingSession : public PairingSession void OnSessionReleased() override {} - const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const { return mRemoteMRPConfig; } + const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const { return PairingSession::GetRemoteMRPConfig(); } CHIP_ERROR DeriveSecureSession(CryptoContext & session) const override { return CHIP_NO_ERROR; } @@ -70,7 +70,8 @@ void PairingSessionEncodeDecodeMRPParams(nlTestSuite * inSuite, void * inContext NL_TEST_ASSERT(inSuite, writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerContainerType) == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, PairingSession::EncodeMRPParameters(TLV::ContextTag(1), config, writer) == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, + PairingSession::EncodeSessionParameters(TLV::ContextTag(1), MakeOptional(config), writer) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, writer.EndContainer(outerContainerType) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, writer.Finalize(&buf) == CHIP_NO_ERROR); diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index aafe8d98046d71..30a4353f7ffe88 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -24,13 +24,10 @@ import chip.tlv from basic_composition_support import BasicCompositionTests from chip.clusters.Attribute import ValueDecodeFailure -from chip.tlv import uint -from conformance_support import ConformanceDecision, conformance_allowed from global_attribute_ids import GlobalAttributeIds from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, MatterBaseTest, async_test_body, default_matter_test_main) from mobly import asserts -from spec_parsing_support import CommandType, build_xml_clusters from taglist_and_topology_test_support import (create_device_type_list_for_root, create_device_type_lists, find_tag_list_problems, find_tree_roots, get_all_children, get_direct_children_of_root, parts_list_cycles, separate_endpoint_types) @@ -708,177 +705,6 @@ def test_DESC_2_2(self): if problems or root_problems: self.fail_current_test("Problems with tags lists") - def test_spec_conformance(self): - def conformance_str(conformance: Callable, feature_map: uint, feature_dict: dict[str, uint]) -> str: - codes = [] - for mask, details in feature_dict.items(): - if mask & feature_map: - codes.append(details.code) - - return f'Conformance: {str(conformance)}, implemented features: {",".join(codes)}' - - ignore_in_progress = self.user_params.get("ignore_in_progress", False) - is_ci = self.check_pics('PICS_SDK_CI_ONLY') - - ignore_attributes: dict[int, list[int]] = {} - if ignore_in_progress: - # This is a manually curated list of attributes that are in-progress in the SDK, but have landed in the spec - in_progress_attributes = {Clusters.BasicInformation.id: [0x15, 0x016]} - ignore_attributes.update(in_progress_attributes) - - if is_ci: - # The network commissioning clusters on the CI select the features on the fly and end up non-conformant - # on these attributes. Production devices should not. - ci_ignore_attributes = {Clusters.NetworkCommissioning.id: [ - Clusters.NetworkCommissioning.Attributes.ScanMaxTimeSeconds.attribute_id, Clusters.NetworkCommissioning.Attributes.ConnectMaxTimeSeconds.attribute_id]} - ignore_attributes.update(ci_ignore_attributes) - - success = True - allow_provisional = self.user_params.get("allow_provisional", False) - clusters, problems = build_xml_clusters() - self.problems = self.problems + problems - for endpoint_id, endpoint in self.endpoints_tlv.items(): - for cluster_id, cluster in endpoint.items(): - if cluster_id not in clusters.keys(): - if (cluster_id & 0xFFFF_0000) != 0: - # manufacturer cluster - continue - location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) - # TODO: update this from a warning once we have all the data - self.record_warning(self.get_test_name(), location=location, - problem='Standard cluster found on device, but is not present in spec data') - continue - - feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID] - attribute_list = cluster[GlobalAttributeIds.ATTRIBUTE_LIST_ID] - all_command_list = cluster[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] + \ - cluster[GlobalAttributeIds.GENERATED_COMMAND_LIST_ID] - - # Feature conformance checking - feature_masks = [1 << i for i in range(32) if feature_map & (1 << i)] - for f in feature_masks: - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, - attribute_id=GlobalAttributeIds.FEATURE_MAP_ID) - if f not in clusters[cluster_id].features.keys(): - self.record_error(self.get_test_name(), location=location, problem=f'Unknown feature with mask 0x{f:02x}') - success = False - continue - xml_feature = clusters[cluster_id].features[f] - conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list) - if not conformance_allowed(conformance_decision, allow_provisional): - self.record_error(self.get_test_name(), location=location, - problem=f'Disallowed feature with mask 0x{f:02x}') - success = False - for feature_mask, xml_feature in clusters[cluster_id].features.items(): - conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list) - if conformance_decision == ConformanceDecision.MANDATORY and feature_mask not in feature_masks: - self.record_error(self.get_test_name(), location=location, - problem=f'Required feature with mask 0x{f:02x} is not present in feature map. {conformance_str(xml_feature.conformance, feature_map, clusters[cluster_id].features)}') - success = False - - # Attribute conformance checking - for attribute_id, attribute in cluster.items(): - if cluster_id in ignore_attributes and attribute_id in ignore_attributes[cluster_id]: - continue - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) - if attribute_id not in clusters[cluster_id].attributes.keys(): - # TODO: Consolidate the range checks with IDM-10.1 once that lands - if attribute_id <= 0x4FFF: - # manufacturer attribute - self.record_error(self.get_test_name(), location=location, - problem='Standard attribute found on device, but not in spec') - success = False - continue - xml_attribute = clusters[cluster_id].attributes[attribute_id] - conformance_decision = xml_attribute.conformance(feature_map, attribute_list, all_command_list) - if not conformance_allowed(conformance_decision, allow_provisional): - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) - self.record_error(self.get_test_name(), location=location, - problem=f'Attribute 0x{attribute_id:02x} is included, but is disallowed by conformance. {conformance_str(xml_attribute.conformance, feature_map, clusters[cluster_id].features)}') - success = False - for attribute_id, xml_attribute in clusters[cluster_id].attributes.items(): - if cluster_id in ignore_attributes and attribute_id in ignore_attributes[cluster_id]: - continue - conformance_decision = xml_attribute.conformance(feature_map, attribute_list, all_command_list) - if conformance_decision == ConformanceDecision.MANDATORY and attribute_id not in cluster.keys(): - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) - self.record_error(self.get_test_name(), location=location, - problem=f'Attribute 0x{attribute_id:02x} is required, but is not present on the DUT. {conformance_str(xml_attribute.conformance, feature_map, clusters[cluster_id].features)}') - success = False - - def check_spec_conformance_for_commands(command_type: CommandType) -> bool: - success = True - global_attribute_id = GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID if command_type == CommandType.ACCEPTED else GlobalAttributeIds.GENERATED_COMMAND_LIST_ID - xml_commands_dict = clusters[cluster_id].accepted_commands if command_type == CommandType.ACCEPTED else clusters[cluster_id].generated_commands - command_list = cluster[global_attribute_id] - for command_id in command_list: - location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=command_id) - if command_id not in xml_commands_dict: - # TODO: Consolidate range checks with IDM-10.1 once that lands - if command_id <= 0xFF: - # manufacturer command - continue - self.record_error(self.get_test_name(), location=location, - problem='Standard command found on device, but not in spec') - success = False - continue - xml_command = xml_commands_dict[command_id] - conformance_decision = xml_command.conformance(feature_map, attribute_list, all_command_list) - if not conformance_allowed(conformance_decision, allow_provisional): - self.record_error(self.get_test_name(), location=location, - problem=f'Command 0x{command_id:02x} is included, but disallowed by conformance. {conformance_str(xml_command.conformance, feature_map, clusters[cluster_id].features)}') - success = False - for command_id, xml_command in xml_commands_dict.items(): - conformance_decision = xml_command.conformance(feature_map, attribute_list, all_command_list) - if conformance_decision == ConformanceDecision.MANDATORY and command_id not in command_list: - location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=command_id) - self.record_error(self.get_test_name(), location=location, - problem=f'Command 0x{command_id:02x} is required, but is not present on the DUT. {conformance_str(xml_command.conformance, feature_map, clusters[cluster_id].features)}') - success = False - return success - - # Command conformance checking - cmd_success = check_spec_conformance_for_commands(CommandType.ACCEPTED) - success = False if not cmd_success else success - cmd_success = check_spec_conformance_for_commands(CommandType.GENERATED) - success = False if not cmd_success else success - - # TODO: Add choice checkers - - if not success: - # TODO: Right now, we have failures in all-cluster, so we can't fail this test and keep it in CI. For now, just log. - # Issue tracking: #29812 - # self.fail_current_test("Problems with conformance") - logging.error("Problems found with conformance, this should turn into a test failure once #29812 is resolved") - - def test_IDM_10_3(self): - # TODO: move to class setup - success = True - clusters, problems = build_xml_clusters() - self.problems = self.problems + problems - for endpoint_id, endpoint in self.endpoints_tlv.items(): - for cluster_id, cluster in endpoint.items(): - if cluster_id not in clusters.keys(): - if (cluster_id & 0xFFFF_0000) != 0: - # manufacturer cluster - continue - location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) - # TODO: update this from a warning once we have all the data - self.record_warning(self.get_test_name(), location=location, - problem='Standard cluster found on device, but is not present in spec data') - continue - if int(clusters[cluster_id].revision) != cluster[GlobalAttributeIds.CLUSTER_REVISION_ID]: - location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, - attribute_id=GlobalAttributeIds.CLUSTER_REVISION_ID) - self.record_error(self.get_test_name( - ), location=location, problem=f'Revision found on cluster ({cluster[GlobalAttributeIds.CLUSTER_REVISION_ID]}) does not match revision listed in the spec ({clusters[cluster_id].revision})') - success = False - if not success: - # TODO: Right now, we have failures in all-cluster, so we can't fail this test and keep it in CI. For now, just log. - # Issue tracking: #30210 - # self.fail_current_test("Problems with cluster revision on at least one cluster") - logging.error('Problems with cluster revision on at least one cluster') - if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py new file mode 100644 index 00000000000000..ddccc041cba567 --- /dev/null +++ b/src/python_testing/TC_DeviceConformance.py @@ -0,0 +1,220 @@ +# +# 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. +# + +from typing import Callable + +import chip.clusters as Clusters +from basic_composition_support import BasicCompositionTests +from chip.tlv import uint +from conformance_support import ConformanceDecision, conformance_allowed +from global_attribute_ids import GlobalAttributeIds +from matter_testing_support import (AttributePathLocation, ClusterPathLocation, CommandPathLocation, MatterBaseTest, + async_test_body, default_matter_test_main) +from spec_parsing_support import CommandType, build_xml_clusters + + +class TC_DeviceConformance(MatterBaseTest, BasicCompositionTests): + @async_test_body + async def setup_class(self): + super().setup_class() + await self.setup_class_helper() + self.xml_clusters, self.problems = build_xml_clusters() + + def test_TC_IDM_10_2(self): + def conformance_str(conformance: Callable, feature_map: uint, feature_dict: dict[str, uint]) -> str: + codes = [] + for mask, details in feature_dict.items(): + if mask & feature_map: + codes.append(details.code) + + return f'Conformance: {str(conformance)}, implemented features: {",".join(codes)}' + + ignore_in_progress = self.user_params.get("ignore_in_progress", False) + is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + ignore_attributes: dict[int, list[int]] = {} + ignore_features: dict[int, list[int]] = {} + if ignore_in_progress: + # This is a manually curated list of attributes that are in-progress in the SDK, but have landed in the spec + in_progress_attributes = {Clusters.BasicInformation.id: [0x15, 0x016], + Clusters.PowerSource.id: [0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A]} + ignore_attributes.update(in_progress_attributes) + # The spec currently has an error on the power source features + # This should be removed once https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/7823 lands + in_progress_features = {Clusters.PowerSource.id: [(1 << 2), (1 << 3), (1 << 4), (1 << 5)]} + ignore_features.update(in_progress_features) + + if is_ci: + # The network commissioning clusters on the CI select the features on the fly and end up non-conformant + # on these attributes. Production devices should not. + ci_ignore_attributes = {Clusters.NetworkCommissioning.id: [ + Clusters.NetworkCommissioning.Attributes.ScanMaxTimeSeconds.attribute_id, Clusters.NetworkCommissioning.Attributes.ConnectMaxTimeSeconds.attribute_id]} + ignore_attributes.update(ci_ignore_attributes) + + success = True + allow_provisional = self.user_params.get("allow_provisional", False) + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + if cluster_id not in self.xml_clusters.keys(): + if (cluster_id & 0xFFFF_0000) != 0: + # manufacturer cluster + continue + location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) + # TODO: update this from a warning once we have all the data + self.record_warning(self.get_test_name(), location=location, + problem='Standard cluster found on device, but is not present in spec data') + continue + + feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID] + attribute_list = cluster[GlobalAttributeIds.ATTRIBUTE_LIST_ID] + all_command_list = cluster[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] + \ + cluster[GlobalAttributeIds.GENERATED_COMMAND_LIST_ID] + + # Feature conformance checking + feature_masks = [1 << i for i in range(32) if feature_map & (1 << i)] + for f in feature_masks: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=GlobalAttributeIds.FEATURE_MAP_ID) + if f not in self.xml_clusters[cluster_id].features.keys(): + self.record_error(self.get_test_name(), location=location, problem=f'Unknown feature with mask 0x{f:02x}') + success = False + continue + if cluster_id in ignore_features and f in ignore_features[cluster_id]: + continue + xml_feature = self.xml_clusters[cluster_id].features[f] + conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list) + if not conformance_allowed(conformance_decision, allow_provisional): + self.record_error(self.get_test_name(), location=location, + problem=f'Disallowed feature with mask 0x{f:02x}') + success = False + for feature_mask, xml_feature in self.xml_clusters[cluster_id].features.items(): + if cluster_id in ignore_features and feature_mask in ignore_features[cluster_id]: + continue + conformance_decision = xml_feature.conformance(feature_map, attribute_list, all_command_list) + if conformance_decision == ConformanceDecision.MANDATORY and feature_mask not in feature_masks: + self.record_error(self.get_test_name(), location=location, + problem=f'Required feature with mask 0x{f:02x} is not present in feature map. {conformance_str(xml_feature.conformance, feature_map, self.xml_clusters[cluster_id].features)}') + success = False + + # Attribute conformance checking + for attribute_id, attribute in cluster.items(): + if cluster_id in ignore_attributes and attribute_id in ignore_attributes[cluster_id]: + continue + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + if attribute_id not in self.xml_clusters[cluster_id].attributes.keys(): + # TODO: Consolidate the range checks with IDM-10.1 once that lands + if attribute_id <= 0x4FFF: + # manufacturer attribute + self.record_error(self.get_test_name(), location=location, + problem='Standard attribute found on device, but not in spec') + success = False + continue + xml_attribute = self.xml_clusters[cluster_id].attributes[attribute_id] + conformance_decision = xml_attribute.conformance(feature_map, attribute_list, all_command_list) + if not conformance_allowed(conformance_decision, allow_provisional): + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + self.record_error(self.get_test_name(), location=location, + problem=f'Attribute 0x{attribute_id:02x} is included, but is disallowed by conformance. {conformance_str(xml_attribute.conformance, feature_map, self.xml_clusters[cluster_id].features)}') + success = False + for attribute_id, xml_attribute in self.xml_clusters[cluster_id].attributes.items(): + if cluster_id in ignore_attributes and attribute_id in ignore_attributes[cluster_id]: + continue + conformance_decision = xml_attribute.conformance(feature_map, attribute_list, all_command_list) + if conformance_decision == ConformanceDecision.MANDATORY and attribute_id not in cluster.keys(): + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=attribute_id) + self.record_error(self.get_test_name(), location=location, + problem=f'Attribute 0x{attribute_id:02x} is required, but is not present on the DUT. {conformance_str(xml_attribute.conformance, feature_map, self.xml_clusters[cluster_id].features)}') + success = False + + def check_spec_conformance_for_commands(command_type: CommandType) -> bool: + success = True + global_attribute_id = GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID if command_type == CommandType.ACCEPTED else GlobalAttributeIds.GENERATED_COMMAND_LIST_ID + xml_commands_dict = self.xml_clusters[cluster_id].accepted_commands if command_type == CommandType.ACCEPTED else self.xml_clusters[cluster_id].generated_commands + command_list = cluster[global_attribute_id] + for command_id in command_list: + location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=command_id) + if command_id not in xml_commands_dict: + # TODO: Consolidate range checks with IDM-10.1 once that lands + if command_id <= 0xFF: + # manufacturer command + continue + self.record_error(self.get_test_name(), location=location, + problem='Standard command found on device, but not in spec') + success = False + continue + xml_command = xml_commands_dict[command_id] + conformance_decision = xml_command.conformance(feature_map, attribute_list, all_command_list) + if not conformance_allowed(conformance_decision, allow_provisional): + self.record_error(self.get_test_name(), location=location, + problem=f'Command 0x{command_id:02x} is included, but disallowed by conformance. {conformance_str(xml_command.conformance, feature_map, self.xml_clusters[cluster_id].features)}') + success = False + for command_id, xml_command in xml_commands_dict.items(): + conformance_decision = xml_command.conformance(feature_map, attribute_list, all_command_list) + if conformance_decision == ConformanceDecision.MANDATORY and command_id not in command_list: + location = CommandPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, command_id=command_id) + self.record_error(self.get_test_name(), location=location, + problem=f'Command 0x{command_id:02x} is required, but is not present on the DUT. {conformance_str(xml_command.conformance, feature_map, self.xml_clusters[cluster_id].features)}') + success = False + return success + + # Command conformance checking + cmd_success = check_spec_conformance_for_commands(CommandType.ACCEPTED) + success = False if not cmd_success else success + cmd_success = check_spec_conformance_for_commands(CommandType.GENERATED) + success = False if not cmd_success else success + + # TODO: Add choice checkers + + if not success: + self.fail_current_test("Problems with conformance") + + def test_IDM_10_3(self): + success = True + + ignore_in_progress = self.user_params.get("ignore_in_progress", False) + + ignore_revisions: list[int] = [] + if ignore_in_progress: + # This is a manually curated list of cluster revisions that are in-progress in the SDK, but have landed in the spec + in_progress_revisions = [Clusters.BasicInformation.id, Clusters.PowerSource.id, Clusters.NetworkCommissioning.id] + ignore_revisions.extend(in_progress_revisions) + + for endpoint_id, endpoint in self.endpoints_tlv.items(): + for cluster_id, cluster in endpoint.items(): + if cluster_id not in self.xml_clusters.keys(): + if (cluster_id & 0xFFFF_0000) != 0: + # manufacturer cluster + continue + location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) + # TODO: update this from a warning once we have all the data + self.record_warning(self.get_test_name(), location=location, + problem='Standard cluster found on device, but is not present in spec data') + continue + if cluster_id in ignore_revisions: + continue + if int(self.xml_clusters[cluster_id].revision) != cluster[GlobalAttributeIds.CLUSTER_REVISION_ID]: + location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, + attribute_id=GlobalAttributeIds.CLUSTER_REVISION_ID) + self.record_error(self.get_test_name( + ), location=location, problem=f'Revision found on cluster ({cluster[GlobalAttributeIds.CLUSTER_REVISION_ID]}) does not match revision listed in the spec ({self.xml_clusters[cluster_id].revision})') + success = False + if not success: + self.fail_current_test("Problems with cluster revision on at least one cluster") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 759e6cdf377366..1b3fab9b8c8a3e 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -443,6 +443,8 @@ def _init_stack(self, already_initialized: bool, **kwargs): self._chip_stack = ChipStack(**kwargs) builtins.chipStack = self._chip_stack + chip.logging.RedirectToPythonLogging() + self._storage = self._chip_stack.GetStorageManager() self._certificate_authority_manager = chip.CertificateAuthority.CertificateAuthorityManager(chipStack=self._chip_stack) self._certificate_authority_manager.LoadAuthoritiesFromStorage() diff --git a/src/system/BUILD.gn b/src/system/BUILD.gn index 283e3b7c49bcbd..cc0293ea864642 100644 --- a/src/system/BUILD.gn +++ b/src/system/BUILD.gn @@ -166,11 +166,13 @@ source_set("system_config_header") { "${chip_root}/src:includes", ] - public_deps = [ + deps = [ ":system_buildconfig", "${chip_root}/src/platform:platform_buildconfig", ] + public_deps = [] + if (target_cpu != "esp32") { if (chip_system_config_use_lwip) { public_deps += [ "${chip_root}/src/lwip" ] @@ -220,7 +222,6 @@ static_library("system") { "SystemAlignSize.h", "SystemClock.cpp", "SystemClock.h", - "SystemConfig.h", "SystemError.cpp", "SystemError.h", "SystemEvent.h", @@ -253,9 +254,10 @@ static_library("system") { cflags = [ "-Wconversion" ] public_deps = [ + ":system_config_header", "${chip_root}/src/lib/core:error", "${chip_root}/src/lib/support", - "${chip_root}/src/platform:platform_buildconfig", + "${chip_root}/src/platform:platform_config_header", "${nlassert_root}:nlassert", ] diff --git a/src/test_driver/tizen/README.md b/src/test_driver/tizen/README.md index 970f10f9c5a676..fe07f2e976793c 100644 --- a/src/test_driver/tizen/README.md +++ b/src/test_driver/tizen/README.md @@ -12,7 +12,7 @@ image from hub.docker.com or build it locally using the provided Dockerfile in ```sh # Pull the image from hub.docker.com -docker pull ghcr.io/project-chip/chip-build-tizen-qemu:25 +docker pull ghcr.io/project-chip/chip-build-tizen-qemu:26 ``` ## Building and Running Tests on QEMU @@ -21,7 +21,7 @@ All steps described below should be done inside the docker container. ```sh docker run -it --rm --name chip-tizen-qemu \ - ghcr.io/project-chip/chip-build-tizen-qemu:25 /bin/bash + ghcr.io/project-chip/chip-build-tizen-qemu:26 /bin/bash ``` ### Clone the connectedhomeip repository diff --git a/src/tools/interop/idt/.gitignore b/src/tools/interop/idt/.gitignore index d2216005c33dc3..55da2a806dd412 100644 --- a/src/tools/interop/idt/.gitignore +++ b/src/tools/interop/idt/.gitignore @@ -7,3 +7,4 @@ __pycache__/ pycache/ venv/ .zip +BUILD diff --git a/src/tools/interop/idt/Dockerfile b/src/tools/interop/idt/Dockerfile index 6eeea77ac808fb..29036c36bbabcf 100644 --- a/src/tools/interop/idt/Dockerfile +++ b/src/tools/interop/idt/Dockerfile @@ -21,6 +21,12 @@ RUN apt-get update && \ adb \ aircrack-ng \ apt-utils \ + bison \ + byacc \ + dnsutils \ + flex \ + gcc-aarch64-linux-gnu \ + gcc-arm-linux-gnueabi \ git \ glib-2.0 \ kmod \ diff --git a/src/tools/interop/idt/README.md b/src/tools/interop/idt/README.md index dc60067fba6fe3..acc0c252fdbe39 100644 --- a/src/tools/interop/idt/README.md +++ b/src/tools/interop/idt/README.md @@ -29,7 +29,32 @@ issue uncovered via the manual test. Each ecosystem may implement an analysis that analyzes capture data, displays info to the user, probes the local environment and generates additional artifacts. -## Getting started +## Single host installation (no Raspberry Pi) + +All features of `idt` are available on macOS and Linux (tested with Debian based +systems). +If you would prefer to execute capture and discovery from a Raspberry Pi, read +the next section instead. + +The machine running `idt` should be connected to the same Wi-Fi network used for +testing. +Follow the steps below to execute capture and discovery without a Raspberry Pi: + +- From the parent directory of `idt`, run `source idt/scripts/alias.sh`. +- Optionally, run `source idt/scripts/setup_shell.sh` to install aliases + permanently. +- After `idt` aliases are available in your environment, calling any `idt` + command will automatically create a new virtual environment and install + python dependencies. + - If you're missing non-Python dependencies, you'll be prompted to install + them until they're available. +- Bluetooth discovery on macOS will require granting the program where `idt` + is run, e.g. terminal emulator or IDE permission to access bluetooth in + macOS settings. + - Failure to do so may result in any of the following: + - A single `abort` message and no further output in the terminal. + - Failure with a relevant stack trace in the terminal. + - A prompt to allow the application access to bluetooth. ## Raspberry Pi installation @@ -137,7 +162,7 @@ idt_clean ``` NOTE the idt artifacts directory is contained in idt, so running this will -delete any artifacts ([TODO] change). +delete any artifacts. Then from the admin computer: @@ -145,54 +170,13 @@ Then from the admin computer: idt_push ``` -## Single host installation (no Raspberry Pi) - -Follow the steps below to execute capture and discovery without a Raspberry Pi. - -### Linux installation - -#### Requirements - -- This package should work on most Debian (/based) systems. -- `idt` is currently tested on `Python 3.11`. -- `adb` and `tcpdump` are required. -- The machine running `idt` should be connected to the same Wi-Fi network used - for testing. - -#### Setup - -- From the parent directory of `idt`, run `source idt/scripts/alias.sh`. -- Optionally, run `source idt/scripts/setup_shell.sh` to install aliases - permanently. - -> You may use `idt` in a Python virtual environment OR using a container from -> the idt image. - -#### Python virtual environment - -- After `idt` aliases are available in your environment, calling any `idt` - command will automatically create a new virtual environment and install - dependencies. - -#### Docker - -- Run `idt_build` and `idt_activate` to enter the `idt` container. - -[TODO] Podman - -### macOS installation - -Most features other than BLE should work on macOS. - -Follow the Linux installation steps above, but do not use Docker. - -[TODO] macOS BLE support - ## User guide > **_IMPORTANT_** > `idt_` commands are shell aliases helpful for administrative commands. -> `idt` invokes the `idt` python package. +> `idt` invokes the `idt` python package. +> Output from `idt` will generally be colorized while output from sub processes +> is generally not. RPi users, as needed: @@ -208,45 +192,38 @@ RPi users, as needed: ### Capture +> **_IMPORTANT_** +> Ensure you've made it to the log line "Starting real time analysis, press +> enter to stop!" before launching the app under test. + ``` idt capture -h -usage: idt capture [-h] [--platform {Android}] - [--ecosystem {PlayServices,PlayServicesUser,ALL}] - [--pcap {t,f}] - [--interface {wlp0s20f3,docker0,lo}] - [--additional {t,f}] +usage: idt capture [-h] [--platform {Android}] [--ecosystem {PlayServicesUser,PlayServices,ALL}] [--pcap {t,f}] [--interface {wlp0s20f3,lo,docker0,any}] options: -h, --help show this help message and exit --platform {Android}, -p {Android} - Run capture for a particular platform - (default Android) - --ecosystem {PlayServices,PlayServicesUser,ALL}, -e {PlayServices,PlayServicesUser,ALL} - Run capture for a particular ecosystem or ALL - ecosystems (default ALL) + Run capture for a particular platform (default Android) + --ecosystem {PlayServicesUser,PlayServices,ALL}, -e {PlayServicesUser,PlayServices,ALL} + Run capture for a particular ecosystem or ALL ecosystems (default ALL) --pcap {t,f}, -c {t,f} Run packet capture (default t) - --interface {wlp0s20f3,docker0,lo}, -i {wlp0s20f3,docker0,lo} - Run packet capture against a specified - interface (default wlp0s20f3) - --additional {t,f}, -a {t,f} - Run ble and mdns scanners in the background - while capturing (default t) + --interface {wlp0s20f3,lo,docker0,any}, -i {wlp0s20f3,lo,docker0,any} + Specify packet capture interface (default any) ``` +For packet capture interface (`-i`/`--interface`: + +- On macOS, the only available interface is `any`. +- On Linux, `idt` checks available interfaces from `/sys/class/net/` as well + as allowing `any`. + #### Artifacts Each ecosystem and platform involved in the capture will have their own subdirectory in the root artifact dir. -To download your artifacts, run these commands from your admin computer: - -`idt_fetch_artifacts` - -On windows admin computers, you may use `FileZilla` to pull the archive listed -at the end of output. - ### Discovery ``` @@ -260,7 +237,7 @@ options: Specify the type of discovery to execute ``` -#### ble +#### BLE ``` idt discover -t b @@ -274,13 +251,90 @@ idt discover -t d #### Artifacts -There is a per device log for ble scanning in `ble` subdirectory of the root -artifact dir. +There is a per device log in `ble` and `dnssd` subdirectory of the root artifact +dir. + +### Probe + +``` +usage: idt probe [-h] + +options: + -h, --help show this help message and exit +``` -[TODO] dnssd per device log +Collect contextually relevant networking info from the local environment and +provide artifacts. + +## Troubleshooting + +- Wireless `adb` may fail to connect indefinitely depending on network + configuration. Use a wired connection if wireless fails repeatedly. +- Change log level from `INFO` to `DEBUG` in root `config.py` for additional + logging. +- Compiling `tcpdump` for android may require additional dependencies. + - If the build script fails for you, try + `idt_go && source idt/scripts/compilers.sh`. +- You may disable colors and splash by setting `enable_color` in `config.py` + to `False`. +- `idt_clean_child` will kill any stray `tcpdump` and `adb` commands. + - `idt_check_child` will look for leftover processes. + - Not expected to be needed outside of development scenarios. + +## Project overview + +- The entry point is in `idt.py` which contains simple CLI parsing with + `argparse`. + +### `capture` + +- `base` contains the base classes for ecosystems and platforms. +- `controller` contains the ecosystem and platform producer and controller +- `loader` is a generic class loader that dynamically imports classes matching + a given super class from a given directory. +- `/platform` and `/ecosystem` contain one package for each platform and + ecosystem, which should each contain one implementation of the respective + base class. + +### `discovery` + +- `matter_ble` provides a simple ble scanner that shows matter devices being + discovered and lost, as well as their VID/PID, RSSI, etc. +- `matter_dnssd` provides a simple DNS-SD browser that searches for matter + devices and thread border routers. + +### `probe` + +- `probe` contains the base class for (`idt`'s) host platform specific + implementation. + - Reuses the dnssd discovery implementation to build probe targets. + - Calls platform + addr type specific probe methods for each target. +- `linux` and `mac` contain `probe` implementations for each host platform. + +### `utils` + +- `log` contains logging utilities used by everything in the project. +- `artifact` contains helper functions for managing artifacts. +- `shell` contains a simple helper class for background and foreground Bash + commands. +- `host_platform` contains helper functions for the interacting with the host + running `idt`. + +### Conventions + +- `config.py` should be used to hold development configs within the directory + where they are needed. + - It may also hold configs for flaky/cumbersome features that might need + to be disabled in an emergency. + - `config.py` **should not** be used for everyday operation. +- When needed, execute builds in a folder called `BUILD` within the source + tree. + - `idt_clean_all` deletes all `BUILD` dirs and `BUILD` is in `.gitignore`. ## Extending functionality +### Capture + Ecosystem and Platform implementations are dynamically loaded. For each package in `capture/ecosystem`, the ecosystem loader expects a module @@ -299,14 +353,13 @@ $ idt capture -h usage: idt capture [-h] [--platform {Android}] [--ecosystem {DemoExtEcosystem... ``` +> **IMPORTANT:** Note the following runtime expectations of ecosystems: +> `analyze_capture()` must not block the async event loop excessively and must +> not interact with standard in + The platform loader functions the same as `capture/ecosystem`. For each package in `capture/platform`, the platform loader expects a module name matching the package name. This module must contain a single class which is a subclass of `capture.base.PlatformLogStreamer`. - -Note the following runtime expectations of platforms: - -- Start should be able to be called repeatedly without restarting streaming. -- Stop should not cause an error even if the stream is not running. diff --git a/src/tools/interop/idt/__main__.py b/src/tools/interop/idt/__main__.py index c354801687c553..b927d050b9a0a2 100644 --- a/src/tools/interop/idt/__main__.py +++ b/src/tools/interop/idt/__main__.py @@ -16,6 +16,8 @@ # from idt import InteropDebuggingTool +from utils.host_platform import verify_py_version if __name__ == "__main__": + verify_py_version() InteropDebuggingTool() diff --git a/src/tools/interop/idt/capture/__init__.py b/src/tools/interop/idt/capture/__init__.py index d4e9baedc1119d..18069e71ad7838 100644 --- a/src/tools/interop/idt/capture/__init__.py +++ b/src/tools/interop/idt/capture/__init__.py @@ -17,16 +17,14 @@ from capture import ecosystem, platform -from .factory import EcosystemCapture, EcosystemController, EcosystemFactory, PlatformFactory, PlatformLogStreamer +from .controller import EcosystemCapture, PlatformLogStreamer from .pcap import PacketCaptureRunner __all__ = [ 'ecosystem', 'platform', + 'controller', 'EcosystemCapture', - 'EcosystemController', - 'EcosystemFactory', 'PacketCaptureRunner', - 'PlatformFactory', 'PlatformLogStreamer', ] diff --git a/src/tools/interop/idt/capture/base.py b/src/tools/interop/idt/capture/base.py index 6c1ab6fc8be8be..b90571020a071f 100644 --- a/src/tools/interop/idt/capture/base.py +++ b/src/tools/interop/idt/capture/base.py @@ -30,19 +30,33 @@ def __init__(self, artifact_dir: str) -> None: """ raise NotImplementedError + @abstractmethod + async def connect(self) -> None: + """ + Establish connections to log targets for this platform + """ + raise NotImplementedError + @abstractmethod async def start_streaming(self) -> None: """ Begin streaming logs - Start should be able to be called repeatedly without restarting streaming + """ + raise NotImplementedError + + @abstractmethod + async def run_observers(self) -> None: + """ + Observe log procs and restart as needed + Must be async aware and not interact with stdin """ raise NotImplementedError @abstractmethod async def stop_streaming(self) -> None: """ - Stop streaming logs - Stop should not cause an error even if the stream is not running + Stop the capture and pull any artifacts from remote devices + Write artifacts to artifact_dir passed on instantiation """ raise NotImplementedError @@ -71,13 +85,16 @@ def __init__( async def start_capture(self) -> None: """ Start the capture + Platform is already started """ raise NotImplementedError @abstractmethod async def stop_capture(self) -> None: """ - Stop the capture + Stop the capture and pull any artifacts from remote devices + Write artifacts to artifact_dir passed on instantiation + Platform is already stopped """ raise NotImplementedError @@ -85,6 +102,13 @@ async def stop_capture(self) -> None: async def analyze_capture(self) -> None: """ Parse the capture and create + display helpful analysis artifacts that are unique to the ecosystem - Write analysis artifacts to artifact_dir + Must be async aware and not interact with stdin + """ + raise NotImplementedError + + @abstractmethod + async def probe_capture(self) -> None: + """ + Probe the local environment, e.g. ping relevant remote services and write respective artifacts """ raise NotImplementedError diff --git a/src/tools/interop/idt/capture/config.py b/src/tools/interop/idt/capture/config.py new file mode 100644 index 00000000000000..12ce985eb4b3e4 --- /dev/null +++ b/src/tools/interop/idt/capture/config.py @@ -0,0 +1,50 @@ +# +# 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. +# + +""" +The timeout time used by Orchestrator in capture/controller + +Used when calling: +- Platform.connect() - if timeout, then halt +- Ecosystem.start(), .stop(), .probe() - if timeout, then continue execution and log error + +This is an async timeout, so dependent on event loop being released to work. +To illustrate, consider this example where no timeout is thrown despite the awaited task running for twice the timeout: +---- +sleep_time = 2 + +async def not_actually_async(): + time.sleep(sleep_time * 2) # Blocking the EL! + +async def try_timeout(): + async with asyncio.timeout(sleep_time): + await not_actually_async() + print("Timeout was NOT thrown!") + +asyncio.run(try_timeout()) +---- +Result: Timeout was NOT thrown! + +Update the example +---- +async def not_actually_async(): # Now it is_actually_async because we + await asyncio.sleep(sleep_time * 2) # change to something that isn't blocking the EL +---- +Result: The timeout error will be raised. + +""" +orchestrator_async_step_timeout_seconds = 240 diff --git a/src/tools/interop/idt/capture/controller.py b/src/tools/interop/idt/capture/controller.py new file mode 100644 index 00000000000000..624a6f292451d3 --- /dev/null +++ b/src/tools/interop/idt/capture/controller.py @@ -0,0 +1,183 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import copy +import os +import sys +import traceback +import typing +from dataclasses import dataclass + +import capture +from capture.base import EcosystemCapture, PlatformLogStreamer, UnsupportedCapturePlatformException +from utils.artifact import create_standard_log_name, log, safe_mkdir +from utils.log import add_border, border_print + +from . import config + + +@dataclass(repr=True) +class ErrorRecord: + ecosystem: str + help_message: str + stack_trace: str + + +_PLATFORM_MAP: typing.Dict[str, PlatformLogStreamer] = {} +_ECOSYSTEM_MAP: typing.Dict[str, PlatformLogStreamer] = {} +_ERROR_REPORT: typing.Dict[str, ErrorRecord] = {} + +logger = log.get_logger(__file__) + + +def track_error(ecosystem: str, help_message: str) -> None: + if ecosystem not in _ERROR_REPORT: + _ERROR_REPORT[ecosystem] = [] + record = ErrorRecord(ecosystem, help_message, traceback.format_exc()) + logger.error(record) + _ERROR_REPORT[ecosystem].append(record) + + +def list_available_platforms() -> typing.List[str]: + return copy.deepcopy(capture.platform.__all__) + + +async def get_platform_impl( + platform: str, + artifact_dir: str) -> PlatformLogStreamer: + if platform in _PLATFORM_MAP: + return _PLATFORM_MAP[platform] + border_print(f"Initializing platform {platform}") + platform_class = getattr(capture.platform, platform) + platform_artifact_dir = os.path.join(artifact_dir, platform) + safe_mkdir(platform_artifact_dir) + platform_inst = platform_class(platform_artifact_dir) + _PLATFORM_MAP[platform] = platform_inst + async with asyncio.timeout(config.orchestrator_async_step_timeout_seconds): + await platform_inst.connect() + return platform_inst + + +def list_available_ecosystems() -> typing.List[str]: + return copy.deepcopy(capture.ecosystem.__all__) + + +async def get_ecosystem_impl( + ecosystem: str, + platform: PlatformLogStreamer, + artifact_dir: str) -> EcosystemCapture: + if ecosystem in _ECOSYSTEM_MAP: + return _ECOSYSTEM_MAP[ecosystem] + ecosystem_class = getattr(capture.ecosystem, ecosystem) + ecosystem_artifact_dir = os.path.join(artifact_dir, ecosystem) + safe_mkdir(ecosystem_artifact_dir) + ecosystem_instance = ecosystem_class(platform, ecosystem_artifact_dir) + _ECOSYSTEM_MAP[ecosystem] = ecosystem_instance + return ecosystem_instance + + +async def init_ecosystems(platform, ecosystem, artifact_dir): + platform = await get_platform_impl(platform, artifact_dir) + ecosystems_to_load = list_available_ecosystems() \ + if ecosystem == 'ALL' \ + else [ecosystem] + for ecosystem in ecosystems_to_load: + try: + await get_ecosystem_impl( + ecosystem, platform, artifact_dir) + except UnsupportedCapturePlatformException: + help_message = f"Unsupported platform {ecosystem} {platform}" + logger.error(help_message) + track_error(ecosystem, help_message) + except Exception: + help_message = f"Unknown error instantiating ecosystem {ecosystem} {platform}" + logger.error(help_message) + track_error(ecosystem, help_message) + + +async def handle_capture(attr): + attr = f"{attr}_capture" + for ecosystem in _ECOSYSTEM_MAP: + try: + border_print(f"{attr} for {ecosystem}") + async with asyncio.timeout(config.orchestrator_async_step_timeout_seconds): + await getattr(_ECOSYSTEM_MAP[ecosystem], attr)() + except TimeoutError: + help_message = f"Timeout after {config.orchestrator_async_step_timeout_seconds} seconds {attr} {ecosystem}" + logger.error(help_message) + track_error(ecosystem, help_message) + except Exception: + help_message = f"Unexpected error {attr} {ecosystem}" + logger.error(help_message) + track_error(ecosystem, help_message) + + +async def start(): + for platform_name, platform, in _PLATFORM_MAP.items(): + # TODO: Write error log if halt here + border_print(f"Starting streaming for platform {platform_name}") + await platform.start_streaming() + await handle_capture("start") + + +async def stop(): + for platform_name, platform, in _PLATFORM_MAP.items(): + # TODO: Write error log if halt here + border_print(f"Stopping streaming for platform {platform_name}") + await platform.stop_streaming() + await handle_capture("stop") + + +async def run_analyzers(): + border_print("Starting real time analysis, press enter to stop!", important=True) + analysis_tasks = [] + monitor_tasks = [] + for platform_name, platform in _PLATFORM_MAP.items(): + logger.info(f"Creating monitor task for {platform_name}") + monitor_tasks.append(asyncio.create_task(platform.run_observers())) + for ecosystem_name, ecosystem in _ECOSYSTEM_MAP.items(): + logger.info(f"Creating analysis task for {ecosystem_name}") + analysis_tasks.append(asyncio.create_task(ecosystem.analyze_capture())) + logger.info("Done creating analysis tasks") + await asyncio.get_event_loop().run_in_executor( + None, sys.stdin.readline) + border_print("Cancelling monitor tasks") + for task in monitor_tasks: + task.cancel() + logger.info("Done cancelling monitor tasks") + border_print("Cancelling analysis tasks") + for task in analysis_tasks: + task.cancel() + logger.info("Done cancelling analysis tasks") + + +async def probe(): + await handle_capture("probe") + + +def write_error_report(artifact_dir: str): + if _ERROR_REPORT: + logger.critical("DETECTED ERRORS THIS RUN!") + error_report_file_name = create_standard_log_name("error_report", "txt", parent=artifact_dir) + with open(error_report_file_name, "a+") as error_report_file: + for ecosystem in _ERROR_REPORT: + log.print_and_write(add_border(f"Errors for {ecosystem}"), error_report_file) + for record in _ERROR_REPORT[ecosystem]: + log.print_and_write(str(record), error_report_file) + else: + logger.info("No errors seen this run!") diff --git a/src/tools/interop/idt/capture/ecosystem/play_services/config.py b/src/tools/interop/idt/capture/ecosystem/play_services/config.py new file mode 100644 index 00000000000000..2daacb38dcf909 --- /dev/null +++ b/src/tools/interop/idt/capture/ecosystem/play_services/config.py @@ -0,0 +1,19 @@ +# +# 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. +# + +enable_foyer_probers = True +foyer_prober_traceroute_limit = 32 diff --git a/src/tools/interop/idt/capture/ecosystem/play_services/play_services.py b/src/tools/interop/idt/capture/ecosystem/play_services/play_services.py index aa9276844471ea..e94a10f9260b94 100644 --- a/src/tools/interop/idt/capture/ecosystem/play_services/play_services.py +++ b/src/tools/interop/idt/capture/ecosystem/play_services/play_services.py @@ -15,16 +15,22 @@ # limitations under the License. # +import asyncio import json import os -from typing import Dict +from typing import IO, Dict from capture.base import EcosystemCapture, UnsupportedCapturePlatformException -from capture.file_utils import create_standard_log_name from capture.platform.android import Android +from capture.platform.android.streams.logcat import LogcatStreamer +from utils.artifact import create_standard_log_name, log -from .analysis import PlayServicesAnalysis +from . import config from .command_map import dumpsys, getprop +from .play_services_analysis import PlayServicesAnalysis +from .prober import PlayServicesProber + +logger = log.get_logger(__file__) class PlayServices(EcosystemCapture): @@ -33,7 +39,6 @@ class PlayServices(EcosystemCapture): """ def __init__(self, platform: Android, artifact_dir: str) -> None: - self.artifact_dir = artifact_dir if not isinstance(platform, Android): @@ -52,10 +57,12 @@ def __init__(self, platform: Android, artifact_dir: str) -> None: '305', # Thread '168', # mDNS ] + self.logcat_stream: LogcatStreamer = self.platform.streams["LogcatStreamer"] + self.logcat_file: IO = None def _write_standard_info_file(self) -> None: for k, v in self.standard_info_data.items(): - print(f"{k}: {v}") + logger.info(f"{k}: {v}") standard_info_data_json = json.dumps(self.standard_info_data, indent=2) with open(self.standard_info_file_path, mode='w+') as standard_info_file: standard_info_file.write(standard_info_data_json) @@ -87,10 +94,24 @@ async def start_capture(self) -> None: verbose_command = f"shell setprop log.tag.gms_svc_id:{service_id} VERBOSE" self.platform.run_adb_command(verbose_command) self._get_standard_info() - await self.platform.start_streaming() + + async def analyze_capture(self): + try: + self.logcat_file = open(self.logcat_stream.logcat_artifact, "r") + while True: + self.analysis.do_analysis(self.logcat_file.readlines()) + # Releasing async event loop for other analysis / monitor topics + await asyncio.sleep(0.5) + except asyncio.CancelledError: + logger.info("Closing logcat stream") + if self.logcat_file: + self.logcat_file.close() async def stop_capture(self) -> None: - await self.platform.stop_streaming() + self.analysis.show_analysis() - async def analyze_capture(self) -> None: - self.analysis.do_analysis() + async def probe_capture(self) -> None: + if config.enable_foyer_probers: + await PlayServicesProber(self.platform, self.artifact_dir).probe_services() + else: + logger.critical("Foyer probers disabled in config!") diff --git a/src/tools/interop/idt/capture/ecosystem/play_services/analysis.py b/src/tools/interop/idt/capture/ecosystem/play_services/play_services_analysis.py similarity index 85% rename from src/tools/interop/idt/capture/ecosystem/play_services/analysis.py rename to src/tools/interop/idt/capture/ecosystem/play_services/play_services_analysis.py index 46fcfc1c4d6734..e6ebb8f13075d8 100644 --- a/src/tools/interop/idt/capture/ecosystem/play_services/analysis.py +++ b/src/tools/interop/idt/capture/ecosystem/play_services/play_services_analysis.py @@ -17,13 +17,17 @@ import os -from capture.file_utils import add_border, create_standard_log_name, print_and_write from capture.platform.android import Android +from utils.artifact import create_standard_log_name, log +from utils.log import add_border, print_and_write + +logger = log.get_logger(__file__) class PlayServicesAnalysis: def __init__(self, platform: Android, artifact_dir: str) -> None: + self.logger = logger self.artifact_dir = artifact_dir self.analysis_file_name = os.path.join( self.artifact_dir, create_standard_log_name( @@ -41,6 +45,7 @@ def __init__(self, platform: Android, artifact_dir: str) -> None: def _log_proc_matter_commissioner(self, line: str) -> None: """Core commissioning flow""" if 'MatterCommissioner' in line: + self.logger.info(line) self.matter_commissioner_logs += line def _log_proc_commissioning_failed(self, line: str) -> None: @@ -51,24 +56,28 @@ def _log_proc_commissioning_failed(self, line: str) -> None: self.failure_stack_trace += line self.fail_trace_line_counter += 1 if 'SetupDeviceView' and 'Commissioning failed' in line: + self.logger.info(line) self.fail_trace_line_counter = 0 self.failure_stack_trace += line def _log_proc_pake(self, line: str) -> None: """Three logs for pake 1-3 expected""" if "Pake" in line and "chip_logging" in line: + self.logger.info(line) self.pake_logs += line def _log_proc_mdns(self, line: str) -> None: if "_matter" in line and "ServiceResolverAdapter" in line: + self.logger.info(line) self.resolver_logs += line def _log_proc_sigma(self, line: str) -> None: """Three logs expected for sigma 1-3""" if "Sigma" in line and "chip_logging" in line: + self.logger.info(line) self.sigma_logs += line - def _show_analysis(self) -> None: + def show_analysis(self) -> None: analysis_file = open(self.analysis_file_name, mode="w+") print_and_write(add_border('Matter commissioner logs'), analysis_file) print_and_write(self.matter_commissioner_logs, analysis_file) @@ -85,11 +94,9 @@ def _show_analysis(self) -> None: analysis_file.close() def process_line(self, line: str) -> None: - for line_func in filter(lambda s: s.startswith('_log'), dir(self)): + for line_func in [s for s in dir(self) if s.startswith('_log')]: getattr(self, line_func)(line) - def do_analysis(self) -> None: - with open(self.platform.logcat_output_path, mode='r') as logcat_file: - for line in logcat_file: - self.process_line(line) - self._show_analysis() + def do_analysis(self, batch: [str]) -> None: + for line in batch: + self.process_line(line) diff --git a/src/tools/interop/idt/capture/ecosystem/play_services/prober.py b/src/tools/interop/idt/capture/ecosystem/play_services/prober.py new file mode 100644 index 00000000000000..8dcda80ddf3133 --- /dev/null +++ b/src/tools/interop/idt/capture/ecosystem/play_services/prober.py @@ -0,0 +1,71 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import os + +from utils.shell import Bash, log + +from . import config + +logger = log.get_logger(__file__) + + +class PlayServicesProber: + + def __init__(self, platform, artifact_dir): + # TODO: Handle all resolved addresses + self.platform = platform + self.artifact_dir = artifact_dir + self.logger = logger + self.probe_artifact = os.path.join(self.artifact_dir, "net_probes.txt") + self.command_suffix = f" 2>&1 | tee -a {self.probe_artifact}" + self.target = "googlehomefoyer-pa.googleapis.com" + self.tracert_limit = config.foyer_prober_traceroute_limit + + def run_command(self, command): + Bash(f"{command} {self.command_suffix}", sync=True).start_command() + + async def _probe_tracert_icmp_foyer(self) -> None: + self.logger.info(f"icmp traceroute to {self.target}") + self.run_command(f"traceroute -m {self.tracert_limit} {self.target}") + + async def _probe_tracert_udp_foyer(self) -> None: + # TODO: Per-host-platform impl + self.logger.info(f"udp traceroute to {self.target}") + self.run_command(f"traceroute -m {self.tracert_limit} -U -p 443 {self.target}") + + async def _probe_tracert_tcp_foyer(self) -> None: + # TODO: Per-host-platform impl + self.logger.info(f"tcp traceroute to {self.target}") + self.run_command(f"traceroute -m {self.tracert_limit} -T -p 443 {self.target}") + + async def _probe_ping_foyer(self) -> None: + self.logger.info(f"ping {self.target}") + self.run_command(f"ping -c 4 {self.target}") + + async def _probe_dns_foyer(self) -> None: + self.logger.info(f"dig {self.target}") + self.run_command(f"dig {self.target}") + + async def _probe_from_phone_ping_foyer(self) -> None: + self.logger.info(f"ping {self.target} from phone") + self.platform.run_adb_command(f"shell ping -c 4 {self.target} {self.command_suffix}") + + async def probe_services(self) -> None: + self.logger.info(f"Probing {self.target}") + for probe_func in [s for s in dir(self) if s.startswith('_probe')]: + await getattr(self, probe_func)() diff --git a/src/tools/interop/idt/capture/ecosystem/play_services_user/play_services_user.py b/src/tools/interop/idt/capture/ecosystem/play_services_user/play_services_user.py index 5044842e80eb28..2fdac62b8bbdb7 100644 --- a/src/tools/interop/idt/capture/ecosystem/play_services_user/play_services_user.py +++ b/src/tools/interop/idt/capture/ecosystem/play_services_user/play_services_user.py @@ -15,11 +15,16 @@ # limitations under the License. # +import asyncio import os from capture.base import EcosystemCapture, UnsupportedCapturePlatformException -from capture.file_utils import create_standard_log_name, print_and_write from capture.platform.android.android import Android +from capture.platform.android.streams.logcat import LogcatStreamer +from utils.artifact import create_standard_log_name +from utils.log import get_logger, print_and_write + +logger = get_logger(__file__) class PlayServicesUser(EcosystemCapture): @@ -28,7 +33,7 @@ class PlayServicesUser(EcosystemCapture): """ def __init__(self, platform: Android, artifact_dir: str) -> None: - + self.logger = logger self.artifact_dir = artifact_dir self.analysis_file = os.path.join( self.artifact_dir, create_standard_log_name( @@ -39,28 +44,47 @@ def __init__(self, platform: Android, artifact_dir: str) -> None: 'only platform=android is supported for ' 'ecosystem=PlayServicesUser') self.platform = platform + self.logcat_fd = None + self.output = "" + self.logcat_stream: LogcatStreamer = self.platform.streams["LogcatStreamer"] async def start_capture(self) -> None: - await self.platform.start_streaming() + pass async def stop_capture(self) -> None: - await self.platform.stop_streaming() + self.show_analysis() + + def proc_line(self, line) -> None: + if "CommissioningServiceBin: Binding to service" in line: + s = f"3P commissioner initiated Play Services commissioning\n{line}" + logger.info(s) + self.output += f"{s}\n" + elif "CommissioningServiceBin: Sending commissioning request to bound service" in line: + s = f"Play Services commissioning complete; passing back to 3P\n{line}" + logger.info(s) + self.output += f"{s}\n" + elif "CommissioningServiceBin: Received commissioning complete from bound service" in line: + s = f"3P commissioning complete!\n{line}" + logger.info(s) + self.output += f"{s}\n" async def analyze_capture(self) -> None: """"Show the start and end times of commissioning boundaries""" - analysis_file = open(self.analysis_file, mode='w+') - with open(self.platform.logcat_output_path, mode='r') as logcat_file: - for line in logcat_file: - if "CommissioningServiceBin: Binding to service" in line: - print_and_write( - f"3P commissioner initiated Play Services commissioning\n{line}", - analysis_file) - elif "CommissioningServiceBin: Sending commissioning request to bound service" in line: - print_and_write( - f"Play Services commissioning complete; passing back to 3P\n{line}", - analysis_file) - elif "CommissioningServiceBin: Received commissioning complete from bound service" in line: - print_and_write( - f"3P commissioning complete!\n{line}", - analysis_file) - analysis_file.close() + try: + self.logcat_fd = open(self.logcat_stream.logcat_artifact, "r") + while True: + for line in self.logcat_fd.readlines(): + self.proc_line(line) + # Releasing async event loop for other analysis / monitor tasks + await asyncio.sleep(0.5) + except asyncio.CancelledError: + self.logger.info("Closing logcat stream") + if self.logcat_fd is not None: + self.logcat_fd.close() + + def show_analysis(self) -> None: + with open(self.analysis_file, "w") as analysis_file: + print_and_write(self.output, analysis_file) + + async def probe_capture(self) -> None: + pass diff --git a/src/tools/interop/idt/capture/factory.py b/src/tools/interop/idt/capture/factory.py deleted file mode 100644 index 3c86045f146a0e..00000000000000 --- a/src/tools/interop/idt/capture/factory.py +++ /dev/null @@ -1,124 +0,0 @@ -# -# Copyright (c) 2023 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import asyncio -import copy -import os -import traceback -import typing - -import capture -from capture.base import EcosystemCapture, PlatformLogStreamer, UnsupportedCapturePlatformException -from capture.file_utils import border_print, safe_mkdir - -_CONFIG_TIMEOUT = 45.0 -_PLATFORM_MAP: typing.Dict[str, PlatformLogStreamer] = {} -_ECOSYSTEM_MAP: typing.Dict[str, PlatformLogStreamer] = {} - - -def _get_timeout(): - return asyncio.get_running_loop().time() + _CONFIG_TIMEOUT - - -class PlatformFactory: - - @staticmethod - def list_available_platforms() -> typing.List[str]: - return copy.deepcopy(capture.platform.__all__) - - @staticmethod - def get_platform_impl( - platform: str, - artifact_dir: str) -> PlatformLogStreamer: - if platform in _PLATFORM_MAP: - return _PLATFORM_MAP[platform] - platform_class = getattr(capture.platform, platform) - platform_artifact_dir = os.path.join(artifact_dir, platform) - safe_mkdir(platform_artifact_dir) - platform_inst = platform_class(platform_artifact_dir) - _PLATFORM_MAP[platform] = platform_inst - return platform_inst - - -class EcosystemFactory: - - @staticmethod - def list_available_ecosystems() -> typing.List[str]: - return copy.deepcopy(capture.ecosystem.__all__) - - @staticmethod - async def get_ecosystem_impl( - ecosystem: str, - platform: str, - artifact_dir: str) -> EcosystemCapture: - if ecosystem in _ECOSYSTEM_MAP: - return _ECOSYSTEM_MAP[ecosystem] - ecosystem_class = getattr(capture.ecosystem, ecosystem) - ecosystem_artifact_dir = os.path.join(artifact_dir, ecosystem) - safe_mkdir(ecosystem_artifact_dir) - platform_instance = PlatformFactory.get_platform_impl( - platform, artifact_dir) - ecosystem_instance = ecosystem_class(platform_instance, ecosystem_artifact_dir) - _ECOSYSTEM_MAP[ecosystem] = ecosystem_instance - return ecosystem_instance - - @staticmethod - async def init_ecosystems(platform, ecosystem, artifact_dir): - ecosystems_to_load = EcosystemFactory.list_available_ecosystems() \ - if ecosystem == 'ALL' \ - else [ecosystem] - for ecosystem in ecosystems_to_load: - try: - async with asyncio.timeout_at(_get_timeout()): - await EcosystemFactory.get_ecosystem_impl( - ecosystem, platform, artifact_dir) - except UnsupportedCapturePlatformException: - print(f"ERROR unsupported platform {ecosystem} {platform}") - except TimeoutError: - print(f"ERROR timeout starting ecosystem {ecosystem} {platform}") - except Exception: - print("ERROR unknown error instantiating ecosystem") - print(traceback.format_exc()) - - -class EcosystemController: - - @staticmethod - async def handle_capture(attr): - attr = f"{attr}_capture" - for ecosystem in _ECOSYSTEM_MAP: - try: - border_print(f"{attr} capture for {ecosystem}") - async with asyncio.timeout_at(_get_timeout()): - await getattr(_ECOSYSTEM_MAP[ecosystem], attr)() - except TimeoutError: - print(f"ERROR timeout {attr} {ecosystem}") - except Exception: - print(f"ERROR unexpected error {attr} {ecosystem}") - print(traceback.format_exc()) - - @staticmethod - async def start(): - await EcosystemController.handle_capture("start") - - @staticmethod - async def stop(): - await EcosystemController.handle_capture("stop") - - @staticmethod - async def analyze(): - await EcosystemController.handle_capture("analyze") diff --git a/src/tools/interop/idt/capture/loader.py b/src/tools/interop/idt/capture/loader.py index 27fd7c19dd6560..8e02e9d492c2b5 100644 --- a/src/tools/interop/idt/capture/loader.py +++ b/src/tools/interop/idt/capture/loader.py @@ -18,12 +18,18 @@ import importlib import inspect import os +import traceback from typing import Any +from utils import log + +logger = log.get_logger(__file__) + class CaptureImplsLoader: def __init__(self, root_dir: str, root_package: str, search_type: type): + self.logger = logger self.root_dir = root_dir self.root_package = root_package self.search_type = search_type @@ -38,25 +44,35 @@ def is_package(potential_package: str) -> bool: return os.path.exists(init_path) def verify_coroutines(self, subclass) -> bool: + # ABC does not verify coroutines on subclass instantiation, it merely checks the presence of methods for item in dir(self.search_type): item_attr = getattr(self.search_type, item) if inspect.iscoroutinefunction(item_attr): if not hasattr(subclass, item): + self.logger.warning(f"Missing coroutine in {subclass}") return False if not inspect.iscoroutinefunction(getattr(subclass, item)): + self.logger.warning(f"Missing coroutine in {subclass}") + return False + for item in dir(subclass): + item_attr = getattr(subclass, item) + if inspect.iscoroutinefunction(item_attr) and hasattr(self.search_type, item): + if not inspect.iscoroutinefunction(getattr(self.search_type, item)): + self.logger.warning(f"Unexpected coroutine in {subclass}") return False return True def is_type_match(self, potential_class_match: Any) -> bool: if inspect.isclass(potential_class_match): + self.logger.debug(f"Checking {self.search_type} match against {potential_class_match}") if issubclass(potential_class_match, self.search_type): + self.logger.debug(f"Found type match search: {self.search_type} match: {potential_class_match}") if self.verify_coroutines(potential_class_match): return True - else: - print(f"WARNING missing coroutine {potential_class_match}") return False def load_module(self, to_load): + self.logger.debug(f"Loading module {to_load}") saw_more_than_one_impl = False saw_one_impl = False found_class = None @@ -73,14 +89,16 @@ def load_module(self, to_load): self.impl_names.append(found_class) self.impls[found_class] = found_impl elif saw_more_than_one_impl: - print(f"WARNING more than one impl in {module_item}") + self.logger.warning(f"more than one impl in {module_item}") def fetch_impls(self): + self.logger.debug(f"Searching for implementations in {self.root_dir}") for item in os.listdir(self.root_dir): dir_content = os.path.join(self.root_dir, item) if self.is_package(dir_content): + self.logger.debug(f"Found package in {dir_content}") try: module = importlib.import_module("." + item, self.root_package) self.load_module(module) except ModuleNotFoundError: - print(f"WARNING no module matching package name for {item}") + self.logger.warning(f"No module matching package name for {item}\n{traceback.format_exc()}") diff --git a/src/tools/interop/idt/capture/pcap/pcap.py b/src/tools/interop/idt/capture/pcap/pcap.py index 8208d59f87d780..2cb2285908b066 100644 --- a/src/tools/interop/idt/capture/pcap/pcap.py +++ b/src/tools/interop/idt/capture/pcap/pcap.py @@ -18,21 +18,23 @@ import os import time -from capture.file_utils import create_standard_log_name -from capture.shell_utils import Bash +from utils.artifact import create_standard_log_name, log +from utils.shell import Bash + +logger = log.get_logger(__file__) class PacketCaptureRunner: def __init__(self, artifact_dir: str, interface: str) -> None: - + self.logger = logger self.artifact_dir = artifact_dir self.output_path = str( os.path.join( self.artifact_dir, create_standard_log_name( "pcap", - "cap"))) + "pcap"))) self.start_delay_seconds = 2 self.interface = interface self.pcap_command = f"tcpdump -i {self.interface} -n -w {self.output_path}" @@ -40,22 +42,22 @@ def __init__(self, artifact_dir: str, interface: str) -> None: def start_pcap(self) -> None: self.pcap_proc.start_command() - print("Pausing to check if pcap started...") + self.logger.info("Pausing to check if pcap started...") time.sleep(self.start_delay_seconds) if not self.pcap_proc.command_is_running(): - print( + self.logger.error( "Pcap did not start, you might need root; please authorize if prompted.") - Bash("sudo echo \"\"", sync=True) - print("Retrying pcap with sudo...") + Bash("sudo echo \"\"", sync=True).start_command() + self.logger.warning("Retrying pcap with sudo...") self.pcap_command = f"sudo {self.pcap_command}" self.pcap_proc = Bash(self.pcap_command) self.pcap_proc.start_command() time.sleep(self.start_delay_seconds) if not self.pcap_proc.command_is_running(): - print("WARNING Failed to start pcap!") + self.logger.error("Failed to start pcap!") else: - print(f"Pcap output path {self.output_path}") + self.logger.info(f"Pcap output path {self.output_path}") def stop_pcap(self) -> None: - self.pcap_proc.stop_command(soft=True) - print("Pcap stopped") + self.logger.info("Stopping pcap proc") + self.pcap_proc.stop_command() diff --git a/src/tools/interop/idt/capture/platform/android/__init__.py b/src/tools/interop/idt/capture/platform/android/__init__.py index 7ec319feb0e9a3..021ec15688c706 100644 --- a/src/tools/interop/idt/capture/platform/android/__init__.py +++ b/src/tools/interop/idt/capture/platform/android/__init__.py @@ -18,5 +18,5 @@ from .android import Android __all__ = [ - 'Android' + 'Android', ] diff --git a/src/tools/interop/idt/capture/platform/android/android.py b/src/tools/interop/idt/capture/platform/android/android.py index 2a394495835ef5..4ca8b26baeda6b 100644 --- a/src/tools/interop/idt/capture/platform/android/android.py +++ b/src/tools/interop/idt/capture/platform/android/android.py @@ -14,65 +14,60 @@ # See the License for the specific language governing permissions and # limitations under the License. # - import asyncio import ipaddress import os +import traceback import typing +from asyncio import Task from capture.base import PlatformLogStreamer -from capture.file_utils import create_standard_log_name -from capture.shell_utils import Bash +from utils.shell import Bash, log + +from . import config, streams +from .capabilities import Capabilities + +logger = log.get_logger(__file__) class Android(PlatformLogStreamer): - """ - Class that supports: - - Running synchronous adb commands - - Maintaining a singleton logcat stream - - Maintaining a singleton screen recording - """ def __init__(self, artifact_dir: str) -> None: - + self.logger = logger self.artifact_dir = artifact_dir - self.device_id: str | None = None self.adb_devices: typing.Dict[str, bool] = {} - self._authorize_adb() - - self.logcat_output_path = os.path.join( - self.artifact_dir, create_standard_log_name( - 'logcat', 'txt')) - self.logcat_command = f'adb -s {self.device_id} logcat -T 1 >> {self.logcat_output_path}' - self.logcat_proc = Bash(self.logcat_command) - - screen_cast_name = create_standard_log_name('screencast', 'mp4') - self.screen_cap_output_path = os.path.join( - self.artifact_dir, screen_cast_name) - self.check_screen_command = "shell dumpsys deviceidle | grep mScreenOn" - self.screen_path = f'/sdcard/Movies/{screen_cast_name}' - self.screen_command = f'adb -s {self.device_id} shell screenrecord --bugreport {self.screen_path}' - self.screen_proc = Bash(self.screen_command) - self.pull_screen = False - self.screen_pull_command = f'pull {self.screen_path} {self.screen_cap_output_path}' + self.capabilities: None | Capabilities = None + self.streams = {} + self.connected = False def run_adb_command( self, command: str, - capture_output: bool = False) -> Bash: + capture_output: bool = False, + cwd=None) -> Bash: """ Run an adb command synchronously Capture_output must be true to call get_captured_output() later """ - return Bash( + bash_command = Bash( f'adb -s {self.device_id} {command}', sync=True, - capture_output=capture_output) + capture_output=capture_output, + cwd=cwd) + bash_command.start_command() + return bash_command + + def get_adb_background_command( + self, + command: str, + cwd=None) -> Bash: + return Bash(f'adb -s {self.device_id} {command}', cwd=cwd) def get_adb_devices(self) -> typing.Dict[str, bool]: """Returns a dict of device ids and whether they are authorized""" adb_devices = Bash('adb devices', sync=True, capture_output=True) + adb_devices.start_command() adb_devices_output = adb_devices.get_captured_output().split('\n') devices_auth = {} header_done = False @@ -83,11 +78,11 @@ def get_adb_devices(self) -> typing.Dict[str, bool]: device_is_auth = line_parsed[1] == "device" if line_parsed[1] == "offline": disconnect_command = f"adb disconnect {device_id}" - print(f"Device {device_id} is offline, trying disconnect!") + self.logger.warning(f"Device {device_id} is offline, trying disconnect!") Bash( disconnect_command, sync=True, - capture_output=False) + capture_output=False).start_command() else: devices_auth[device_id] = device_is_auth header_done = True @@ -103,11 +98,11 @@ def _get_first_connected_device(self) -> str: def _set_device_if_only_one_connected(self) -> None: if self._only_one_device_connected(): self.device_id = self._get_first_connected_device() - print(f'Only one device detected; using {self.device_id}') + self.logger.warning(f'Only one device detected; using {self.device_id}') def _log_adb_devices(self) -> None: for dev in self.adb_devices: - print(dev) + self.logger.info(dev) @staticmethod def _is_connection_str(adb_input_str: str) -> bool: @@ -134,22 +129,23 @@ def _is_connection_str(adb_input_str: str) -> bool: def _check_connect_wireless_adb(self, temp_device_id: str) -> None: if Android._is_connection_str(temp_device_id): connect_command = f"adb connect {temp_device_id}" - print( + self.logger.warning( f"Detected connection string; attempting to connect: {connect_command}") - Bash(connect_command, sync=True, capture_output=False) + Bash(connect_command, sync=True, capture_output=False).start_command() self.get_adb_devices() def _device_id_user_input(self) -> None: - print('If there is no output below, press enter after connecting your phone under test OR') - print('Enter (copy paste) the target device id from the list of available devices below OR') - print('Enter $IP4:$PORT to connect wireless debugging.') + self.logger.error('Connect additional android devices via USB and press enter OR') + self.logger.error('Enter (copy paste) the target device id from the list of available devices below OR') + self.logger.error('Enter $IP4:$PORT to connect wireless debugging.') self._log_adb_devices() temp_device_id = input('').strip() self._check_connect_wireless_adb(temp_device_id) + self.get_adb_devices() if self._only_one_device_connected(): self._set_device_if_only_one_connected() elif temp_device_id not in self.adb_devices: - print('Entered device not in adb devices!') + self.logger.warning('Entered device not in adb devices!') else: self.device_id = temp_device_id @@ -161,7 +157,7 @@ def _choose_device_id(self) -> None: self._set_device_if_only_one_connected() while self.device_id not in self.get_adb_devices(): self._device_id_user_input() - print(f'Selected device {self.device_id}') + self.logger.info(f'Selected device {self.device_id}') def _authorize_adb(self) -> None: """ @@ -170,48 +166,61 @@ def _authorize_adb(self) -> None: self.get_adb_devices() self._choose_device_id() while not self.get_adb_devices()[self.device_id]: - print('Confirming authorization, press enter after auth') + self.logger.info('Confirming authorization, press enter after auth') input('') - print(f'Target android device ID is authorized: {self.device_id}') + self.logger.info(f'Target android device ID is authorized: {self.device_id}') + + async def connect(self) -> None: + if not self.connected: + self._authorize_adb() + self.capabilities = Capabilities(self) + self.capabilities.check_capabilities() + for stream in streams.__all__: + self.streams[stream] = getattr(streams, stream)(self) + self.connected = True + + async def handle_stream_action(self, action: str) -> None: + had_error = False + for stream_name, stream in self.streams.items(): + self.logger.info(f"Doing {action} for {stream_name}!") + try: + await getattr(stream, action)() + except Exception: + self.logger.error(traceback.format_exc()) + had_error = True + if had_error: + raise Exception("Propagating to controller!") - def check_screen(self) -> bool: - screen_cmd_output = self.run_adb_command( - self.check_screen_command, capture_output=True) - return "true" in screen_cmd_output.get_captured_output() + async def start_streaming(self) -> None: + await self.handle_stream_action("start") - async def prepare_screen_recording(self) -> None: - if self.screen_proc.command_is_running(): - return + async def run_observers(self) -> None: try: - async with asyncio.timeout_at(asyncio.get_running_loop().time() + 20.0): - screen_on = self.check_screen() - print("Please turn the screen on so screen recording can start!") - while not screen_on: - await asyncio.sleep(2) - screen_on = self.check_screen() - if not screen_on: - print("Screen is still not on for recording!") - except TimeoutError: - print("WARNING screen recording timeout") - return - - async def start_streaming(self) -> None: - await self.prepare_screen_recording() - if self.check_screen(): - self.pull_screen = True - self.screen_proc.start_command() - self.logcat_proc.start_command() - - async def pull_screen_recording(self) -> None: - if self.pull_screen: - self.screen_proc.stop_command() - print("screen proc stopped") - await asyncio.sleep(3) - self.run_adb_command(self.screen_pull_command) - print("screen recording pull attempted") - self.pull_screen = False + observer_tasks: [Task] = [] + for stream_name, stream in self.streams.items(): + observer_tasks.append(asyncio.create_task(stream.run_observer())) + while True: + self.logger.info("Android root observer task checking sub tasks") + for task in observer_tasks: + if task.done() or task.cancelled(): + self.logger.error(f"An android monitoring task has died, consider restarting! {task.__str__()}") + await asyncio.sleep(30) + except asyncio.CancelledError: + self.logger.info("Cancelling observer tasks") + for observer_tasks in observer_tasks: + observer_tasks.cancel() async def stop_streaming(self) -> None: - await self.pull_screen_recording() - self.logcat_proc.stop_command() - print("logcat stopped") + await self.handle_stream_action("stop") + if config.enable_bug_report: + found = False + for item in os.listdir(self.artifact_dir): + if "bugreport" in item and ".zip" in item: + found = True + if not found: + self.logger.info("Taking bugreport") + self.run_adb_command("bugreport", cwd=self.artifact_dir) + else: + self.logger.warning("bugreport already taken") + else: + self.logger.critical("bugreport disabled in settings!") diff --git a/src/tools/interop/idt/capture/platform/android/capabilities.py b/src/tools/interop/idt/capture/platform/android/capabilities.py new file mode 100644 index 00000000000000..cd2f7f62797074 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/capabilities.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING + +from utils.artifact import create_standard_log_name, log +from utils.shell import Bash + +if TYPE_CHECKING: + from capture.platform.android import Android + +from . import config + +logger = log.get_logger(__file__) + + +class Capabilities: + + def __init__(self, platform: "Android"): + self.logger = logger + self.platform = platform + self.c_has_tcpdump = False + self.c_has_root = False + self.c_is_64 = False + self.c_hci_snoop_enabled = False + self.artifact = create_standard_log_name("capabilities", "txt", parent=platform.artifact_dir) + + def __repr__(self): + s = "Detected capabilities:\n" + for item in [x for x in dir(self) if x.startswith("c_")]: + s += f"{item}: {getattr(self, item)}\n" + return s + + def check_snoop_log(self) -> bool: + return config.hci_log_level in self.platform.run_adb_command("shell getprop persist.bluetooth.btsnooplogmode", + capture_output=True).get_captured_output() + + def check_capabilities(self): + self.logger.info("Checking if device has root") + self.c_has_root = self.platform.run_adb_command( + "shell which su", capture_output=True).finished_success() + if self.c_has_root: + self.logger.warning("adb root!") + Bash("adb root", sync=True).start_command() + self.logger.info("Checking if device has tcpdump") + self.c_has_tcpdump = self.platform.run_adb_command( + "shell which tcpdump", capture_output=True).finished_success() + self.logger.info("Checking device CPU arch") + self.c_is_64 = "8" in self.platform.run_adb_command("shell cat /proc/cpuinfo | grep rch", + capture_output=True).get_captured_output() + self.c_hci_snoop_enabled = self.check_snoop_log() + if not self.c_hci_snoop_enabled: + self.logger.info("HCI not enabled, attempting to enable!") + self.platform.run_adb_command( + f"shell setprop persist.bluetooth.btsnooplogmode {config.hci_log_level}") + self.platform.run_adb_command("shell svc bluetooth disable") + self.platform.run_adb_command("shell svc bluetooth enable") + self.c_hci_snoop_enabled = self.check_snoop_log() + if not self.c_hci_snoop_enabled: + self.logger.error("Failed to enabled HCI snoop log") + self.logger.info(self) + with open(self.artifact, "w") as artifact: + artifact.write(str(self)) diff --git a/src/tools/interop/idt/capture/platform/android/config.py b/src/tools/interop/idt/capture/platform/android/config.py new file mode 100644 index 00000000000000..a0b05cd57a68cd --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/config.py @@ -0,0 +1,20 @@ +# +# 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. +# + +enable_build_push_tcpdump = True +enable_bug_report = True +hci_log_level = "full" diff --git a/src/tools/interop/idt/capture/platform/android/streams/__init__.py b/src/tools/interop/idt/capture/platform/android/streams/__init__.py new file mode 100644 index 00000000000000..9f48b1f043fcd4 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/__init__.py @@ -0,0 +1,14 @@ +from capture.loader import CaptureImplsLoader + +from .base import AndroidStream + +impl_loader = CaptureImplsLoader( + __path__[0], + "capture.platform.android.streams", + AndroidStream +) + +for impl_name, impl in impl_loader.impls.items(): + globals()[impl_name] = impl + +__all__ = impl_loader.impl_names diff --git a/src/tools/interop/idt/capture/platform/android/streams/base.py b/src/tools/interop/idt/capture/platform/android/streams/base.py new file mode 100644 index 00000000000000..64681312a36a3b --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/base.py @@ -0,0 +1,33 @@ +# +# 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. +# + +from abc import ABC, abstractmethod + + +class AndroidStream(ABC): + + @abstractmethod + async def start(self) -> None: + raise NotImplementedError + + @abstractmethod + async def run_observer(self) -> None: + raise NotImplementedError + + @abstractmethod + async def stop(self) -> None: + raise NotImplementedError diff --git a/src/tools/interop/idt/capture/platform/android/streams/logcat/__init__.py b/src/tools/interop/idt/capture/platform/android/streams/logcat/__init__.py new file mode 100644 index 00000000000000..eebc071333d89e --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/logcat/__init__.py @@ -0,0 +1,20 @@ +# +# 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. +# + +from .logcat import LogcatStreamer + +__all__ = ["LogcatStreamer"] diff --git a/src/tools/interop/idt/capture/platform/android/streams/logcat/logcat.py b/src/tools/interop/idt/capture/platform/android/streams/logcat/logcat.py new file mode 100644 index 00000000000000..78670bf6504df0 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/logcat/logcat.py @@ -0,0 +1,65 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import os +from typing import TYPE_CHECKING + +from utils.artifact import create_standard_log_name, log + +from ..base import AndroidStream + +logger = log.get_logger(__file__) + +if TYPE_CHECKING: + from capture.platform.android import Android + + +class LogcatStreamer(AndroidStream): + + def __init__(self, platform: "Android"): + self.logger = logger + self.platform = platform + self.logcat_artifact = create_standard_log_name("logcat", "txt", parent=platform.artifact_dir) + self.logcat_command = f"logcat -T 1 >> {self.logcat_artifact}" + self.logcat_proc = platform.get_adb_background_command(self.logcat_command) + self.was_ever_running = False + + async def run_observer(self) -> None: + last_size = 0 + if not os.path.exists(self.logcat_artifact): + self.logger.warning("Logcat artifact does not exist yes, this might be normal at the start of execution") + asyncio.sleep(15) + while True: + try: + new_size = os.path.getsize(self.logcat_artifact) + if not (new_size > last_size): + self.logger.warning(f"Logcat file not growing for {self.platform.device_id}, check connection!") + last_size = new_size + except OSError: + self.logger.error(f"Logcat file does not exist for {self.platfrom.device_id}, check connection!") + if not self.logcat_proc.command_is_running(): + self.logger.error("Logcat proc is not running, trying to restart!") + self.logcat_proc = self.platform.get_adb_background_command(self.logcat_command) + self.logcat_proc.start_command() + await asyncio.sleep(4) + + async def start(self): + self.logcat_proc.start_command() + + async def stop(self): + self.logcat_proc.stop_command() diff --git a/src/tools/interop/idt/capture/platform/android/streams/pcap/__init__.py b/src/tools/interop/idt/capture/platform/android/streams/pcap/__init__.py new file mode 100644 index 00000000000000..846210798129ff --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/pcap/__init__.py @@ -0,0 +1,20 @@ +# +# 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. +# + +from .pcap import AndroidPcap + +__all__ = ["AndroidPcap"] diff --git a/src/tools/interop/idt/capture/platform/android/streams/pcap/linux_build_tcpdump_64.sh b/src/tools/interop/idt/capture/platform/android/streams/pcap/linux_build_tcpdump_64.sh new file mode 100755 index 00000000000000..c82141b13ec207 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/pcap/linux_build_tcpdump_64.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# +# 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. +# + +set -e +export TCPDUMP=4.99.4 +export LIBPCAP=1.10.4 + +wget https://www.tcpdump.org/release/tcpdump-"$TCPDUMP".tar.gz +wget https://www.tcpdump.org/release/libpcap-"$LIBPCAP".tar.gz + +tar zxvf tcpdump-"$TCPDUMP".tar.gz +tar zxvf libpcap-"$LIBPCAP".tar.gz +export CC=aarch64-linux-gnu-gcc +cd libpcap-"$LIBPCAP" +./configure --host=arm-linux --with-pcap=linux +make +cd .. + +cd tcpdump-"$TCPDUMP" +export ac_cv_linux_vers=2 +export CFLAGS=-static +export CPPFLAGS=-static +export LDFLAGS=-static + +./configure --host=arm-linux +make + +aarch64-linux-gnu-strip tcpdump +cp tcpdump .. +cd .. +rm -R libpcap-"$LIBPCAP" +rm -R tcpdump-"$TCPDUMP" +rm libpcap-"$LIBPCAP".tar.gz +rm tcpdump-"$TCPDUMP".tar.gz diff --git a/src/tools/interop/idt/capture/platform/android/streams/pcap/mac_build_tcpdump_64.sh b/src/tools/interop/idt/capture/platform/android/streams/pcap/mac_build_tcpdump_64.sh new file mode 100644 index 00000000000000..15d911997b6d15 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/pcap/mac_build_tcpdump_64.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +# This script cross-compiles libpcap and tcpdump for a specified architecture (default: ARM64) + +# Set bash script to exit immediately if any commands fail, any variables are unexpanded, or any commands in a pipeline fail. +set -o errexit +set -o nounset +set -o pipefail + +# Check for optional target architecture argument, default to aarch64-linux-gnu if not provided +TARGET_ARCH="${1:-aarch64-linux-gnu}" + +# Create a random temporary directory using mktemp +TMP_DIR=$(mktemp -d) +OUT_DIR=$TMP_DIR/out + +# Function to download and extract archives +download_and_extract() { + local url="$1" + local filepath="$2" + local tar_dir="$3" + + wget -O "$filepath" "$url" + tar -C "$tar_dir" -zxvf "$filepath" +} + +# Function to clean up downloaded and extracted files +cleanup() { + local filepath="$1" + local dirpath="$2" + + rm -rf "$filepath" "$dirpath" +} + +# Cross-compile libpcap +LIBPCAP_VERSION=1.10.4 +LIBPCAP_DIR=$TMP_DIR/libpcap-$LIBPCAP_VERSION +LIBPCAP_ARCHIVE=$TMP_DIR/libpcap-$LIBPCAP_VERSION.tar.gz + +download_and_extract "https://www.tcpdump.org/release/libpcap-$LIBPCAP_VERSION.tar.gz" "$LIBPCAP_ARCHIVE" "$TMP_DIR" +(cd "$LIBPCAP_DIR" && ./configure --prefix="$OUT_DIR" --host="$TARGET_ARCH" --with-pcap=linux) +make -C "$LIBPCAP_DIR" -j"$(nproc)" +make -C "$LIBPCAP_DIR" install +cleanup "$LIBPCAP_ARCHIVE" "$LIBPCAP_DIR" + +# Cross-compile tcpdump +TCPDUMP_VERSION=4.99.4 +TCPDUMP_DIR=$TMP_DIR/tcpdump-$TCPDUMP_VERSION +TCPDUMP_ARCHIVE=$TMP_DIR/tcpdump-$TCPDUMP_VERSION.tar.gz + +download_and_extract "https://www.tcpdump.org/release/tcpdump-$TCPDUMP_VERSION.tar.gz" "$TCPDUMP_ARCHIVE" "$TMP_DIR" +(cd "$TCPDUMP_DIR" && CFLAGS="-static -I$OUT_DIR/include" CPPFLAGS="-static" LDFLAGS="-static -L$OUT_DIR/lib" ./configure --prefix="$OUT_DIR" --host="$TARGET_ARCH") +make -C "$TCPDUMP_DIR" +make -C "$TCPDUMP_DIR" install +cleanup "$TCPDUMP_ARCHIVE" "$TCPDUMP_DIR" + +# Prepare the artifact +strip "$OUT_DIR/bin/tcpdump" +mv "$OUT_DIR/bin/tcpdump" . +rm -rf "$TMP_DIR" diff --git a/src/tools/interop/idt/capture/platform/android/streams/pcap/pcap.py b/src/tools/interop/idt/capture/platform/android/streams/pcap/pcap.py new file mode 100644 index 00000000000000..8eab53b8ec0d03 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/pcap/pcap.py @@ -0,0 +1,99 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import os +from typing import TYPE_CHECKING + +from utils.artifact import create_standard_log_name, log, safe_mkdir +from utils.host_platform import is_mac +from utils.shell import Bash + +from ... import config +from ..base import AndroidStream + +if TYPE_CHECKING: + from capture.platform.android import Android + +logger = log.get_logger(__file__) + + +class AndroidPcap(AndroidStream): + + def __init__(self, platform: "Android"): + self.logger = logger + self.platform = platform + self.target_dir = "/sdcard/Download" + self.pcap_artifact = create_standard_log_name("android_tcpdump", "pcap", parent=self.platform.artifact_dir) + self.pcap_phone_out_path = f"{self.target_dir}/{os.path.basename(self.pcap_artifact)}" + self.pcap_phone_bin_location = "tcpdump" if platform.capabilities.c_has_tcpdump \ + else f"{self.target_dir}/tcpdump" + self.pcap_command = f"shell {self.pcap_phone_bin_location} -w {self.pcap_phone_out_path}" + self.pcap_proc = platform.get_adb_background_command(self.pcap_command) + self.pcap_pull = False + self.pcap_pull_command = f"pull {self.pcap_phone_out_path} {self.pcap_artifact}" + self.build_dir = os.path.join(os.path.dirname(__file__), "BUILD") + + async def pull_packet_capture(self) -> None: + if self.pcap_pull: + self.logger.info("Attempting to pull android pcap") + await asyncio.sleep(3) + self.platform.run_adb_command(self.pcap_pull_command) + self.pcap_pull = False + + async def start(self): + if not self.platform.capabilities.c_has_root: + self.logger.warning("Phone is not rooted, cannot take pcap!") + return + if self.platform.capabilities.c_has_tcpdump: + self.logger.info("tcpdump already available; using!") + self.pcap_proc.start_command() + self.pcap_pull = True + return + if not config.enable_build_push_tcpdump: + self.logger.critical("Android TCP Dump build and push disabled in configs!") + return + if not os.path.exists(os.path.join(self.build_dir, "tcpdump")): + self.logger.warning("tcpdump bin not found, attempting to build, please wait a few moments!") + safe_mkdir(self.build_dir) + if is_mac(): + build_script = os.path.join(os.path.dirname(__file__), "mac_build_tcpdump_64.sh") + Bash(f"{build_script} 2>&1 >> BUILD_LOG.txt", sync=True, cwd=self.build_dir).start_command() + else: + build_script = os.path.join(os.path.dirname(__file__), "linux_build_tcpdump_64.sh") + Bash(f"{build_script} 2>&1 >> BUILD_LOG.txt", sync=True, cwd=self.build_dir).start_command() + else: + self.logger.warning("Reusing existing tcpdump build") + if not self.platform.run_adb_command(f"shell ls {self.target_dir}/tcpdump").finished_success(): + self.logger.warning("Pushing tcpdump to device") + self.platform.run_adb_command(f"push {os.path.join(self.build_dir, 'tcpdump')} f{self.target_dir}") + self.platform.run_adb_command(f"chmod +x {self.target_dir}/tcpdump") + else: + self.logger.info("tcpdump already in the expected location, not pushing!") + self.logger.info("Starting Android pcap command") + self.pcap_proc.start_command() + self.pcap_pull = True + + async def run_observer(self) -> None: + while True: + # TODO: Implement, need to restart w/ new out file (no append) and keep pull manifest, much like `screen` + await asyncio.sleep(120) + + async def stop(self): + self.logger.info("Stopping android pcap proc") + self.pcap_proc.stop_command() + await self.pull_packet_capture() diff --git a/src/tools/interop/idt/capture/platform/android/streams/screen/__init__.py b/src/tools/interop/idt/capture/platform/android/streams/screen/__init__.py new file mode 100644 index 00000000000000..1170a57700a7f7 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/screen/__init__.py @@ -0,0 +1,20 @@ +# +# 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. +# + +from .screen import ScreenRecorder + +__all__ = ["ScreenRecorder"] diff --git a/src/tools/interop/idt/capture/platform/android/streams/screen/screen.py b/src/tools/interop/idt/capture/platform/android/streams/screen/screen.py new file mode 100644 index 00000000000000..e190e7cf212c27 --- /dev/null +++ b/src/tools/interop/idt/capture/platform/android/streams/screen/screen.py @@ -0,0 +1,100 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import os +from typing import TYPE_CHECKING + +from utils.artifact import create_standard_log_name, log + +from ..base import AndroidStream + +if TYPE_CHECKING: + from capture.platform.android import Android + +logger = log.get_logger(__file__) + + +class ScreenRecorder(AndroidStream): + + def __init__(self, platform: "Android"): + self.screen_artifact = None + self.screen_phone_out_path = None + self.screen_command = None + self.screen_proc = None + self.logger = logger + self.platform = platform + self.screen_check_command = "shell dumpsys deviceidle | grep mScreenOn" + self.screen_pull = False + self.file_counter = 0 + self.pull_commands: [str] = [] + self.manifest_file = os.path.join(platform.artifact_dir, "screen_manifest.txt") + + def check_screen(self) -> bool: + screen_cmd_output = self.platform.run_adb_command( + self.screen_check_command, capture_output=True) + return "mScreenOn=true" == screen_cmd_output.get_captured_output().strip() + + async def prepare_screen_recording(self) -> None: + screen_on = self.check_screen() + while not screen_on: + await asyncio.sleep(3) + screen_on = self.check_screen() + if not screen_on: + self.logger.error("Please turn the screen on so screen recording can start or check connection!") + + def update_commands(self) -> None: + self.screen_artifact = create_standard_log_name("screencast" + str(self.file_counter), + "mp4", + parent=self.platform.artifact_dir) + self.screen_phone_out_path = f"/sdcard/Movies/{os.path.basename(self.screen_artifact)}" + self.screen_command = f"shell screenrecord --bugreport {self.screen_phone_out_path}" + screen_pull_command = f"pull {self.screen_phone_out_path} {self.screen_artifact}\n" + self.pull_commands.append(screen_pull_command) + with open(self.manifest_file, "a+") as manifest: + manifest.write(screen_pull_command) + self.file_counter += 1 + + async def start(self): + await self.prepare_screen_recording() + if self.check_screen(): + self.screen_pull = True + self.update_commands() + self.screen_proc = self.platform.get_adb_background_command(self.screen_command) + self.screen_proc.start_command() + self.logger.info(f"New screen recording file started {self.screen_phone_out_path} {self.screen_artifact}") + + async def run_observer(self) -> None: + while True: + if not self.screen_proc.command_is_running(): + self.logger.warning(f"Screen recording proc needs restart (may be normal) {self.platform.device_id}") + await self.start() + await asyncio.sleep(4) + + async def pull_screen_recording(self) -> None: + if self.screen_pull: + self.logger.info("Attempting to pull screen recording") + await asyncio.sleep(3) + with open(self.manifest_file) as manifest: + for line in manifest: + self.platform.run_adb_command(line) + self.screen_pull = False + + async def stop(self): + self.logger.info("Stopping screen proc") + self.screen_proc.stop_command() + await self.pull_screen_recording() diff --git a/src/tools/interop/idt/capture/shell_utils.py b/src/tools/interop/idt/capture/shell_utils.py deleted file mode 100644 index 92bb11cbc25a8f..00000000000000 --- a/src/tools/interop/idt/capture/shell_utils.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (c) 2023 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import shlex -import subprocess - -from mobly.utils import stop_standing_subprocess - - -class Bash: - """ - Uses subprocess to execute bash commands - Intended to be instantiated and then only interacted with through instance methods - """ - - def __init__(self, command: str, sync: bool = False, - capture_output: bool = False) -> None: - """ - Run a bash command as a sub process - :param command: Command to run - :param sync: If True, wait for command to terminate - :param capture_output: Only applies to sync; if True, store stdout and stderr - """ - self.command: str = command - self.sync = sync - self.capture_output = capture_output - - self.args: list[str] = [] - self._init_args() - self.proc = subprocess.run(self.args, capture_output=capture_output) if self.sync else None - - def _init_args(self) -> None: - """Escape quotes, call bash, and prep command for subprocess args""" - command_escaped = self.command.replace('"', '\"') - self.args = shlex.split(f'/bin/bash -c "{command_escaped}"') - - def command_is_running(self) -> bool: - return self.proc is not None and self.proc.poll() is None - - def get_captured_output(self) -> str: - """Return captured output when the relevant instance var is set""" - return "" if not self.capture_output or not self.sync \ - else self.proc.stdout.decode().strip() - - def start_command(self) -> None: - if not self.sync and not self.command_is_running(): - self.proc = subprocess.Popen(self.args) - else: - print(f'INFO {self.command} start requested while running') - - def stop_command(self, soft: bool = False) -> None: - if self.command_is_running(): - if soft: - self.proc.terminate() - if self.proc.stdout: - self.proc.stdout.close() - if self.proc.stderr: - self.proc.stderr.close() - self.proc.wait() - else: - stop_standing_subprocess(self.proc) - else: - print(f'INFO {self.command} stop requested while not running') - self.proc = None diff --git a/src/tools/interop/idt/config.py b/src/tools/interop/idt/config.py new file mode 100644 index 00000000000000..f084d4918516c4 --- /dev/null +++ b/src/tools/interop/idt/config.py @@ -0,0 +1,22 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import logging + +enable_color = True +log_level = logging.INFO +py_major_version = 3 +py_minor_version = 11 diff --git a/src/tools/interop/idt/discovery/__init__.py b/src/tools/interop/idt/discovery/__init__.py index f9a1aa665a86d8..b83e5dfe0e1f50 100644 --- a/src/tools/interop/idt/discovery/__init__.py +++ b/src/tools/interop/idt/discovery/__init__.py @@ -14,8 +14,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from .matter_ble import MatterBleScanner -from .matter_dnssd import MatterDnssdListener +from .ble import MatterBleScanner +from .dnssd import MatterDnssdListener __all__ = [ 'MatterBleScanner', diff --git a/src/tools/interop/idt/discovery/matter_ble.py b/src/tools/interop/idt/discovery/ble.py similarity index 72% rename from src/tools/interop/idt/discovery/matter_ble.py rename to src/tools/interop/idt/discovery/ble.py index 737842bca70ab8..9549c74614de9a 100644 --- a/src/tools/interop/idt/discovery/matter_ble.py +++ b/src/tools/interop/idt/discovery/ble.py @@ -17,19 +17,23 @@ import asyncio import datetime -import logging import os +import sys import time from bleak import AdvertisementData, BleakScanner, BLEDevice from bleak.exc import BleakDBusError +from utils import log +from utils.log import border_print + +logger = log.get_logger(__file__) class MatterBleScanner: def __init__(self, artifact_dir: str): self.artifact_dir = artifact_dir - self.logger = logging.getLogger(__file__) + self.logger = logger self.devices_seen_last_time: set[str] = set() self.devices_seen_this_time: set[str] = set() self.throttle_seconds = 1 @@ -50,7 +54,7 @@ def write_device_log(self, device_name: str, to_write: str) -> None: ts = datetime.datetime.now().isoformat(sep=' ', timespec='milliseconds') to_write = f"{ts}\n{to_write}\n\n" log_file.write(to_write) - print(to_write) + self.logger.info(to_write) @staticmethod def is_matter_device(service_uuid: str) -> bool: @@ -59,7 +63,7 @@ def is_matter_device(service_uuid: str) -> bool: def handle_device_states(self) -> None: for device_id in self.devices_seen_last_time - self.devices_seen_this_time: - to_log = f"LOST {device_id}" + to_log = f"LOST {device_id}\n" self.write_device_log(device_id, to_log) self.devices_seen_last_time = self.devices_seen_this_time self.devices_seen_this_time = set() @@ -67,18 +71,21 @@ def handle_device_states(self) -> None: def log_ble_discovery( self, name: str, - bin_data: bytes, + bin_service_data: bytes, ble_device: BLEDevice, rssi: int) -> None: - loggable_data = bin_data.hex() + hex_service_data = bin_service_data.hex() if self.is_matter_device(name): device_id = f"{ble_device.name}_{ble_device.address}" self.devices_seen_this_time.add(device_id) if device_id not in self.devices_seen_last_time: - to_log = f"DISCOVERED\n{ble_device.name} {ble_device.address}" - to_log += f"{name}\n{loggable_data}\n" + to_log = "DISCOVERED\n" + to_log += f"BLE DEVICE NAME: {ble_device.name}\n" + to_log += f"BLE ADDR: {ble_device.address}\n" + to_log += f"NAME: {name}\n" + to_log += f"HEX SERVICE DATA: {hex_service_data}\n" to_log += f"RSSI {rssi}\n" - to_log += self.parse_vid_pid(loggable_data) + to_log += self.parse_vid_pid(hex_service_data) self.write_device_log(device_id, to_log) async def browse(self, scanner: BleakScanner) -> None: @@ -86,19 +93,26 @@ async def browse(self, scanner: BleakScanner) -> None: for device in devices.values(): ble_device = device[0] ad_data = device[1] - for name, bin_data in ad_data.service_data.items(): + for name, bin_service_data in ad_data.service_data.items(): self.log_ble_discovery( - name, bin_data, ble_device, ad_data.rssi) + name, bin_service_data, ble_device, ad_data.rssi) self.handle_device_states() - def browse_interactive(self) -> None: - scanner = BleakScanner() - self.logger.warning( - "Scanning BLE\nDCL Lookup: https://webui.dcl.csa-iot.org/") + async def browser_task(self, scanner) -> None: while True: try: - time.sleep(self.throttle_seconds) - asyncio.run(self.browse(scanner)) + await asyncio.sleep(self.throttle_seconds) + await self.browse(scanner) except BleakDBusError as e: - self.logger.warning(e) + self.logger.critical(e) time.sleep(self.error_seconds) + + async def browse_interactive(self) -> None: + scanner = BleakScanner() + self.logger.warning( + "Scanning BLE\nDCL Lookup: https://webui.dcl.csa-iot.org/\n") + border_print("Press enter to stop!", important=True) + task = asyncio.create_task(self.browser_task(scanner)) + await asyncio.get_event_loop().run_in_executor( + None, sys.stdin.readline) + task.cancel() diff --git a/src/tools/interop/idt/discovery/dnssd.py b/src/tools/interop/idt/discovery/dnssd.py new file mode 100644 index 00000000000000..04dd8de3494eda --- /dev/null +++ b/src/tools/interop/idt/discovery/dnssd.py @@ -0,0 +1,354 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import os +import traceback +from dataclasses import dataclass +from textwrap import dedent +from typing import Callable + +from probe.ip_utils import get_addr_type +from utils.artifact import create_standard_log_name, log +from utils.log import add_border, border_print +from zeroconf import ServiceBrowser, ServiceInfo, ServiceListener, Zeroconf + +logger = log.get_logger(__file__) + + +@dataclass() +class MdnsTypeInfo: + type: str + description: str + + +commissioner = MdnsTypeInfo( + "COMMISSIONER", + "This is a service for a Matter commissioner aka. controller" +) +commissionable = MdnsTypeInfo( + "COMMISSIONABLE / EXTENDED DISCOVERY", + "This is a service to be used in the commissioning process and provides more info about the device." +) +operational = MdnsTypeInfo( + "OPERATIONAL", + "This is a service for a commissioned Matter device. It exposes limited info about the device." +) +border_router = MdnsTypeInfo( + "THREAD BORDER ROUTER", + "This is a service for a thread border router; may be used for thread+Matter devices." +) + +_MDNS_TYPES = { + "_matterd._udp.local.": commissioner, + "_matterc._udp.local.": commissionable, + "_matter._tcp.local.": operational, + "_meshcop._udp.local.": border_router, +} + + +@dataclass() +class RecordParser: + readable_name: str + explanation: str + parse: Callable[[str], str] + + +# TODO: Meshcop parser + +class MatterTxtRecordParser: + + def __init__(self): + self.parsers = { + "D": RecordParser("Discriminator", + dedent("\ + Differentiates this instance of the device from others w/ same VID/PID that might be \n\ + in the environment."), + MatterTxtRecordParser.parse_d), # To hex + "VP": RecordParser("VID/PID", + "The Vendor ID and Product ID (each are two bytes of hex) that identify this product.", + MatterTxtRecordParser.parse_vp), # Split + to hex + "CM": RecordParser("Commissioning mode", + "Whether the device is in commissioning mode or not.", + MatterTxtRecordParser.parse_cm), # Decode + "DT": RecordParser("Device type", + "Application type for this end device.", + MatterTxtRecordParser.parse_dt), # Decode + "DN": RecordParser("Device name", + "Manufacturer provided device name. MAY match NodeLabel in Basic info cluster.", + MatterTxtRecordParser.parse_pass_through), # None + "RI": RecordParser("Rotating identifier", + "Vendor specific, non-trackable per-device ID.", + MatterTxtRecordParser.parse_pass_through), # None + "PH": RecordParser("Pairing hint", + dedent("\ + Given the current device state, follow these instructions to make the device \n\ + commissionable."), + MatterTxtRecordParser.parse_ph), # Decode + "PI": RecordParser("Pairing instructions", + dedent("\ + Used with the Pairing hint. If the Pairing hint mentions N, this is the \n\ + value of N."), + MatterTxtRecordParser.parse_pass_through), # None + # General records + "SII": RecordParser("Session idle interval", + "Message Reliability Protocol retry interval while the device is idle in milliseconds.", + MatterTxtRecordParser.parse_pass_through), # None + "SAI": RecordParser("Session active interval", + dedent("\ + Message Reliability Protocol retry interval while the device is active \n\ + in milliseconds."), + MatterTxtRecordParser.parse_pass_through), # None + "SAT": RecordParser("Session active threshold", + "Duration of time this device stays active after last activity in milliseconds.", + MatterTxtRecordParser.parse_pass_through), # None + "T": RecordParser("Supports TCP", + "Whether this device supports TCP client and or Server.", + MatterTxtRecordParser.parse_t), # Decode + } + self.unparsed_records = "" + self.parsed_records = "" + + def parse_single_record(self, key: str, value: str): + parser: RecordParser = self.parsers[key] + self.parsed_records += add_border(parser.readable_name + "\n") + self.parsed_records += parser.explanation + "\n\n" + try: + self.parsed_records += "PARSED VALUE: " + parser.parse(value) + "\n" + except Exception: + logger.error("Exception parsing TXT record, appending raw value") + logger.error(traceback.format_exc()) + self.parsed_records += f"RAW VALUE: {value}\n" + + def get_output(self) -> str: + unparsed_exp = "\nThe following TXT records were not parsed or explained:\n" + parsed_exp = "\nThe following was discovered about this device via TXT records:\n" + ret = "" + if self.unparsed_records: + ret += unparsed_exp + self.unparsed_records + if self.parsed_records: + ret += parsed_exp + self.parsed_records + return ret + + def parse_records(self, info: ServiceInfo) -> str: + if info.properties is not None: + for name, value in info.properties.items(): + try: + name = name.decode("utf-8") + except UnicodeDecodeError: + name = str(name) + try: + value = value.decode("utf-8") + except UnicodeDecodeError: + value = str(value) + if name not in self.parsers: + self.unparsed_records += f"KEY: {name} VALUE: {value}\n" + else: + self.parse_single_record(name, value) + return self.get_output() + + @staticmethod + def parse_pass_through(txt_value: str) -> str: + return txt_value + + @staticmethod + def parse_d(txt_value: str) -> str: + return hex(int(txt_value)) + + @staticmethod + def parse_vp(txt_value: str) -> str: + vid, pid = txt_value.split("+") + vid, pid = hex(int(vid)), hex(int(pid)) + return f"VID: {vid}, PID: {pid}" + + @staticmethod + def parse_cm(txt_value: str) -> str: + cm = int(txt_value) + mode_descriptions = [ + "Not in commissioning mode", + "In passcode commissioning mode (standard mode)", + "In dynamic passcode commissioning mode", + ] + return mode_descriptions[cm] + + @staticmethod + def parse_dt(txt_value: str) -> str: + application_device_types = { + # lighting + "0x100": "On/Off Light", + "0x101": "Dimmable Light", + "0x10C": "Color Temperature Light", + "0x10D": "Extended Color Light", + # smart plugs/outlets and other actuators + "0x10A": "On/Off Plug-in Unit", + "0x10B": "Dimmable Plug-In Unit", + "0x303": "Pump", + # switches and controls + "0x103": "On/Off Light Switch", + "0x104": "Dimmer Switch", + "0x105": "Color Dimmer Switch", + "0x840": "Control Bridge", + "0x304": "Pump Controller", + "0xF": "Generic Switch", + # sensors + "0x15": "Contact Sensor", + "0x106": "Light Sensor", + "0x107": "Occupancy Sensor", + "0x302": "Temperature Sensor", + "0x305": "Pressure Sensor", + "0x306": "Flow Sensor", + "0x307": "Humidity Sensor", + "0x850": "On/Off Sensor", + # closures + "0xA": "Door Lock", + "0xB": "Door Lock Controller", + "0x202": "Window Covering", + "0x203": "Window Covering Controller", + # HVAC + "0x300": "Heating/Cooling Unit", + "0x301": "Thermostat", + "0x2B": "Fan", + # media + "0x28": "Basic Video Player", + "0x23": "Casting Video Player", + "0x22": "Speaker", + "0x24": "Content App", + "0x29": "Casting Video Client", + "0x2A": "Video Remote Control", + # generic + "0x27": "Mode Select", + } + return application_device_types[hex((int(txt_value))).upper().replace("0X", "0x")] + + @staticmethod + def parse_ph(txt_value: str) -> str: + pairing_hints = [ + "Power Cycle", + "Custom commissioning flow", + "Use existing administrator (already commissioned)", + "Use settings menu on device", + "Use the PI TXT record hint", + "Read the manual", + "Press the reset button", + "Press Reset Button with application of power", + "Press Reset Button for N seconds", + "Press Reset Button until light blinks", + "Press Reset Button for N seconds with application of power", + "Press Reset Button until light blinks with application of power", + "Press Reset Button N times", + "Press Setup Button", + "Press Setup Button with application of power", + "Press Setup Button for N seconds", + "Press Setup Button until light blinks", + "Press Setup Button for N seconds with application of power", + "Press Setup Button until light blinks with application of power", + "Press Setup Button N times", + ] + ret = "\n" + b_arr = [int(b) for b in bin(int(txt_value))[2:]][::-1] + for i in range(0, len(b_arr)): + b = b_arr[i] + if b: + ret += pairing_hints[i] + "\n" + return ret + + @staticmethod + def parse_t(txt_value: str) -> str: + return "TCP supported" if int(txt_value) else "TCP not supported" + + +class MatterDnssdListener(ServiceListener): + + def __init__(self, artifact_dir: str) -> None: + super().__init__() + self.artifact_dir = artifact_dir + self.logger = logger + self.discovered_matter_devices: [str, ServiceInfo] = {} + + def write_log(self, line: str, log_name: str) -> None: + with open(self.create_device_log_name(log_name), "a+") as log_file: + log_file.write(line) + + def create_device_log_name(self, device_name) -> str: + return os.path.join( + self.artifact_dir, + create_standard_log_name(f"{device_name}_dnssd", "txt")) + + @staticmethod + def log_addr(info: ServiceInfo) -> str: + ret = add_border("This device has the following IP addresses\n") + for addr in info.parsed_scoped_addresses(): + ret += f"{get_addr_type(addr)}: {addr}\n" + return ret + + def handle_service_info( + self, + zc: Zeroconf, + type_: str, + name: str, + delta_type: str) -> None: + info = zc.get_service_info(type_, name) + self.discovered_matter_devices[name] = info + to_log = f"{name}\n" + update_str = f"\nSERVICE {delta_type}\n" + to_log += ("*" * (len(update_str) - 2)) + update_str + to_log += _MDNS_TYPES[type_].type + "\n" + to_log += _MDNS_TYPES[type_].description + "\n" + to_log += f"A/SRV TTL: {str(info.host_ttl)}\n" + to_log += f"PTR/TXT TTL: {str(info.other_ttl)}\n" + txt_parser = MatterTxtRecordParser() + to_log += txt_parser.parse_records(info) + to_log += self.log_addr(info) + self.logger.info(to_log) + self.write_log(to_log, name) + + def add_service(self, zc: Zeroconf, type_: str, name: str) -> None: + self.handle_service_info(zc, type_, name, "ADDED") + + def update_service(self, zc: Zeroconf, type_: str, name: str) -> None: + self.handle_service_info(zc, type_, name, "UPDATED") + + def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None: + to_log = f"Service {name} removed\n" + to_log += _MDNS_TYPES[type_].type + "\n" + to_log += _MDNS_TYPES[type_].description + if name in self.discovered_matter_devices: + del self.discovered_matter_devices[name] + self.logger.warning(to_log) + self.write_log(to_log, name) + + def browse_interactive(self) -> None: + zc = Zeroconf() + ServiceBrowser(zc, list(_MDNS_TYPES.keys()), self) + try: + self.logger.warning( + dedent("\ + \n\ + Browsing Matter DNS-SD\n\ + DCL Lookup: https://webui.dcl.csa-iot.org/\n\ + See spec section 4.3 for details of Matter TXT records.\n")) + border_print("Press enter to stop!", important=True) + input("") + finally: + zc.close() + + async def browse_once(self, browse_time_seconds: int) -> Zeroconf: + zc = Zeroconf() + ServiceBrowser(zc, list(_MDNS_TYPES.keys()), self) + await asyncio.sleep(browse_time_seconds) + zc.close() + return zc diff --git a/src/tools/interop/idt/discovery/matter_dnssd.py b/src/tools/interop/idt/discovery/matter_dnssd.py deleted file mode 100644 index 7dfec195174313..00000000000000 --- a/src/tools/interop/idt/discovery/matter_dnssd.py +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (c) 2023 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import logging - -from zeroconf import ServiceBrowser, ServiceInfo, ServiceListener, Zeroconf - -_MDNS_TYPES = { - "_matterd._udp.local.": "COMMISSIONER", - "_matterc._udp.local.": "COMMISSIONABLE", - "_matter._tcp.local.": "OPERATIONAL", - "_meshcop._udp.local.": "THREAD_BORDER_ROUTER", -} - - -class MatterDnssdListener(ServiceListener): - - def __init__(self, artifact_dir: str) -> None: - super().__init__() - self.artifact_dir = artifact_dir - self.logger = logging.getLogger(__file__) - - @staticmethod - def log_addr(info: ServiceInfo) -> str: - ret = "\n" - for addr in info.parsed_scoped_addresses(): - ret += f"{addr}\n" - return ret - - @staticmethod - def log_vid_pid(info: ServiceInfo) -> str: - if info.properties is not None and b'VP' in info.properties: - vid_pid = str(info.properties[b'VP']) - vid_pid = vid_pid[2:len(vid_pid) - 1].split('+') - vid = hex(int(vid_pid[0])) - pid = hex(int(vid_pid[1])) - return f"\nVID: {vid} PID: {pid}\n" - return "" - - def handle_service_info( - self, - zc: Zeroconf, - type_: str, - name: str, - delta_type: str) -> None: - info = zc.get_service_info(type_, name) - to_log = f"{name}\n" - if info.properties is not None: - for name, value in info.properties.items(): - to_log += f"{name}:\t{value}\n" - update_str = f"\nSERVICE {delta_type}\n" - to_log += ("*" * (len(update_str) - 2)) + update_str - to_log += _MDNS_TYPES[type_] - to_log += self.log_vid_pid(info) - to_log += self.log_addr(info) - self.logger.info(to_log) - - def add_service(self, zc: Zeroconf, type_: str, name: str) -> None: - self.handle_service_info(zc, type_, name, "ADDED") - - def update_service(self, zc: Zeroconf, type_: str, name: str) -> None: - self.handle_service_info(zc, type_, name, "UPDATED") - - def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None: - to_log = f"Service {name} removed\n" - to_log += _MDNS_TYPES[type_] - self.logger.warning(to_log) - - def browse_interactive(self) -> None: - zc = Zeroconf() - ServiceBrowser(zc, list(_MDNS_TYPES.keys()), self) - try: - input("Browsing Matter mDNS, press enter to stop\n") - finally: - zc.close() diff --git a/src/tools/interop/idt/idt.py b/src/tools/interop/idt/idt.py index b401f88dd8b231..9ddb1ddd90c37f 100644 --- a/src/tools/interop/idt/idt.py +++ b/src/tools/interop/idt/idt.py @@ -17,25 +17,38 @@ import argparse import asyncio -import logging import os import shutil import sys from pathlib import Path -from capture import EcosystemController, EcosystemFactory, PacketCaptureRunner, PlatformFactory -from capture.file_utils import border_print, create_file_timestamp, safe_mkdir +import probe.runner as probe_runner +from capture import PacketCaptureRunner, controller from discovery import MatterBleScanner, MatterDnssdListener +from utils.artifact import create_file_timestamp, safe_mkdir +from utils.host_platform import get_available_interfaces, verify_host_dependencies +from utils.log import border_print -logging.basicConfig( - format='%(asctime)s.%(msecs)03d %(levelname)s {%(module)s} [%(funcName)s]\n%(message)s \n', - level=logging.INFO) +import config + +splash = '''\x1b[0m +\x1b[32;1m┌────────┐\x1b[33;20m▪\x1b[32;1m \x1b[34;1m┌──────┐ \x1b[33;20m• \x1b[35;1m┌──────────┐ \x1b[33;20m● +\x1b[32;1m│░░░░░░░░│ \x1b[34;1m│░░░░░░└┐ \x1b[33;20m゚\x1b[35;1m│░░░░░░░░░░│ +\x1b[32;1m└──┐░░┌──┘\x1b[33;20m۰\x1b[32;1m \x1b[34;1m│░░┌┐░░░│ \x1b[35;1m└───┐░░┌───┘ +\x1b[32;1m │░░│ \x1b[34;1m│░░│└┐░░│\x1b[33;20m▫ \x1b[35;1m \x1b[33;20m۰\x1b[35;1m │░░│ \x1b[33;20m。 +\x1b[32;1m \x1b[33;20m•\x1b[32;1m │░░│ \x1b[33;20m● \x1b[34;1m│░░│┌┘░░│ \x1b[35;1m │░░│ +\x1b[32;1m┌──┘░░└──┐ \x1b[34;1m│░░└┘░░░│ \x1b[35;1m │░░│ \x1b[33;20m• +\x1b[32;1m│░░░░░░░░│ \x1b[34;1m│░░░░░░┌┘\x1b[33;20m۰ \x1b[35;1m \x1b[33;20m▪\x1b[35;1m │░░│ +\x1b[32;1m└────────┘\x1b[33;20m•\x1b[32;1m \x1b[34;1m└──────┘\x1b[33;20m。 \x1b[35;1m └──┘ \x1b[33;20m▫ +\x1b[32;1m✰ Interop\x1b[34;1m ✰ Debugging\x1b[35;1m ✰ Tool +\x1b[0m''' class InteropDebuggingTool: def __init__(self) -> None: - + if config.enable_color: + print(splash) self.artifact_dir = None create_artifact_dir = True if len(sys.argv) == 1: @@ -45,6 +58,8 @@ def __init__(self) -> None: elif len(sys.argv) >= 3 and (sys.argv[2] == "-h" or sys.argv[2] == "--help"): create_artifact_dir = False + verify_host_dependencies(["adb", "tcpdump"]) + if not os.environ['IDT_OUTPUT_DIR']: print('Missing required env vars! Use /scripts!!!') sys.exit(1) @@ -60,25 +75,22 @@ def __init__(self) -> None: safe_mkdir(self.artifact_dir) border_print(f"Using artifact dir {self.artifact_dir}") - self.available_platforms = PlatformFactory.list_available_platforms() + self.available_platforms = controller.list_available_platforms() self.available_platforms_default = 'Android' if 'Android' in self.available_platforms else None self.platform_required = self.available_platforms_default is None - self.available_ecosystems = EcosystemFactory.list_available_ecosystems() + self.available_ecosystems = controller.list_available_ecosystems() self.available_ecosystems_default = 'ALL' self.available_ecosystems.append(self.available_ecosystems_default) - net_interface_path = "/sys/class/net/" - self.available_net_interfaces = os.listdir(net_interface_path) \ - if os.path.exists(net_interface_path) \ - else [] - self.available_net_interfaces.append("any") - self.available_net_interfaces_default = "any" + self.available_net_interfaces = get_available_interfaces() + self.available_net_interfaces_default = "any" if "any" in self.available_net_interfaces else None self.pcap_artifact_dir = os.path.join(self.artifact_dir, "pcap") self.net_interface_required = self.available_net_interfaces_default is None self.ble_artifact_dir = os.path.join(self.artifact_dir, "ble") self.dnssd_artifact_dir = os.path.join(self.artifact_dir, "dnssd") + self.prober_dir = os.path.join(self.artifact_dir, "probes") self.process_args() @@ -145,6 +157,10 @@ def process_args(self) -> None: capture_parser.set_defaults(func=self.command_capture) + prober_parser = subparsers.add_parser("probe", + help="Probe the environment for Matter and general networking info") + prober_parser.set_defaults(func=self.command_probe) + args, unknown = parser.parse_known_args() if not hasattr(args, 'func'): parser.print_help() @@ -154,10 +170,13 @@ def process_args(self) -> None: def command_discover(self, args: argparse.Namespace) -> None: if args.type[0] == "b": safe_mkdir(self.ble_artifact_dir) - MatterBleScanner(self.ble_artifact_dir).browse_interactive() + scanner = MatterBleScanner(self.ble_artifact_dir) + asyncio.run(scanner.browse_interactive()) + self.zip_artifacts() else: safe_mkdir(self.dnssd_artifact_dir) MatterDnssdListener(self.dnssd_artifact_dir).browse_interactive() + self.zip_artifacts() def zip_artifacts(self) -> None: zip_basename = os.path.basename(self.artifact_dir) @@ -165,10 +184,9 @@ def zip_artifacts(self) -> None: 'zip', root_dir=self.artifact_dir) output_zip = shutil.move(archive_file, self.artifact_dir_parent) - print(f'Output zip: {output_zip}') + border_print(f'Output zip: {output_zip}') def command_capture(self, args: argparse.Namespace) -> None: - pcap = args.pcap == 't' pcap_runner = None if not pcap else PacketCaptureRunner( self.pcap_artifact_dir, args.interface) @@ -176,21 +194,24 @@ def command_capture(self, args: argparse.Namespace) -> None: border_print("Starting pcap") safe_mkdir(self.pcap_artifact_dir) pcap_runner.start_pcap() - - asyncio.run(EcosystemFactory.init_ecosystems(args.platform, - args.ecosystem, - self.artifact_dir)) - asyncio.run(EcosystemController.start()) - - border_print("Press enter twice to stop streaming", important=True) - input("") - + asyncio.run(controller.init_ecosystems(args.platform, + args.ecosystem, + self.artifact_dir)) + asyncio.run(controller.start()) + asyncio.run(controller.run_analyzers()) if pcap: border_print("Stopping pcap") pcap_runner.stop_pcap() + asyncio.run(controller.stop()) + asyncio.run(controller.probe()) + border_print("Checking error report") + controller.write_error_report(self.artifact_dir) + border_print("Compressing artifacts...") + self.zip_artifacts() - asyncio.run(EcosystemController.stop()) - asyncio.run(EcosystemController.analyze()) - - border_print("Compressing artifacts, this may take some time!") + def command_probe(self, args: argparse.Namespace) -> None: + border_print("Starting generic Matter prober for local environment!") + safe_mkdir(self.dnssd_artifact_dir) + safe_mkdir(self.prober_dir) + probe_runner.run_probes(self.prober_dir, self.dnssd_artifact_dir) self.zip_artifacts() diff --git a/src/tools/interop/idt/probe/__init__.py b/src/tools/interop/idt/probe/__init__.py new file mode 100644 index 00000000000000..f44dcd97c812ad --- /dev/null +++ b/src/tools/interop/idt/probe/__init__.py @@ -0,0 +1,25 @@ +# +# 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. +# + +from dataclasses import dataclass + + +@dataclass(repr=True) +class ProbeTarget: + name: str + ip: str + port: str diff --git a/src/tools/interop/idt/probe/config.py b/src/tools/interop/idt/probe/config.py new file mode 100644 index 00000000000000..150e4079e23e31 --- /dev/null +++ b/src/tools/interop/idt/probe/config.py @@ -0,0 +1,19 @@ +# +# 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. +# + +ping_count = 4 +dnssd_browsing_time_seconds = 4 diff --git a/src/tools/interop/idt/probe/ip_utils.py b/src/tools/interop/idt/probe/ip_utils.py new file mode 100644 index 00000000000000..ca1e39ebf75f91 --- /dev/null +++ b/src/tools/interop/idt/probe/ip_utils.py @@ -0,0 +1,50 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import ipaddress + + +def is_ipv4(ip: str) -> bool: + try: + ipaddress.IPv4Address(ip) + return True + except ipaddress.AddressValueError: + return False + + +def is_ipv6_ll(ip: str) -> bool: + try: + return ipaddress.IPv6Address(ip).is_link_local + except ipaddress.AddressValueError: + return False + + +def is_ipv6(ip: str) -> bool: + try: + ipaddress.IPv6Address(ip) + return True + except ipaddress.AddressValueError: + return False + + +def get_addr_type(ip: str) -> str: + if is_ipv4(ip): + return "V4" + elif is_ipv6_ll(ip): + return "V6 Link Local" + elif is_ipv6(ip): + return "V6" diff --git a/src/tools/interop/idt/probe/linux.py b/src/tools/interop/idt/probe/linux.py new file mode 100644 index 00000000000000..05a8adb4410e28 --- /dev/null +++ b/src/tools/interop/idt/probe/linux.py @@ -0,0 +1,48 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import probe.probe as p +from utils.host_platform import get_ll_interface +from utils.log import get_logger + +from . import config + +logger = get_logger(__file__) + + +class ProberLinuxHost(p.GenericMatterProber): + + def __init__(self, artifact_dir: str, dnssd_artifact_dir: str) -> None: + # TODO: Parity with macOS + super().__init__(artifact_dir, dnssd_artifact_dir) + self.logger = logger + self.ll_int = get_ll_interface() + + def discover_targets_by_neighbor(self) -> None: + pass + + def probe_v4(self, ipv4: str, port: str) -> None: + self.run_command(f"ping -c {config.ping_count} {ipv4}") + + def probe_v6(self, ipv6: str, port: str) -> None: + self.run_command(f"ping -c {config.ping_count} -6 {ipv6}") + + def probe_v6_ll(self, ipv6_ll: str, port: str) -> None: + self.run_command(f"ping -c {config.ping_count} -6 {ipv6_ll}%{self.ll_int}") + + def get_general_details(self) -> None: + pass diff --git a/src/tools/interop/idt/probe/mac.py b/src/tools/interop/idt/probe/mac.py new file mode 100644 index 00000000000000..b13e5d50fa46ce --- /dev/null +++ b/src/tools/interop/idt/probe/mac.py @@ -0,0 +1,56 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import probe.probe as p +from utils.host_platform import get_ll_interface +from utils.log import get_logger + +from . import ProbeTarget, config + +logger = get_logger(__file__) + + +class ProberMacHost(p.GenericMatterProber): + + def __init__(self, artifact_dir: str, dnssd_artifact_dir: str) -> None: + # TODO: Build out additional probes + super().__init__(artifact_dir, dnssd_artifact_dir) + self.logger = logger + self.ll_int = get_ll_interface() + + def discover_targets_by_neighbor(self) -> None: + pass + + def probe_v4(self, target: ProbeTarget) -> None: + self.logger.info("Ping IPv4") + self.run_command(f"ping -c {config.ping_count} {target.ip}") + + def probe_v6(self, target: ProbeTarget) -> None: + self.logger.info("Ping IPv6") + self.run_command(f"ping6 -c {config.ping_count} {target.ip}") + + def probe_v6_ll(self, target: ProbeTarget) -> None: + self.logger.info("Ping IPv6 Link Local") + self.run_command(f"ping6 -c {config.ping_count} -I {self.ll_int} {target.ip}") + + def get_general_details(self) -> None: + self.logger.info("Host interfaces") + self.run_command("ifconfig") + self.logger.info("v4 routes from host") + self.run_command("netstat -r -f inet -n") + self.logger.info("v6 routes from host") + self.run_command("netstat -r -f inet6 -n") diff --git a/src/tools/interop/idt/probe/probe.py b/src/tools/interop/idt/probe/probe.py new file mode 100644 index 00000000000000..6fcc92ad0428fb --- /dev/null +++ b/src/tools/interop/idt/probe/probe.py @@ -0,0 +1,100 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import asyncio +import os.path +from abc import ABC, abstractmethod + +from discovery import MatterDnssdListener +from discovery.dnssd import ServiceInfo +from utils.artifact import create_standard_log_name +from utils.log import get_logger +from utils.shell import Bash + +from . import ProbeTarget, config +from .ip_utils import is_ipv4, is_ipv6, is_ipv6_ll + +logger = get_logger(__file__) + + +class GenericMatterProber(ABC): + + def __init__(self, artifact_dir: str, dnssd_artifact_dir: str) -> None: + self.artifact_dir = artifact_dir + self.dnssd_artifact_dir = dnssd_artifact_dir + self.logger = logger + self.targets: [GenericMatterProber.ProbeTarget] = [] + self.output = os.path.join(self.artifact_dir, + create_standard_log_name("generic_probes", "txt")) + self.suffix = f"2>&1 | tee -a {self.output}" + + def run_command(self, cmd: str, capture_output=False) -> Bash: + cmd = f"{cmd} {self.suffix}" + self.logger.debug(cmd) + bash = Bash(cmd, sync=True, capture_output=capture_output) + bash.start_command() + return bash + + @abstractmethod + def probe_v4(self, target: ProbeTarget) -> None: + raise NotImplementedError + + @abstractmethod + def probe_v6(self, target: ProbeTarget) -> None: + raise NotImplementedError + + @abstractmethod + def probe_v6_ll(self, target: ProbeTarget) -> None: + raise NotImplementedError + + @abstractmethod + def discover_targets_by_neighbor(self) -> None: + raise NotImplementedError + + @abstractmethod + def get_general_details(self) -> None: + raise NotImplementedError + + def discover_targets_by_browsing(self) -> None: + browser = MatterDnssdListener(self.dnssd_artifact_dir) + asyncio.run(browser.browse_once(config.dnssd_browsing_time_seconds)) + for name in browser.discovered_matter_devices: + info: ServiceInfo = browser.discovered_matter_devices[name] + for addr in info.parsed_scoped_addresses(): + self.targets.append(ProbeTarget(name, addr, info.port)) + + def probe_single_target(self, target: ProbeTarget) -> None: + if is_ipv4(target.ip): + self.logger.debug(f"Probing v4 {target.ip}") + self.probe_v4(target) + elif is_ipv6_ll(target.ip): + self.logger.debug(f"Probing v6 ll {target.ip}") + self.probe_v6_ll(target) + elif is_ipv6(target.ip): + self.logger.debug(f"Probing v6 {target.ip}") + self.probe_v6(target) + + def probe_targets(self) -> None: + for target in self.targets: + self.logger.info(f"Probing target {target}") + self.probe_single_target(target) + + def probe(self) -> None: + self.discover_targets_by_browsing() + self.discover_targets_by_neighbor() + self.probe_targets() + self.get_general_details() diff --git a/src/tools/interop/idt/probe/runner.py b/src/tools/interop/idt/probe/runner.py new file mode 100644 index 00000000000000..ac373178a0ef69 --- /dev/null +++ b/src/tools/interop/idt/probe/runner.py @@ -0,0 +1,28 @@ +# +# 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. +# + +from utils.host_platform import is_mac + +from .linux import ProberLinuxHost +from .mac import ProberMacHost + + +def run_probes(artifact_dir: str, dnssd_dir: str) -> None: + if is_mac(): + ProberMacHost(artifact_dir, dnssd_dir).probe() + else: + ProberLinuxHost(artifact_dir, dnssd_dir).probe() diff --git a/src/tools/interop/idt/requirements.txt b/src/tools/interop/idt/requirements.txt index fa7d89f7cd3206..dac2cdf0b7cae5 100644 --- a/src/tools/interop/idt/requirements.txt +++ b/src/tools/interop/idt/requirements.txt @@ -1,3 +1,4 @@ zeroconf==0.74.0 bleak==0.21.1 -mobly==1.12.2 +psutil==5.9.6 +termcolor==2.3.0 diff --git a/src/tools/interop/idt/scripts/alias.sh b/src/tools/interop/idt/scripts/alias.sh index 9ecbc869e4ab78..e7b598bc3de5da 100644 --- a/src/tools/interop/idt/scripts/alias.sh +++ b/src/tools/interop/idt/scripts/alias.sh @@ -41,6 +41,8 @@ alias idt_vars="idt_go && source idt/scripts/vars.sh" alias idt_clean_artifacts="idt_go && source idt/scripts/clean_artifacts.sh" alias idt_clean_all="idt_go && source idt/scripts/clean_all.sh" alias idt_create_vars="idt_go && source idt/scripts/create_vars.sh" +alias idt_check_child="idt_go && source idt/scripts/check_child.sh" +alias idt_clean_child="idt_go && source idt/scripts/clean_child.sh" alias idt="idt_go && \ if [ -z $PYTHONPYCACHEPREFIX ]; then export PYTHONPYCACHEPREFIX=$IDT_SRC_PARENT/idt/pycache; fi && \ diff --git a/src/tools/interop/idt/scripts/check_child.sh b/src/tools/interop/idt/scripts/check_child.sh new file mode 100644 index 00000000000000..8a54cd2e65f6db --- /dev/null +++ b/src/tools/interop/idt/scripts/check_child.sh @@ -0,0 +1,18 @@ +# +# 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. +# + +sudo ps -axf | grep -E "(tcpd|adb)" diff --git a/src/tools/interop/idt/scripts/clean_all.sh b/src/tools/interop/idt/scripts/clean_all.sh index 94b9521cfbc92a..d7703ab29d57cc 100644 --- a/src/tools/interop/idt/scripts/clean_all.sh +++ b/src/tools/interop/idt/scripts/clean_all.sh @@ -16,7 +16,8 @@ # cd idt -rm -R venv/ -rm -R pycache/ +sudo rm -R venv/ +sudo rm -R pycache/ sudo rm -R IDT_ARTIFACTS/ +sudo find . -type d -name "BUILD" -delete cd .. diff --git a/src/tools/interop/idt/scripts/clean_child.sh b/src/tools/interop/idt/scripts/clean_child.sh new file mode 100644 index 00000000000000..fc4b2e21e438d0 --- /dev/null +++ b/src/tools/interop/idt/scripts/clean_child.sh @@ -0,0 +1,19 @@ +# +# 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. +# + +sudo killall tcpdump +sudo killall adb diff --git a/src/tools/interop/idt/scripts/compilers.sh b/src/tools/interop/idt/scripts/compilers.sh new file mode 100644 index 00000000000000..ee50284fd6f489 --- /dev/null +++ b/src/tools/interop/idt/scripts/compilers.sh @@ -0,0 +1,21 @@ +# +# 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. +# + +sudo apt-get install gcc-arm-linux-gnueabi +sudo apt-get install gcc-aarch64-linux-gnu +sudo apt-get install byacc +sudo apt-get install flex diff --git a/src/tools/interop/idt/utils/__init__.py b/src/tools/interop/idt/utils/__init__.py new file mode 100644 index 00000000000000..43ab9acb8a5558 --- /dev/null +++ b/src/tools/interop/idt/utils/__init__.py @@ -0,0 +1,25 @@ +# +# 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. +# + +from . import artifact, host_platform, log, shell + +__all__ = [ + 'artifact', + 'host_platform', + 'log', + 'shell', +] diff --git a/src/tools/interop/idt/capture/file_utils.py b/src/tools/interop/idt/utils/artifact.py similarity index 61% rename from src/tools/interop/idt/capture/file_utils.py rename to src/tools/interop/idt/utils/artifact.py index 29aabfe6133193..8749b1ab84880b 100644 --- a/src/tools/interop/idt/capture/file_utils.py +++ b/src/tools/interop/idt/utils/artifact.py @@ -15,14 +15,13 @@ # limitations under the License. # +import os import time from pathlib import Path -from typing import TextIO +from . import log -def add_border(to_print: str) -> str: - """Add star borders to important strings""" - return '\n' + '*' * len(to_print) + '\n' + to_print +logger = log.get_logger(__file__) def create_file_timestamp() -> str: @@ -30,23 +29,11 @@ def create_file_timestamp() -> str: return time.strftime("%Y%m%d_%H%M%S") -def create_standard_log_name(name: str, ext: str) -> str: +def create_standard_log_name(name: str, ext: str, parent: str = "") -> str: """Returns the name argument wrapped as a standard log name""" ts = create_file_timestamp() - return f'idt_{ts}_{name}.{ext}' + return os.path.join(parent, f'idt_{ts}_{name}.{ext}') def safe_mkdir(dir_name: str) -> None: Path(dir_name).mkdir(parents=True, exist_ok=True) - - -def print_and_write(to_print: str, file: TextIO) -> None: - print(to_print) - file.write(to_print) - - -def border_print(to_print: str, important: bool = False) -> None: - len_borders = 64 - border = f"\n{'_' * len_borders}\n" - i_border = f"\n{'!' * len_borders}\n" if important else "" - print(f"{border}{i_border}{to_print}{i_border}{border}") diff --git a/src/tools/interop/idt/utils/host_platform.py b/src/tools/interop/idt/utils/host_platform.py new file mode 100644 index 00000000000000..fd6425666104d9 --- /dev/null +++ b/src/tools/interop/idt/utils/host_platform.py @@ -0,0 +1,90 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import os +import platform as host_platform +import sys + +from utils import log +from utils.log import border_print +from utils.shell import Bash + +import config + +logger = log.get_logger(__file__) + + +def is_mac(): + p = host_platform.platform().lower() + return "darwin" in p or "mac" in p + + +def get_ll_interface(): + # TODO: Makes too many assumptions + if is_mac(): + return "en0" + net_interface_path = "/sys/class/net/" + available_net_interfaces = os.listdir(net_interface_path) \ + if os.path.exists(net_interface_path) \ + else [] + for interface in available_net_interfaces: + if "wl" in interface: + return interface + + +def get_available_interfaces(): + net_interface_path = "/sys/class/net/" + available_net_interfaces = os.listdir(net_interface_path) \ + if os.path.exists(net_interface_path) \ + else [] + available_net_interfaces.append("any") + return available_net_interfaces + + +def command_is_available(cmd_name) -> bool: + cmd = Bash(f"which {cmd_name}", sync=True, capture_output=True) + cmd.start_command() + return cmd.finished_success() + + +def verify_host_dependencies(deps: [str]) -> None: + if not command_is_available("which"): + # TODO: Check $PATH explicitly as well + logger.critical("which is required to verify host dependencies, exiting as its not available!") + sys.exit(1) + missing_deps = [] + for dep in deps: + logger.info(f"Verifying host dependency {dep}") + if not command_is_available(dep): + missing_deps.append(dep) + if missing_deps: + for missing_dep in missing_deps: + border_print(f"Missing dependency, please install {missing_dep}!", important=True) + sys.exit(1) + + +def verify_py_version() -> None: + py_version_major = sys.version_info[0] + py_version_minor = sys.version_info[1] + have = f"{py_version_major}.{py_version_minor}" + need = f"{config.py_major_version}.{config.py_minor_version}" + if not (py_version_major == config.py_major_version + and py_version_minor >= config.py_minor_version): + logger.critical( + f"IDT requires python >= {need} but you have {have}") + logger.critical("Please install the correct version, delete idt/venv, and re-run!") + sys.exit(1) diff --git a/src/tools/interop/idt/utils/log.py b/src/tools/interop/idt/utils/log.py new file mode 100644 index 00000000000000..73dc4e0d876f65 --- /dev/null +++ b/src/tools/interop/idt/utils/log.py @@ -0,0 +1,79 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +from typing import TextIO + +from termcolor import colored + +import config + +_CONFIG_LEVEL = config.log_level + +_FORMAT_PRE_FSTRING = "%(asctime)s %(levelname)s {%(module)s} [%(funcName)s] " +_FORMAT_PRE = colored(_FORMAT_PRE_FSTRING, "blue") if config.enable_color else _FORMAT_PRE_FSTRING +_FORMAT_POST = "%(message)s" +_FORMAT_NO_COLOR = _FORMAT_PRE_FSTRING+_FORMAT_POST + +FORMATS = { + logging.DEBUG: _FORMAT_PRE + colored(_FORMAT_POST, "blue"), + logging.INFO: _FORMAT_PRE + colored(_FORMAT_POST, "green"), + logging.WARNING: _FORMAT_PRE + colored(_FORMAT_POST, "yellow"), + logging.ERROR: _FORMAT_PRE + colored(_FORMAT_POST, "red", attrs=["bold"]), + logging.CRITICAL: _FORMAT_PRE + colored(_FORMAT_POST, "red", "on_yellow", attrs=["bold"]), +} + + +class LoggingFormatter(logging.Formatter): + + def format(self, record): + log_fmt = FORMATS.get(record.levelno) if config.enable_color else _FORMAT_NO_COLOR + formatter = logging.Formatter(log_fmt) + return formatter.format(record) + + +def get_logger(logger_name) -> logging.Logger: + logger = logging.getLogger(logger_name) + logger.setLevel(_CONFIG_LEVEL) + ch = logging.StreamHandler() + ch.setLevel(_CONFIG_LEVEL) + ch.setFormatter(LoggingFormatter()) + logger.addHandler(ch) + logger.propagate = False + return logger + + +def border_print(to_print: str, important: bool = False) -> None: + len_borders = len(to_print) + border = f"\n{'_' * len_borders}\n" + i_border = f"\n{'!' * len_borders}\n" if important else "" + to_print = f"{border}{i_border}{to_print}{i_border}{border}" + if config.enable_color: + to_print = colored(to_print, "magenta") + print(to_print) + + +def print_and_write(to_print: str, file: TextIO) -> None: + if config.enable_color: + print(colored(to_print, "green")) + else: + print(to_print) + file.write(to_print) + + +def add_border(to_print: str) -> str: + return '\n' + '*' * len(to_print) + '\n' + to_print diff --git a/src/tools/interop/idt/utils/shell.py b/src/tools/interop/idt/utils/shell.py new file mode 100644 index 00000000000000..e2b0d27a58d800 --- /dev/null +++ b/src/tools/interop/idt/utils/shell.py @@ -0,0 +1,122 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import multiprocessing +import shlex +import subprocess + +import psutil + +from . import log + +logger = log.get_logger(__file__) + + +class Bash: + + def __init__(self, command: str, sync: bool = False, + capture_output: bool = False, + cwd: str = None) -> None: + """ + Run a bash command as a sub process + :param command: Command to run + :param sync: If True, wait for command to terminate upon start_command() + :param capture_output: Only applies to sync; if True, store and suppress stdout and stderr + :param cwd: Set working directory of command + """ + self.logger = logger + self.command: str = command + self.sync = sync + self.capture_output = capture_output + self.cwd = cwd + + self.args: list[str] = [] + self._init_args() + self.proc: None | subprocess.CompletedProcess | subprocess.Popen = None + + def _init_args(self) -> None: + command_escaped = self.command.replace('"', '\"') + self.args = shlex.split(f'/bin/bash -c "{command_escaped}"') + + def command_is_running(self) -> bool: + return self.proc is not None and self.proc.poll() is None + + def get_captured_output(self) -> str: + return "" if not self.capture_output or not self.sync \ + else self.proc.stdout.decode().strip() + + def start_command(self) -> None: + if self.proc is None: + if self.sync: + self.proc = subprocess.run(self.args, capture_output=self.capture_output, cwd=self.cwd) + else: + self.proc = subprocess.Popen(self.args, cwd=self.cwd, stdin=subprocess.PIPE) + else: + self.logger.warning(f'"{self.command}" start requested more than once for same Bash instance!') + + def term_with_sudo(self, proc: multiprocessing.Process) -> None: + self.logger.debug(f"SIGTERM {proc.pid} with sudo") + Bash(f"sudo kill {proc.pid}", sync=True).start_command() + + def kill_with_sudo(self, proc: multiprocessing.Process) -> None: + self.logger.debug(f"SIGKILL {proc.pid} with sudo") + Bash(f"sudo kill -9 {proc.pid}", sync=True).start_command() + + def term(self, proc: multiprocessing.Process) -> None: + if "sudo" in self.command: + self.term_with_sudo(proc) + else: + proc.terminate() + + def kill(self, proc: multiprocessing.Process) -> None: + if "sudo" in self.command: + self.kill_with_sudo(proc) + else: + proc.kill() + + def stop_single_proc(self, proc: multiprocessing.Process) -> None: + self.logger.debug(f"Killing process {proc.pid}") + try: + self.logger.debug("Sending SIGTERM") + self.term(proc) + proc.wait(3) + except psutil.TimeoutExpired: + self.logger.error("SIGTERM timeout expired") + try: + self.logger.debug("Sending SIGKILL") + self.kill(proc) + proc.wait(3) + except psutil.TimeoutExpired: + self.logger.critical(f"SIGKILL timeout expired, could not kill pid {proc.pid}") + + def stop_command(self) -> None: + if self.command_is_running(): + psutil_proc = psutil.Process(self.proc.pid) + suffix = f"{psutil_proc.pid} for command {self.command}" + self.logger.debug(f"Stopping children of {suffix}") + for child_proc in psutil_proc.children(recursive=True): + self.stop_single_proc(child_proc) + self.logger.debug(f"Killing root proc {suffix}") + self.stop_single_proc(psutil_proc) + else: + self.logger.warning(f'{self.command} stop requested while not running') + + def finished_success(self) -> bool: + if not self.sync: + return not self.command_is_running() and self.proc.returncode == 0 + else: + return self.proc is not None and self.proc.returncode == 0 diff --git a/src/transport/BUILD.gn b/src/transport/BUILD.gn index f1f7ef534322a7..33a8f05f8c64df 100644 --- a/src/transport/BUILD.gn +++ b/src/transport/BUILD.gn @@ -60,7 +60,6 @@ static_library("transport") { "${chip_root}/src/crypto", "${chip_root}/src/inet", "${chip_root}/src/lib/core", - "${chip_root}/src/lib/core:chip_buildconfig", "${chip_root}/src/lib/dnssd", "${chip_root}/src/lib/support", "${chip_root}/src/platform", diff --git a/src/transport/GroupSession.h b/src/transport/GroupSession.h index bd3ab1931c2c7c..608bc78891b0e0 100644 --- a/src/transport/GroupSession.h +++ b/src/transport/GroupSession.h @@ -59,9 +59,9 @@ class IncomingGroupSession : public Session, public ReferenceCounted #include #include +#include #include namespace chip { @@ -191,13 +192,15 @@ class Session virtual bool IsActiveSession() const = 0; - virtual ScopedNodeId GetPeer() const = 0; - virtual ScopedNodeId GetLocalScopedNodeId() const = 0; - virtual Access::SubjectDescriptor GetSubjectDescriptor() const = 0; - virtual bool RequireMRP() const = 0; - virtual const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const = 0; - virtual System::Clock::Timestamp GetMRPBaseTimeout() const = 0; - virtual System::Clock::Milliseconds32 GetAckTimeout() const = 0; + virtual ScopedNodeId GetPeer() const = 0; + virtual ScopedNodeId GetLocalScopedNodeId() const = 0; + virtual Access::SubjectDescriptor GetSubjectDescriptor() const = 0; + virtual bool RequireMRP() const = 0; + virtual const SessionParameters & GetRemoteSessionParameters() const = 0; + virtual System::Clock::Timestamp GetMRPBaseTimeout() const = 0; + virtual System::Clock::Milliseconds32 GetAckTimeout() const = 0; + + const ReliableMessageProtocolConfig & GetRemoteMRPConfig() const { return GetRemoteSessionParameters().GetMRPConfig(); } // Returns a suggested timeout value based on the round-trip time it takes for the peer at the other end of the session to // receive a message, process it and send it back. This is computed based on the session type, the type of transport, sleepy diff --git a/src/transport/TraceMessage.h b/src/transport/TraceMessage.h index d2be9478c53408..943c9c6d7de0c5 100644 --- a/src/transport/TraceMessage.h +++ b/src/transport/TraceMessage.h @@ -18,7 +18,7 @@ #pragma once -#include +#include #include #include #include diff --git a/src/transport/UnauthenticatedSessionTable.h b/src/transport/UnauthenticatedSessionTable.h index 1a698db312d52e..9b6d3e30e4f9fb 100644 --- a/src/transport/UnauthenticatedSessionTable.h +++ b/src/transport/UnauthenticatedSessionTable.h @@ -49,7 +49,7 @@ class UnauthenticatedSession : public Session, public ReferenceCounted; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Scenes::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Scenes::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace SceneCount + namespace CurrentScene { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) @@ -6765,6 +6796,211 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace Timer +namespace OvenMode { +namespace Attributes { + +namespace CurrentMode { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace CurrentMode + +namespace StartUpMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace StartUpMode + +namespace OnMode { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OnMode + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::OvenMode::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + namespace ModeSelect { namespace Attributes { @@ -8948,18 +9184,49 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace DemandResponseLoadControl { +namespace BooleanSensorConfiguration { namespace Attributes { -namespace DeviceClass { +namespace SensitivityLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace SensitivityLevel + +namespace AlarmsActive { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value) + chip::BitMask * value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -8968,9 +9235,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits>; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -8978,10 +9245,702 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace AlarmsSuppressed + +namespace AlarmsEnabled { + +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace AlarmsEnabled + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::BooleanSensorConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { +namespace Attributes { + +namespace OpenDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OpenDuration + +namespace AutoCloseTime { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace AutoCloseTime + +namespace RemainingDuration { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace RemainingDuration + +namespace CurrentState { + +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace CurrentState + +namespace TargetState { + +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace TargetState + +namespace StartUpState { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace StartUpState + +namespace CurrentLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace CurrentLevel + +namespace TargetLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace TargetLevel + +namespace OpenLevel { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (Traits::IsNullValue(temp)) + { + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); + } + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + +} // namespace OpenLevel + +namespace ValveFault { + +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); +} + +} // namespace ValveFault + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ValveConfigurationAndControl + +namespace DemandResponseLoadControl { +namespace Attributes { namespace NumberOfLoadControlPrograms { @@ -9045,7 +10004,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace NumberOfEventsPerProgram -namespace NumberOfTransistions { +namespace NumberOfTransitions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { @@ -9074,7 +10033,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace NumberOfTransistions +} // namespace NumberOfTransitions namespace DefaultRandomStart { 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 9281745811e65f..0f91b735ca128b 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 @@ -84,6 +84,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace Scenes { namespace Attributes { +namespace SceneCount { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace SceneCount + namespace CurrentScene { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); @@ -1313,6 +1318,41 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace Timer +namespace OvenMode { +namespace Attributes { + +namespace CurrentMode { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace CurrentMode + +namespace StartUpMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace StartUpMode + +namespace OnMode { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OnMode + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + namespace ModeSelect { namespace Attributes { @@ -1751,15 +1791,137 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace DemandResponseLoadControl { +namespace BooleanSensorConfiguration { +namespace Attributes { + +namespace SensitivityLevel { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum * value); // SensitivityEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value); +} // namespace SensitivityLevel + +namespace AlarmsActive { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsActive + +namespace AlarmsSuppressed { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsSuppressed + +namespace AlarmsEnabled { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // AlarmModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace AlarmsEnabled + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { namespace Attributes { -namespace DeviceClass { +namespace OpenDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OpenDuration + +namespace AutoCloseTime { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace AutoCloseTime + +namespace RemainingDuration { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace RemainingDuration + +namespace CurrentState { +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // ValveStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace CurrentState + +namespace TargetState { +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable & value); // ValveStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value); +} // namespace TargetState + +namespace StartUpState { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum * value); // ValveStateEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); +} // namespace StartUpState + +namespace CurrentLevel { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace CurrentLevel + +namespace TargetLevel { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace TargetLevel + +namespace OpenLevel { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace OpenLevel + +namespace ValveFault { EmberAfStatus Get(chip::EndpointId endpoint, - chip::BitMask * value); // DeviceClassBitmap + chip::BitMask * value); // ValveFaultBitmap EmberAfStatus Set(chip::EndpointId endpoint, - chip::BitMask value); -} // namespace DeviceClass + chip::BitMask value); +} // namespace ValveFault + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ValveConfigurationAndControl + +namespace DemandResponseLoadControl { +namespace Attributes { namespace NumberOfLoadControlPrograms { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u @@ -1771,10 +1933,10 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfEventsPerProgram -namespace NumberOfTransistions { +namespace NumberOfTransitions { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace NumberOfTransistions +} // namespace NumberOfTransitions namespace DefaultRandomStart { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index c3e928f001d2b5..fab93d0eaba421 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -369,6 +369,14 @@ void emberAfIcdManagementClusterInitCallback(chip::EndpointId endpoint); */ void emberAfTimerClusterInitCallback(chip::EndpointId endpoint); +/** @brief Oven Mode Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterInitCallback(chip::EndpointId endpoint); + /** @brief Mode Select Cluster Init * * Cluster Init @@ -513,6 +521,22 @@ void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); */ void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId endpoint); +/** @brief Boolean Sensor Configuration Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBooleanSensorConfigurationClusterInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterInitCallback(chip::EndpointId endpoint); + /** @brief Demand Response Load Control Cluster Init * * Cluster Init @@ -4088,6 +4112,84 @@ void emberAfTimerClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfTimerClusterClientTickCallback(chip::EndpointId endpoint); +// +// Oven Mode Cluster +// + +/** @brief Oven Mode Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterOvenModeClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfOvenModeClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterOvenModeClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Oven Mode Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterOvenModeClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Mode Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterOvenModeClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Oven Mode Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenModeClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Oven Mode Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfOvenModeClusterClientTickCallback(chip::EndpointId endpoint); + // // Mode Select Cluster // @@ -5482,6 +5584,159 @@ void emberAfActivatedCarbonFilterMonitoringClusterServerTickCallback(chip::Endpo */ void emberAfActivatedCarbonFilterMonitoringClusterClientTickCallback(chip::EndpointId endpoint); +// +// Boolean Sensor Configuration Cluster +// + +/** @brief Boolean Sensor Configuration Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBooleanSensorConfigurationClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Boolean Sensor Configuration Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterBooleanSensorConfigurationClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Boolean Sensor Configuration Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfBooleanSensorConfigurationClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Boolean Sensor Configuration Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterBooleanSensorConfigurationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Boolean Sensor Configuration Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterBooleanSensorConfigurationClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Boolean Sensor Configuration Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterBooleanSensorConfigurationClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Boolean Sensor Configuration Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBooleanSensorConfigurationClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Boolean Sensor Configuration Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfBooleanSensorConfigurationClusterClientTickCallback(chip::EndpointId endpoint); + +// +// Valve Configuration and Control Cluster +// + +/** @brief Valve Configuration and Control Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterValveConfigurationAndControlClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfValveConfigurationAndControlClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterValveConfigurationAndControlClusterServerAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Valve Configuration and Control Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterValveConfigurationAndControlClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Valve Configuration and Control Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status MatterValveConfigurationAndControlClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Valve Configuration and Control Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfValveConfigurationAndControlClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Valve Configuration and Control Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfValveConfigurationAndControlClusterClientTickCallback(chip::EndpointId endpoint); + // // Demand Response Load Control Cluster // @@ -9189,6 +9444,12 @@ bool emberAfTimerClusterAddTimeCallback(chip::app::CommandHandler * commandObj, bool emberAfTimerClusterReduceTimeCallback(chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Timer::Commands::ReduceTime::DecodableType & commandData); +/** + * @brief Oven Mode Cluster ChangeToMode Command callback (from client) + */ +bool emberAfOvenModeClusterChangeToModeCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::OvenMode::Commands::ChangeToMode::DecodableType & commandData); /** * @brief Mode Select Cluster ChangeToMode Command callback (from client) */ @@ -9231,6 +9492,30 @@ bool emberAfMicrowaveOvenControlClusterSetCookingParametersCallback( bool emberAfMicrowaveOvenControlClusterAddMoreTimeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::DecodableType & commandData); +/** + * @brief Boolean Sensor Configuration Cluster SuppressRequest Command callback (from client) + */ +bool emberAfBooleanSensorConfigurationClusterSuppressRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::DecodableType & commandData); +/** + * @brief Valve Configuration and Control Cluster Open Command callback (from client) + */ +bool emberAfValveConfigurationAndControlClusterOpenCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::DecodableType & commandData); +/** + * @brief Valve Configuration and Control Cluster Close Command callback (from client) + */ +bool emberAfValveConfigurationAndControlClusterCloseCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::DecodableType & commandData); +/** + * @brief Valve Configuration and Control Cluster SetLevel Command callback (from client) + */ +bool emberAfValveConfigurationAndControlClusterSetLevelCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::DecodableType & commandData); /** * @brief Demand Response Load Control Cluster RegisterLoadControlProgramRequest Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 12aa4e979eced3..ee48a35d7b0231 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -982,9 +982,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnost using EnumType = EthernetNetworkDiagnostics::PHYRateEnum; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kRate10M: case EnumType::kRate100M: case EnumType::kRate1G: @@ -995,18 +992,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(EthernetNetworkDiagnost case EnumType::kRate100G: case EnumType::kRate200G: case EnumType::kRate400G: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_PHY_RATE_ENUM_RATE10_M: - case EMBER_ZCL_PHY_RATE_ENUM_RATE100_M: - case EMBER_ZCL_PHY_RATE_ENUM_RATE1_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE5_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE10_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE40_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE100_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE200_G: - case EMBER_ZCL_PHY_RATE_ENUM_RATE400_G: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(10); @@ -1216,6 +1201,26 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Timer::TimerStatusEnum } } +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenMode::ModeTag val) +{ + using EnumType = OvenMode::ModeTag; + switch (val) + { + case EnumType::kBake: + case EnumType::kConvection: + case EnumType::kGrill: + case EnumType::kRoast: + case EnumType::kClean: + case EnumType::kConvectionBake: + case EnumType::kConvectionRoast: + case EnumType::kWarming: + case EnumType::kProofing: + return val; + default: + return static_cast(0); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherControls::NumberOfRinsesEnum val) { using EnumType = LaundryWasherControls::NumberOfRinsesEnum; @@ -1457,6 +1462,33 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ActivatedCarbonFilterMo } } +static auto __attribute__((unused)) EnsureKnownEnumValue(BooleanSensorConfiguration::SensitivityEnum val) +{ + using EnumType = BooleanSensorConfiguration::SensitivityEnum; + switch (val) + { + case EnumType::kHigh: + case EnumType::kStandard: + case EnumType::kLow: + return val; + default: + return static_cast(3); + } +} + +static auto __attribute__((unused)) EnsureKnownEnumValue(ValveConfigurationAndControl::ValveStateEnum val) +{ + using EnumType = ValveConfigurationAndControl::ValveStateEnum; + switch (val) + { + case EnumType::kOpen: + case EnumType::kClosed: + return val; + default: + return static_cast(2); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::CriticalityLevelEnum val) { using EnumType = DemandResponseLoadControl::CriticalityLevelEnum; @@ -1525,19 +1557,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadContr return static_cast(13); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(DemandResponseLoadControl::PowerSavingsEnum val) -{ - using EnumType = DemandResponseLoadControl::PowerSavingsEnum; - switch (val) - { - case EnumType::kLow: - case EnumType::kMedium: - case EnumType::kHigh: - return val; - default: - return static_cast(3); - } -} static auto __attribute__((unused)) EnsureKnownEnumValue(DoorLock::AlarmCodeEnum val) { @@ -2154,17 +2173,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ColorControl::ColorMode using EnumType = ColorControl::ColorMode; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM case EnumType::kCurrentHueAndCurrentSaturation: case EnumType::kCurrentXAndCurrentY: case EnumType::kColorTemperature: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION: - case EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y: - case EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM return val; default: return static_cast(3); @@ -2828,9 +2839,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(MediaInput::InputTypeEn } } -static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::CecKeyCode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(KeypadInput::CECKeyCodeEnum val) { - using EnumType = KeypadInput::CecKeyCode; + using EnumType = KeypadInput::CECKeyCodeEnum; switch (val) { case EnumType::kSelect: diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 09296a46c2d8ca..d1be2c4dd4e836 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -21,8 +21,6 @@ #include -#include - namespace chip { namespace app { namespace Clusters { @@ -1198,9 +1196,6 @@ enum class Feature : uint32_t namespace EthernetNetworkDiagnostics { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for PHYRateEnum enum class PHYRateEnum : uint8_t { @@ -1220,10 +1215,6 @@ enum class PHYRateEnum : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 10, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using PHYRateEnum = EmberAfPHYRateEnum; -static PHYRateEnum __attribute__((unused)) kPHYRateEnumkUnknownEnumValue = static_cast(10); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Bitmap for Feature enum class Feature : uint32_t @@ -1533,6 +1524,34 @@ enum class Feature : uint32_t }; } // namespace Timer +namespace OvenMode { + +// Enum for ModeTag +enum class ModeTag : uint16_t +{ + kBake = 0x4000, + kConvection = 0x4001, + kGrill = 0x4002, + kRoast = 0x4003, + kClean = 0x4004, + kConvectionBake = 0x4005, + kConvectionRoast = 0x4006, + kWarming = 0x4007, + kProofing = 0x4008, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kOnOff = 0x1, +}; +} // namespace OvenMode + namespace ModeSelect { // Bitmap for Feature @@ -2056,6 +2075,68 @@ enum class Feature : uint32_t }; } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanSensorConfiguration { + +// Enum for SensitivityEnum +enum class SensitivityEnum : uint8_t +{ + kHigh = 0x00, + kStandard = 0x01, + kLow = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Bitmap for AlarmModeBitmap +enum class AlarmModeBitmap : uint8_t +{ + kVisual = 0x1, + kAudible = 0x2, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kVisual = 0x1, + kAudible = 0x2, + kAlarmSuppress = 0x4, + kSensitivityLevel = 0x8, +}; +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { + +// Enum for ValveStateEnum +enum class ValveStateEnum : uint8_t +{ + kOpen = 0x00, + kClosed = 0x01, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kTimeSync = 0x1, + kLevel = 0x2, +}; + +// Bitmap for ValveFaultBitmap +enum class ValveFaultBitmap : uint16_t +{ + kGeneralFault = 0x1, + kBlocked = 0x2, + kLeaking = 0x4, +}; +} // namespace ValveConfigurationAndControl + namespace DemandResponseLoadControl { // Enum for CriticalityLevelEnum @@ -2126,19 +2207,6 @@ enum class LoadControlEventStatusEnum : uint8_t kUnknownEnumValue = 13, }; -// Enum for PowerSavingsEnum -enum class PowerSavingsEnum : uint8_t -{ - kLow = 0x00, - kMedium = 0x01, - kHigh = 0x02, - // All received enum values that are not listed above will be mapped - // to kUnknownEnumValue. This is a helper enum value that should only - // be used by code to process how it handles receiving and unknown - // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, -}; - // Bitmap for CancelControlBitmap enum class CancelControlBitmap : uint16_t { @@ -3145,9 +3213,6 @@ enum class ColorLoopDirection : uint8_t kUnknownEnumValue = 2, }; -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ColorMode enum class ColorMode : uint8_t { @@ -3160,10 +3225,6 @@ enum class ColorMode : uint8_t // enum value. This specific should never be transmitted. kUnknownEnumValue = 3, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using ColorMode = EmberAfColorMode; -static ColorMode __attribute__((unused)) kColorModekUnknownEnumValue = static_cast(3); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for HueDirection enum class HueDirection : uint8_t @@ -4063,8 +4124,8 @@ namespace LowPower {} // namespace LowPower namespace KeypadInput { -// Enum for CecKeyCode -enum class CecKeyCode : uint8_t +// Enum for CECKeyCodeEnum +enum class CECKeyCodeEnum : uint8_t { kSelect = 0x00, kUp = 0x01, diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 428f781aaf164c..3886bbcb25c7a9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -924,6 +924,93 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } // namespace ExtensionFieldSet + +namespace SceneInfoStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + return DoEncode(aWriter, aTag, NullOptional); +} + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +{ + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); +} + +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const +{ + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + encoder.Encode(to_underlying(Fields::kSceneCount), sceneCount); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentScene), currentScene); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCurrentGroup), currentGroup); + } + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kSceneValid), sceneValid); + } + encoder.Encode(to_underlying(Fields::kRemainingCapacity), remainingCapacity); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kSceneCount)) + { + err = DataModel::Decode(reader, sceneCount); + } + else if (__context_tag == to_underlying(Fields::kCurrentScene)) + { + err = DataModel::Decode(reader, currentScene); + } + else if (__context_tag == to_underlying(Fields::kCurrentGroup)) + { + err = DataModel::Decode(reader, currentGroup); + } + else if (__context_tag == to_underlying(Fields::kSceneValid)) + { + err = DataModel::Decode(reader, sceneValid); + } + else if (__context_tag == to_underlying(Fields::kRemainingCapacity)) + { + err = DataModel::Decode(reader, remainingCapacity); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace SceneInfoStruct } // namespace Structs namespace Commands { @@ -1804,8 +1891,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, lastConfiguredBy); case Attributes::SceneTableSize::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, sceneTableSize); - case Attributes::RemainingCapacity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, remainingCapacity); + case Attributes::FabricSceneInfo::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, fabricSceneInfo); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -4099,6 +4186,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, capabilityMinima); case Attributes::ProductAppearance::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, productAppearance); + case Attributes::SpecificationVersion::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, specificationVersion); + case Attributes::MaxPathsPerInvoke::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxPathsPerInvoke); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -10588,6 +10679,40 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace StayActiveRequest. +namespace StayActiveResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPromisedActiveDuration), promisedActiveDuration); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kPromisedActiveDuration)) + { + err = DataModel::Decode(reader, promisedActiveDuration); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StayActiveResponse. } // namespace Commands namespace Attributes { @@ -10791,6 +10916,119 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace Timer +namespace OvenMode { +namespace Structs {} // namespace Structs + +namespace Commands { +namespace ChangeToMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kNewMode), newMode); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kNewMode)) + { + err = DataModel::Decode(reader, newMode); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeToMode. +namespace ChangeToModeResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kStatus), status); + encoder.Encode(to_underlying(Fields::kStatusText), statusText); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kStatus)) + { + err = DataModel::Decode(reader, status); + } + else if (__context_tag == to_underlying(Fields::kStatusText)) + { + err = DataModel::Decode(reader, statusText); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ChangeToModeResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SupportedModes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedModes); + case Attributes::CurrentMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentMode); + case Attributes::StartUpMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpMode); + case Attributes::OnMode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, onMode); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events {} // namespace Events + +} // namespace OvenMode namespace ModeSelect { namespace Structs { @@ -13138,14 +13376,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace ActivatedCarbonFilterMonitoring -namespace DemandResponseLoadControl { -namespace Structs { +namespace BooleanSensorConfiguration { -namespace HeatingSourceControlStruct { +namespace Commands { +namespace SuppressRequest { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kHeatingSource), heatingSource); + encoder.Encode(to_underlying(Fields::kAlarmsToSuppress), alarmsToSuppress); return encoder.Finalize(); } @@ -13163,9 +13401,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kHeatingSource)) + if (__context_tag == to_underlying(Fields::kAlarmsToSuppress)) { - err = DataModel::Decode(reader, heatingSource); + err = DataModel::Decode(reader, alarmsToSuppress); } else { @@ -13174,15 +13412,49 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace SuppressRequest. +} // namespace Commands -} // namespace HeatingSourceControlStruct +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::SensitivityLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, sensitivityLevel); + case Attributes::AlarmsActive::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsActive); + case Attributes::AlarmsSuppressed::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsSuppressed); + case Attributes::AlarmsEnabled::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, alarmsEnabled); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes -namespace PowerSavingsControlStruct { +namespace Events { +namespace AlarmsStateChanged { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPowerSavings), powerSavings); - return encoder.Finalize(); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmsActive), alarmsActive)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmsSuppressed), alarmsSuppressed)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13199,9 +13471,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kPowerSavings)) + if (__context_tag == to_underlying(Fields::kAlarmsActive)) { - err = DataModel::Decode(reader, powerSavings); + err = DataModel::Decode(reader, alarmsActive); + } + else if (__context_tag == to_underlying(Fields::kAlarmsSuppressed)) + { + err = DataModel::Decode(reader, alarmsSuppressed); } else { @@ -13210,9 +13486,321 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace PowerSavingsControlStruct - +} // namespace AlarmsStateChanged. +namespace SensorFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace SensorFault. +} // namespace Events + +} // namespace BooleanSensorConfiguration +namespace ValveConfigurationAndControl { + +namespace Commands { +namespace Open { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kOpenDuration), openDuration); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kOpenDuration)) + { + err = DataModel::Decode(reader, openDuration); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace Open. +namespace Close { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace Close. +namespace SetLevel { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kLevel), level); + encoder.Encode(to_underlying(Fields::kOpenDuration), openDuration); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kLevel)) + { + err = DataModel::Decode(reader, level); + } + else if (__context_tag == to_underlying(Fields::kOpenDuration)) + { + err = DataModel::Decode(reader, openDuration); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetLevel. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::OpenDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, openDuration); + case Attributes::AutoCloseTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, autoCloseTime); + case Attributes::RemainingDuration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, remainingDuration); + case Attributes::CurrentState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentState); + case Attributes::TargetState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetState); + case Attributes::StartUpState::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, startUpState); + case Attributes::CurrentLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentLevel); + case Attributes::TargetLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, targetLevel); + case Attributes::OpenLevel::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, openLevel); + case Attributes::ValveFault::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, valveFault); + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, generatedCommandList); + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, acceptedCommandList); + case Attributes::EventList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, eventList); + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, attributeList); + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, featureMap); + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, clusterRevision); + default: + return CHIP_NO_ERROR; + } +} +} // namespace Attributes + +namespace Events { +namespace ValveStateChanged { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValveState), valveState)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kValveState)) + { + err = DataModel::Decode(reader, valveState); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ValveStateChanged. +namespace ValveFault { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kValveFault), valveFault)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kValveFault)) + { + err = DataModel::Decode(reader, valveFault); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace ValveFault. +} // namespace Events + +} // namespace ValveConfigurationAndControl +namespace DemandResponseLoadControl { +namespace Structs { + +namespace HeatingSourceControlStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kHeatingSource), heatingSource); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kHeatingSource)) + { + err = DataModel::Decode(reader, heatingSource); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace HeatingSourceControlStruct + +namespace PowerSavingsControlStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPowerSavings), powerSavings); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kPowerSavings)) + { + err = DataModel::Decode(reader, powerSavings); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace PowerSavingsControlStruct + namespace DutyCycleControlStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -13699,8 +14287,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::DeviceClass::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, deviceClass); case Attributes::LoadControlPrograms::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, loadControlPrograms); case Attributes::NumberOfLoadControlPrograms::TypeInfo::GetAttributeId(): @@ -13711,8 +14297,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, activeEvents); case Attributes::NumberOfEventsPerProgram::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, numberOfEventsPerProgram); - case Attributes::NumberOfTransistions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, numberOfTransistions); + case Attributes::NumberOfTransitions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfTransitions); case Attributes::DefaultRandomStart::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, defaultRandomStart); case Attributes::DefaultRandomDuration::TypeInfo::GetAttributeId(): @@ -24021,6 +24607,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::OvenMode::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::ModeSelect::Id: { switch (aCommand) { @@ -24119,6 +24712,20 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::BooleanSensorConfiguration::Id: { + switch (aCommand) + { + default: + return false; + } + } + case Clusters::ValveConfigurationAndControl::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::DemandResponseLoadControl::Id: { switch (aCommand) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index fe3f44d048064c..e83a7388300b43 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -19,7 +19,6 @@ #pragma once -#include #include #include #include @@ -967,6 +966,45 @@ struct DecodableType }; } // namespace ExtensionFieldSet +namespace SceneInfoStruct { +enum class Fields : uint8_t +{ + kSceneCount = 0, + kCurrentScene = 1, + kCurrentGroup = 2, + kSceneValid = 3, + kRemainingCapacity = 4, + kFabricIndex = 254, +}; + +struct Type +{ +public: + uint8_t sceneCount = static_cast(0); + uint8_t currentScene = static_cast(0); + chip::GroupId currentGroup = static_cast(0); + bool sceneValid = static_cast(0); + uint8_t remainingCapacity = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = true; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } + + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; + +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; +}; + +using DecodableType = Type; + +} // namespace SceneInfoStruct } // namespace Structs namespace Commands { @@ -1892,18 +1930,19 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SceneTableSize -namespace RemainingCapacity { +namespace FabricSceneInfo { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemainingCapacity::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FabricSceneInfo::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RemainingCapacity +} // namespace FabricSceneInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -1956,8 +1995,8 @@ struct TypeInfo Attributes::NameSupport::TypeInfo::DecodableType nameSupport = static_cast>(0); Attributes::LastConfiguredBy::TypeInfo::DecodableType lastConfiguredBy; - Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); - Attributes::RemainingCapacity::TypeInfo::DecodableType remainingCapacity = static_cast(0); + Attributes::SceneTableSize::TypeInfo::DecodableType sceneTableSize = static_cast(0); + Attributes::FabricSceneInfo::TypeInfo::DecodableType fabricSceneInfo; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -5026,6 +5065,30 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ProductAppearance +namespace SpecificationVersion { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpecificationVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SpecificationVersion +namespace MaxPathsPerInvoke { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::BasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPathsPerInvoke::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxPathsPerInvoke namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -5092,6 +5155,8 @@ struct TypeInfo Attributes::UniqueID::TypeInfo::DecodableType uniqueID; Attributes::CapabilityMinima::TypeInfo::DecodableType capabilityMinima; Attributes::ProductAppearance::TypeInfo::DecodableType productAppearance; + Attributes::SpecificationVersion::TypeInfo::DecodableType specificationVersion = static_cast(0); + Attributes::MaxPathsPerInvoke::TypeInfo::DecodableType maxPathsPerInvoke = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14059,6 +14124,11 @@ struct Type; struct DecodableType; } // namespace StayActiveRequest +namespace StayActiveResponse { +struct Type; +struct DecodableType; +} // namespace StayActiveResponse + } // namespace Commands namespace Commands { @@ -14184,7 +14254,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14198,6 +14268,38 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StayActiveRequest +namespace StayActiveResponse { +enum class Fields : uint8_t +{ + kPromisedActiveDuration = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + uint32_t promisedActiveDuration = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + + uint32_t promisedActiveDuration = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace StayActiveResponse } // namespace Commands namespace Attributes { @@ -14615,91 +14717,76 @@ struct TypeInfo }; } // namespace Attributes } // namespace Timer -namespace ModeSelect { +namespace OvenMode { namespace Structs { -namespace SemanticTagStruct { -enum class Fields : uint8_t -{ - kMfgCode = 0, - kValue = 1, -}; - -struct Type -{ -public: - chip::VendorId mfgCode = static_cast(0); - uint16_t value = static_cast(0); +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs - CHIP_ERROR Decode(TLV::TLVReader & reader); +namespace Commands { +// Forward-declarations so we can reference these later. - static constexpr bool kIsFabricScoped = false; +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse -using DecodableType = Type; +} // namespace Commands -} // namespace SemanticTagStruct -namespace ModeOptionStruct { +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { - kLabel = 0, - kMode = 1, - kSemanticTags = 2, + kNewMode = 0, }; struct Type { public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::List semanticTags; + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - static constexpr bool kIsFabricScoped = false; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - chip::CharSpan label; - uint8_t mode = static_cast(0); - DataModel::DecodableList semanticTags; + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); - - static constexpr bool kIsFabricScoped = false; }; - -} // namespace ModeOptionStruct -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -} // namespace Commands - -namespace Commands { -namespace ChangeToMode { +}; // namespace ChangeToMode +namespace ChangeToModeResponse { enum class Fields : uint8_t { - kNewMode = 0, + kStatus = 0, + kStatusText = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - uint8_t newMode = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14711,52 +14798,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - uint8_t newMode = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { -namespace Description { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 64; } -}; -} // namespace Description -namespace StandardNamespace { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StandardNamespace::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StandardNamespace namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; + chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14768,7 +14831,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14780,7 +14843,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14792,7 +14855,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14800,37 +14863,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } }; } // namespace ClusterRevision @@ -14838,12 +14901,10 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Description::TypeInfo::DecodableType description; - Attributes::StandardNamespace::TypeInfo::DecodableType standardNamespace; Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; @@ -14857,77 +14918,92 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ModeSelect -namespace LaundryWasherMode { +} // namespace OvenMode +namespace ModeSelect { namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -namespace ChangeToModeResponse { -struct Type; -struct DecodableType; -} // namespace ChangeToModeResponse - -} // namespace Commands - -namespace Commands { -namespace ChangeToMode { +namespace SemanticTagStruct { enum class Fields : uint8_t { - kNewMode = 0, + kMfgCode = 0, + kValue = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - - uint8_t newMode = static_cast(0); + chip::VendorId mfgCode = static_cast(0); + uint16_t value = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; + static constexpr bool kIsFabricScoped = false; - static constexpr bool MustUseTimedInvoke() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } +using DecodableType = Type; + +} // namespace SemanticTagStruct +namespace ModeOptionStruct { +enum class Fields : uint8_t +{ + kLabel = 0, + kMode = 1, + kSemanticTags = 2, +}; + +struct Type +{ +public: + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::List semanticTags; + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::DecodableList semanticTags; - uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { + +} // namespace ModeOptionStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { - kStatus = 0, - kStatusText = 1, + kNewMode = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t status = static_cast(0); - Optional statusText; + uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14939,28 +15015,52 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - uint8_t status = static_cast(0); - Optional statusText; + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToModeResponse +}; // namespace ChangeToMode } // namespace Commands namespace Attributes { +namespace Description { +struct TypeInfo +{ + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 64; } +}; +} // namespace Description +namespace StandardNamespace { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StandardNamespace::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StandardNamespace namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List; + using Type = chip::app::DataModel::List; using DecodableType = - chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14972,7 +15072,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14984,7 +15084,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14996,7 +15096,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15004,37 +15104,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace ClusterRevision @@ -15042,10 +15142,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::Description::TypeInfo::DecodableType description; + Attributes::StandardNamespace::TypeInfo::DecodableType standardNamespace; Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; @@ -15059,8 +15161,8 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LaundryWasherMode -namespace RefrigeratorAndTemperatureControlledCabinetMode { +} // namespace ModeSelect +namespace LaundryWasherMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; @@ -15093,13 +15195,13 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15108,7 +15210,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15126,7 +15228,7 @@ struct Type public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15142,7 +15244,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15156,14 +15258,13 @@ namespace Attributes { namespace SupportedModes { struct TypeInfo { - using Type = chip::app::DataModel::List< - const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::Type>; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType>; + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> &; + chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15175,7 +15276,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15187,7 +15288,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15199,7 +15300,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15207,37 +15308,37 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } }; } // namespace ClusterRevision @@ -15245,7 +15346,7 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); @@ -15262,58 +15363,261 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace LaundryWasherControls { +} // namespace LaundryWasherMode +namespace RefrigeratorAndTemperatureControlledCabinetMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs -namespace Attributes { +namespace Commands { +// Forward-declarations so we can reference these later. -namespace SpinSpeeds { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SpinSpeeds -namespace SpinSpeedCurrent { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, }; -} // namespace SpinSpeedCurrent -namespace NumberOfRinses { -struct TypeInfo + +struct Type { - using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace NumberOfRinses -namespace SupportedRinses { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands + +namespace Attributes { + +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List< + const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::Type>; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Structs::ModeOptionStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SupportedModes +namespace CurrentMode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMode +namespace StartUpMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace StartUpMode +namespace OnMode { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OnMode +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; + Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); + Attributes::StartUpMode::TypeInfo::DecodableType startUpMode; + Attributes::OnMode::TypeInfo::DecodableType onMode; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace RefrigeratorAndTemperatureControlledCabinetMode +namespace LaundryWasherControls { + +namespace Attributes { + +namespace SpinSpeeds { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SpinSpeeds +namespace SpinSpeedCurrent { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SpinSpeedCurrent +namespace NumberOfRinses { +struct TypeInfo +{ + using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfRinses +namespace SupportedRinses { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SupportedRinses namespace GeneratedCommandList { @@ -18511,57 +18815,479 @@ struct TypeInfo Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); }; }; -} // namespace Attributes -} // namespace HepaFilterMonitoring -namespace ActivatedCarbonFilterMonitoring { -namespace Structs { -namespace ReplacementProductStruct { +} // namespace Attributes +} // namespace HepaFilterMonitoring +namespace ActivatedCarbonFilterMonitoring { +namespace Structs { +namespace ReplacementProductStruct { +enum class Fields : uint8_t +{ + kProductIdentifierType = 0, + kProductIdentifierValue = 1, +}; + +struct Type +{ +public: + ProductIdentifierTypeEnum productIdentifierType = static_cast(0); + chip::CharSpan productIdentifierValue; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +using DecodableType = Type; + +} // namespace ReplacementProductStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace ResetCondition { +struct Type; +struct DecodableType; +} // namespace ResetCondition + +} // namespace Commands + +namespace Commands { +namespace ResetCondition { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetCondition +} // namespace Commands + +namespace Attributes { + +namespace Condition { +struct TypeInfo +{ + using Type = chip::Percent; + using DecodableType = chip::Percent; + using DecodableArgType = chip::Percent; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Condition::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Condition +namespace DegradationDirection { +struct TypeInfo +{ + using Type = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; + using DecodableType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; + using DecodableArgType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DegradationDirection::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace DegradationDirection +namespace ChangeIndication { +struct TypeInfo +{ + using Type = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; + using DecodableType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; + using DecodableArgType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChangeIndication::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ChangeIndication +namespace InPlaceIndicator { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InPlaceIndicator::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InPlaceIndicator +namespace LastChangedTime { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LastChangedTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace LastChangedTime +namespace ReplacementProductList { +struct TypeInfo +{ + using Type = chip::app::DataModel::List< + const chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::Type>; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType>; + using DecodableArgType = const chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> &; + + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ReplacementProductList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ReplacementProductList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Condition::TypeInfo::DecodableType condition = static_cast(0); + Attributes::DegradationDirection::TypeInfo::DecodableType degradationDirection = + static_cast(0); + Attributes::ChangeIndication::TypeInfo::DecodableType changeIndication = + static_cast(0); + Attributes::InPlaceIndicator::TypeInfo::DecodableType inPlaceIndicator = static_cast(0); + Attributes::LastChangedTime::TypeInfo::DecodableType lastChangedTime; + Attributes::ReplacementProductList::TypeInfo::DecodableType replacementProductList; + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +} // namespace ActivatedCarbonFilterMonitoring +namespace BooleanSensorConfiguration { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SuppressRequest { +struct Type; +struct DecodableType; +} // namespace SuppressRequest + +} // namespace Commands + +namespace Commands { +namespace SuppressRequest { +enum class Fields : uint8_t +{ + kAlarmsToSuppress = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SuppressRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + chip::BitMask alarmsToSuppress = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SuppressRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + chip::BitMask alarmsToSuppress = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SuppressRequest +} // namespace Commands + +namespace Attributes { + +namespace SensitivityLevel { +struct TypeInfo +{ + using Type = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; + using DecodableType = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; + using DecodableArgType = chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SensitivityLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SensitivityLevel +namespace AlarmsActive { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsActive::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsActive +namespace AlarmsSuppressed { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsSuppressed::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsSuppressed +namespace AlarmsEnabled { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AlarmsEnabled::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace AlarmsEnabled +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::SensitivityLevel::TypeInfo::DecodableType sensitivityLevel = + static_cast(0); + Attributes::AlarmsActive::TypeInfo::DecodableType alarmsActive = + static_cast>(0); + Attributes::AlarmsSuppressed::TypeInfo::DecodableType alarmsSuppressed = + static_cast>(0); + Attributes::AlarmsEnabled::TypeInfo::DecodableType alarmsEnabled = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace AlarmsStateChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kAlarmsActive = 0, + kAlarmsSuppressed = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask alarmsActive = static_cast>(0); + Optional> alarmsSuppressed; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AlarmsStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } + + chip::BitMask alarmsActive = static_cast>(0); + Optional> alarmsSuppressed; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace AlarmsStateChanged +namespace SensorFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kProductIdentifierType = 0, - kProductIdentifierValue = 1, }; struct Type { public: - ProductIdentifierTypeEnum productIdentifierType = static_cast(0); - chip::CharSpan productIdentifierValue; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -using DecodableType = Type; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SensorFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BooleanSensorConfiguration::Id; } -} // namespace ReplacementProductStruct -} // namespace Structs + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace SensorFault +} // namespace Events +} // namespace BooleanSensorConfiguration +namespace ValveConfigurationAndControl { namespace Commands { // Forward-declarations so we can reference these later. -namespace ResetCondition { +namespace Open { struct Type; struct DecodableType; -} // namespace ResetCondition +} // namespace Open + +namespace Close { +struct Type; +struct DecodableType; +} // namespace Close + +namespace SetLevel { +struct Type; +struct DecodableType; +} // namespace SetLevel } // namespace Commands namespace Commands { -namespace ResetCondition { +namespace Open { enum class Fields : uint8_t { + kOpenDuration = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr CommandId GetCommandId() { return Commands::Open::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + Optional openDuration; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -18573,125 +19299,236 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ResetCondition::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr CommandId GetCommandId() { return Commands::Open::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + Optional openDuration; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ResetCondition +}; // namespace Open +namespace Close { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Close::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Close::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Close +namespace SetLevel { +enum class Fields : uint8_t +{ + kLevel = 0, + kOpenDuration = 1, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + chip::Percent level = static_cast(0); + Optional openDuration; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetLevel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + chip::Percent level = static_cast(0); + Optional openDuration; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetLevel } // namespace Commands namespace Attributes { -namespace Condition { +namespace OpenDuration { struct TypeInfo { - using Type = chip::Percent; - using DecodableType = chip::Percent; - using DecodableArgType = chip::Percent; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Condition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OpenDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Condition -namespace DegradationDirection { +} // namespace OpenDuration +namespace AutoCloseTime { struct TypeInfo { - using Type = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; - using DecodableType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; - using DecodableArgType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::DegradationDirectionEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DegradationDirection::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AutoCloseTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DegradationDirection -namespace ChangeIndication { +} // namespace AutoCloseTime +namespace RemainingDuration { struct TypeInfo { - using Type = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; - using DecodableType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; - using DecodableArgType = chip::app::Clusters::ActivatedCarbonFilterMonitoring::ChangeIndicationEnum; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChangeIndication::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RemainingDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ChangeIndication -namespace InPlaceIndicator { +} // namespace RemainingDuration +namespace CurrentState { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InPlaceIndicator::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InPlaceIndicator -namespace LastChangedTime { +} // namespace CurrentState +namespace TargetState { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = + const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LastChangedTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LastChangedTime -namespace ReplacementProductList { +} // namespace TargetState +namespace StartUpState { struct TypeInfo { - using Type = chip::app::DataModel::List< - const chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::Type>; - using DecodableType = chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType>; - using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> &; + using Type = chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum; + using DecodableType = chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum; + using DecodableArgType = chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReplacementProductList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ReplacementProductList +} // namespace StartUpState +namespace CurrentLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentLevel +namespace TargetLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TargetLevel +namespace OpenLevel { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; + + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OpenLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OpenLevel +namespace ValveFault { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ValveFault::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ValveFault namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } }; } // namespace ClusterRevision @@ -18699,18 +19536,22 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ActivatedCarbonFilterMonitoring::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Condition::TypeInfo::DecodableType condition = static_cast(0); - Attributes::DegradationDirection::TypeInfo::DecodableType degradationDirection = - static_cast(0); - Attributes::ChangeIndication::TypeInfo::DecodableType changeIndication = - static_cast(0); - Attributes::InPlaceIndicator::TypeInfo::DecodableType inPlaceIndicator = static_cast(0); - Attributes::LastChangedTime::TypeInfo::DecodableType lastChangedTime; - Attributes::ReplacementProductList::TypeInfo::DecodableType replacementProductList; + Attributes::OpenDuration::TypeInfo::DecodableType openDuration; + Attributes::AutoCloseTime::TypeInfo::DecodableType autoCloseTime; + Attributes::RemainingDuration::TypeInfo::DecodableType remainingDuration; + Attributes::CurrentState::TypeInfo::DecodableType currentState; + Attributes::TargetState::TypeInfo::DecodableType targetState; + Attributes::StartUpState::TypeInfo::DecodableType startUpState = + static_cast(0); + Attributes::CurrentLevel::TypeInfo::DecodableType currentLevel; + Attributes::TargetLevel::TypeInfo::DecodableType targetLevel; + Attributes::OpenLevel::TypeInfo::DecodableType openLevel; + Attributes::ValveFault::TypeInfo::DecodableType valveFault = + static_cast>(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -18720,7 +19561,75 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ActivatedCarbonFilterMonitoring +namespace Events { +namespace ValveStateChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kValveState = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + ValveStateEnum valveState = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveStateChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + ValveStateEnum valveState = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ValveStateChanged +namespace ValveFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kValveFault = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask valveFault = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ValveFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ValveConfigurationAndControl::Id; } + + chip::BitMask valveFault = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ValveFault +} // namespace Events +} // namespace ValveConfigurationAndControl namespace DemandResponseLoadControl { namespace Structs { namespace HeatingSourceControlStruct { @@ -18753,7 +19662,7 @@ enum class Fields : uint8_t struct Type { public: - PowerSavingsEnum powerSavings = static_cast(0); + chip::Percent powerSavings = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -19140,18 +20049,6 @@ struct DecodableType namespace Attributes { -namespace DeviceClass { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DeviceClass::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DeviceClass namespace LoadControlPrograms { struct TypeInfo { @@ -19221,7 +20118,7 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace NumberOfEventsPerProgram -namespace NumberOfTransistions { +namespace NumberOfTransitions { struct TypeInfo { using Type = uint8_t; @@ -19229,10 +20126,10 @@ struct TypeInfo using DecodableArgType = uint8_t; static constexpr ClusterId GetClusterId() { return Clusters::DemandResponseLoadControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfTransistions::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfTransitions::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfTransistions +} // namespace NumberOfTransitions namespace DefaultRandomStart { struct TypeInfo { @@ -19302,14 +20199,12 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::DeviceClass::TypeInfo::DecodableType deviceClass = - static_cast>(0); Attributes::LoadControlPrograms::TypeInfo::DecodableType loadControlPrograms; Attributes::NumberOfLoadControlPrograms::TypeInfo::DecodableType numberOfLoadControlPrograms = static_cast(0); Attributes::Events::TypeInfo::DecodableType events; Attributes::ActiveEvents::TypeInfo::DecodableType activeEvents; Attributes::NumberOfEventsPerProgram::TypeInfo::DecodableType numberOfEventsPerProgram = static_cast(0); - Attributes::NumberOfTransistions::TypeInfo::DecodableType numberOfTransistions = static_cast(0); + Attributes::NumberOfTransitions::TypeInfo::DecodableType numberOfTransitions = static_cast(0); Attributes::DefaultRandomStart::TypeInfo::DecodableType defaultRandomStart = static_cast(0); Attributes::DefaultRandomDuration::TypeInfo::DecodableType defaultRandomDuration = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; @@ -30720,7 +31615,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - CecKeyCode keyCode = static_cast(0); + CECKeyCodeEnum keyCode = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -30735,7 +31630,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SendKey::Id; } static constexpr ClusterId GetClusterId() { return Clusters::KeypadInput::Id; } - CecKeyCode keyCode = static_cast(0); + CECKeyCodeEnum keyCode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SendKey diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h deleted file mode 100644 index 03d4cfb434f07d..00000000000000 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -// Prevent multiple inclusion -#pragma once - -#include - -// ZCL enums - -// Enum for BarrierControlBarrierPosition -enum EmberAfBarrierControlBarrierPosition : uint8_t -{ - EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_CLOSED = 0, - EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_OPEN = 100, - EMBER_ZCL_BARRIER_CONTROL_BARRIER_POSITION_UNKNOWN = 255, -}; - -// Enum for BarrierControlMovingState -enum EmberAfBarrierControlMovingState : uint8_t -{ - EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_STOPPED = 0, - EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_CLOSING = 1, - EMBER_ZCL_BARRIER_CONTROL_MOVING_STATE_OPENING = 2, -}; - -// Enum for ColorControlOptions -enum EmberAfColorControlOptions : uint8_t -{ - EMBER_ZCL_COLOR_CONTROL_OPTIONS_EXECUTE_IF_OFF = 1, -}; - -// Enum for ColorMode -enum EmberAfColorMode : uint8_t -{ - EMBER_ZCL_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION = 0, - EMBER_ZCL_COLOR_MODE_CURRENT_X_AND_CURRENT_Y = 1, - EMBER_ZCL_COLOR_MODE_COLOR_TEMPERATURE = 2, -}; - -// Enum for EnhancedColorMode -enum EmberAfEnhancedColorMode : uint8_t -{ - EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_HUE_AND_CURRENT_SATURATION = 0, - EMBER_ZCL_ENHANCED_COLOR_MODE_CURRENT_X_AND_CURRENT_Y = 1, - EMBER_ZCL_ENHANCED_COLOR_MODE_COLOR_TEMPERATURE = 2, - EMBER_ZCL_ENHANCED_COLOR_MODE_ENHANCED_CURRENT_HUE_AND_CURRENT_SATURATION = 3, -}; - -// Enum for PHYRateEnum -enum EmberAfPHYRateEnum : uint8_t -{ - EMBER_ZCL_PHY_RATE_ENUM_RATE10_M = 0, - EMBER_ZCL_PHY_RATE_ENUM_RATE100_M = 1, - EMBER_ZCL_PHY_RATE_ENUM_RATE1_G = 2, - EMBER_ZCL_PHY_RATE_ENUM_RATE2_5_G = 3, - EMBER_ZCL_PHY_RATE_ENUM_RATE5_G = 4, - EMBER_ZCL_PHY_RATE_ENUM_RATE10_G = 5, - EMBER_ZCL_PHY_RATE_ENUM_RATE40_G = 6, - EMBER_ZCL_PHY_RATE_ENUM_RATE100_G = 7, - EMBER_ZCL_PHY_RATE_ENUM_RATE200_G = 8, - EMBER_ZCL_PHY_RATE_ENUM_RATE400_G = 9, -}; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 36323d8644bac2..ed0205778b1751 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -158,9 +158,9 @@ namespace SceneTableSize { static constexpr AttributeId Id = 0x00000006; } // namespace SceneTableSize -namespace RemainingCapacity { +namespace FabricSceneInfo { static constexpr AttributeId Id = 0x00000007; -} // namespace RemainingCapacity +} // namespace FabricSceneInfo namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; @@ -722,6 +722,14 @@ namespace ProductAppearance { static constexpr AttributeId Id = 0x00000014; } // namespace ProductAppearance +namespace SpecificationVersion { +static constexpr AttributeId Id = 0x00000015; +} // namespace SpecificationVersion + +namespace MaxPathsPerInvoke { +static constexpr AttributeId Id = 0x00000016; +} // namespace MaxPathsPerInvoke + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -2483,6 +2491,52 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace Timer +namespace OvenMode { +namespace Attributes { + +namespace SupportedModes { +static constexpr AttributeId Id = 0x00000000; +} // namespace SupportedModes + +namespace CurrentMode { +static constexpr AttributeId Id = 0x00000001; +} // namespace CurrentMode + +namespace StartUpMode { +static constexpr AttributeId Id = 0x00000002; +} // namespace StartUpMode + +namespace OnMode { +static constexpr AttributeId Id = 0x00000003; +} // namespace OnMode + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace OvenMode + namespace ModeSelect { namespace Attributes { @@ -3367,43 +3421,155 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace ActivatedCarbonFilterMonitoring -namespace DemandResponseLoadControl { +namespace BooleanSensorConfiguration { namespace Attributes { -namespace DeviceClass { +namespace SensitivityLevel { static constexpr AttributeId Id = 0x00000000; -} // namespace DeviceClass +} // namespace SensitivityLevel -namespace LoadControlPrograms { +namespace AlarmsActive { +static constexpr AttributeId Id = 0x00000001; +} // namespace AlarmsActive + +namespace AlarmsSuppressed { +static constexpr AttributeId Id = 0x00000002; +} // namespace AlarmsSuppressed + +namespace AlarmsEnabled { +static constexpr AttributeId Id = 0x00000003; +} // namespace AlarmsEnabled + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { +namespace Attributes { + +namespace OpenDuration { +static constexpr AttributeId Id = 0x00000000; +} // namespace OpenDuration + +namespace AutoCloseTime { static constexpr AttributeId Id = 0x00000001; +} // namespace AutoCloseTime + +namespace RemainingDuration { +static constexpr AttributeId Id = 0x00000002; +} // namespace RemainingDuration + +namespace CurrentState { +static constexpr AttributeId Id = 0x00000003; +} // namespace CurrentState + +namespace TargetState { +static constexpr AttributeId Id = 0x00000004; +} // namespace TargetState + +namespace StartUpState { +static constexpr AttributeId Id = 0x00000005; +} // namespace StartUpState + +namespace CurrentLevel { +static constexpr AttributeId Id = 0x00000006; +} // namespace CurrentLevel + +namespace TargetLevel { +static constexpr AttributeId Id = 0x00000007; +} // namespace TargetLevel + +namespace OpenLevel { +static constexpr AttributeId Id = 0x00000008; +} // namespace OpenLevel + +namespace ValveFault { +static constexpr AttributeId Id = 0x00000009; +} // namespace ValveFault + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace ValveConfigurationAndControl + +namespace DemandResponseLoadControl { +namespace Attributes { + +namespace LoadControlPrograms { +static constexpr AttributeId Id = 0x00000000; } // namespace LoadControlPrograms namespace NumberOfLoadControlPrograms { -static constexpr AttributeId Id = 0x00000002; +static constexpr AttributeId Id = 0x00000001; } // namespace NumberOfLoadControlPrograms namespace Events { -static constexpr AttributeId Id = 0x00000003; +static constexpr AttributeId Id = 0x00000002; } // namespace Events namespace ActiveEvents { -static constexpr AttributeId Id = 0x00000004; +static constexpr AttributeId Id = 0x00000003; } // namespace ActiveEvents namespace NumberOfEventsPerProgram { -static constexpr AttributeId Id = 0x00000005; +static constexpr AttributeId Id = 0x00000004; } // namespace NumberOfEventsPerProgram -namespace NumberOfTransistions { -static constexpr AttributeId Id = 0x00000006; -} // namespace NumberOfTransistions +namespace NumberOfTransitions { +static constexpr AttributeId Id = 0x00000005; +} // namespace NumberOfTransitions namespace DefaultRandomStart { -static constexpr AttributeId Id = 0x00000007; +static constexpr AttributeId Id = 0x00000006; } // namespace DefaultRandomStart namespace DefaultRandomDuration { -static constexpr AttributeId Id = 0x00000008; +static constexpr AttributeId Id = 0x00000007; } // namespace DefaultRandomDuration namespace GeneratedCommandList { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index c5ec35da15c8b3..814cbf6dc40ed5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -151,6 +151,9 @@ static constexpr ClusterId Id = 0x00000046; namespace Timer { static constexpr ClusterId Id = 0x00000047; } // namespace Timer +namespace OvenMode { +static constexpr ClusterId Id = 0x00000049; +} // namespace OvenMode namespace ModeSelect { static constexpr ClusterId Id = 0x00000050; } // namespace ModeSelect @@ -205,6 +208,12 @@ static constexpr ClusterId Id = 0x00000071; namespace ActivatedCarbonFilterMonitoring { static constexpr ClusterId Id = 0x00000072; } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanSensorConfiguration { +static constexpr ClusterId Id = 0x00000080; +} // namespace BooleanSensorConfiguration +namespace ValveConfigurationAndControl { +static constexpr ClusterId Id = 0x00000081; +} // namespace ValveConfigurationAndControl namespace DemandResponseLoadControl { static constexpr ClusterId Id = 0x00000096; } // namespace DemandResponseLoadControl diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 97129ac5f2168b..8b18795939a9ea 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -644,6 +644,10 @@ namespace StayActiveRequest { static constexpr CommandId Id = 0x00000003; } // namespace StayActiveRequest +namespace StayActiveResponse { +static constexpr CommandId Id = 0x00000004; +} // namespace StayActiveResponse + } // namespace Commands } // namespace IcdManagement @@ -669,6 +673,20 @@ static constexpr CommandId Id = 0x00000003; } // namespace Commands } // namespace Timer +namespace OvenMode { +namespace Commands { + +namespace ChangeToMode { +static constexpr CommandId Id = 0x00000000; +} // namespace ChangeToMode + +namespace ChangeToModeResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace ChangeToModeResponse + +} // namespace Commands +} // namespace OvenMode + namespace ModeSelect { namespace Commands { @@ -869,6 +887,34 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace ActivatedCarbonFilterMonitoring +namespace BooleanSensorConfiguration { +namespace Commands { + +namespace SuppressRequest { +static constexpr CommandId Id = 0x00000000; +} // namespace SuppressRequest + +} // namespace Commands +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { +namespace Commands { + +namespace Open { +static constexpr CommandId Id = 0x00000000; +} // namespace Open + +namespace Close { +static constexpr CommandId Id = 0x00000001; +} // namespace Close + +namespace SetLevel { +static constexpr CommandId Id = 0x00000002; +} // namespace SetLevel + +} // namespace Commands +} // namespace ValveConfigurationAndControl + namespace DemandResponseLoadControl { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index d77938228e2f27..1a019ac83d5bf5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -365,6 +365,34 @@ static constexpr EventId Id = 0x00000001; } // namespace Events } // namespace RvcOperationalState +namespace BooleanSensorConfiguration { +namespace Events { + +namespace AlarmsStateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace AlarmsStateChanged + +namespace SensorFault { +static constexpr EventId Id = 0x00000001; +} // namespace SensorFault + +} // namespace Events +} // namespace BooleanSensorConfiguration + +namespace ValveConfigurationAndControl { +namespace Events { + +namespace ValveStateChanged { +static constexpr EventId Id = 0x00000000; +} // namespace ValveStateChanged + +namespace ValveFault { +static constexpr EventId Id = 0x00000001; +} // namespace ValveFault + +} // namespace Events +} // namespace ValveConfigurationAndControl + namespace DemandResponseLoadControl { namespace Events { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 2827dd0736a05c..fe38b8563b05a7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -292,6 +292,12 @@ #define CHIP_PRINTCLUSTER_TIMER_CLUSTER #endif +#if defined(ZCL_USING_OVEN_MODE_CLUSTER_SERVER) || defined(ZCL_USING_OVEN_MODE_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER { chip::app::Clusters::OvenMode::Id, "Oven Mode" }, +#else +#define CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER +#endif + #if defined(ZCL_USING_MODE_SELECT_CLUSTER_SERVER) || defined(ZCL_USING_MODE_SELECT_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER { chip::app::Clusters::ModeSelect::Id, "Mode Select" }, #else @@ -408,6 +414,21 @@ #define CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER #endif +#if defined(ZCL_USING_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_SERVER) || defined(ZCL_USING_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER \ + { chip::app::Clusters::BooleanSensorConfiguration::Id, "Boolean Sensor Configuration" }, +#else +#define CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER +#endif + +#if defined(ZCL_USING_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER) || \ + defined(ZCL_USING_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER \ + { chip::app::Clusters::ValveConfigurationAndControl::Id, "Valve Configuration and Control" }, +#else +#define CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER +#endif + #if defined(ZCL_USING_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_SERVER) || defined(ZCL_USING_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER \ { chip::app::Clusters::DemandResponseLoadControl::Id, "Demand Response Load Control" }, @@ -734,6 +755,7 @@ CHIP_PRINTCLUSTER_BOOLEAN_STATE_CLUSTER \ CHIP_PRINTCLUSTER_ICD_MANAGEMENT_CLUSTER \ CHIP_PRINTCLUSTER_TIMER_CLUSTER \ + CHIP_PRINTCLUSTER_OVEN_MODE_CLUSTER \ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_CLUSTER \ CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER \ @@ -752,6 +774,8 @@ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER \ CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ CHIP_PRINTCLUSTER_ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER \ + CHIP_PRINTCLUSTER_BOOLEAN_SENSOR_CONFIGURATION_CLUSTER \ + CHIP_PRINTCLUSTER_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER \ CHIP_PRINTCLUSTER_DOOR_LOCK_CLUSTER \ CHIP_PRINTCLUSTER_WINDOW_COVERING_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 71641c77d24c98..2383493ac95559 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -76,6 +76,7 @@ | BooleanState | 0x0045 | | IcdManagement | 0x0046 | | Timer | 0x0047 | +| OvenMode | 0x0049 | | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | @@ -94,6 +95,8 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | +| BooleanSensorConfiguration | 0x0080 | +| ValveConfigurationAndControl | 0x0081 | | DemandResponseLoadControl | 0x0096 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | @@ -505,7 +508,7 @@ class GroupsAddGroupIfIdentifying : public ClusterCommand | * NameSupport | 0x0004 | | * LastConfiguredBy | 0x0005 | | * SceneTableSize | 0x0006 | -| * RemainingCapacity | 0x0007 | +| * FabricSceneInfo | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -2203,6 +2206,8 @@ class ActionsDisableActionWithDuration : public ClusterCommand | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | | * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4880,6 +4885,64 @@ class TimerReduceTime : public ClusterCommand chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster OvenMode | 0x0049 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ChangeToMode + */ +class OvenModeChangeToMode : public ClusterCommand +{ +public: + OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| @@ -6110,6 +6173,210 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster BooleanSensorConfiguration | 0x0080 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SuppressRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SensitivityLevel | 0x0000 | +| * AlarmsActive | 0x0001 | +| * AlarmsSuppressed | 0x0002 | +| * AlarmsEnabled | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AlarmsStateChanged | 0x0000 | +| * SensorFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +/* + * Command SuppressRequest + */ +class BooleanSensorConfigurationSuppressRequest : public ClusterCommand +{ +public: + BooleanSensorConfigurationSuppressRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("suppress-request", credsIssuerConfig) + { + AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ValveConfigurationAndControl | 0x0081 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Open | 0x00 | +| * Close | 0x01 | +| * SetLevel | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OpenDuration | 0x0000 | +| * AutoCloseTime | 0x0001 | +| * RemainingDuration | 0x0002 | +| * CurrentState | 0x0003 | +| * TargetState | 0x0004 | +| * StartUpState | 0x0005 | +| * CurrentLevel | 0x0006 | +| * TargetLevel | 0x0007 | +| * OpenLevel | 0x0008 | +| * ValveFault | 0x0009 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ValveStateChanged | 0x0000 | +| * ValveFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +/* + * Command Open + */ +class ValveConfigurationAndControlOpen : public ClusterCommand +{ +public: + ValveConfigurationAndControlOpen(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("open", credsIssuerConfig) + { + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type mRequest; +}; + +/* + * Command Close + */ +class ValveConfigurationAndControlClose : public ClusterCommand +{ +public: + ValveConfigurationAndControlClose(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("close", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Type mRequest; +}; + +/* + * Command SetLevel + */ +class ValveConfigurationAndControlSetLevel : public ClusterCommand +{ +public: + ValveConfigurationAndControlSetLevel(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-level", credsIssuerConfig) + { + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster DemandResponseLoadControl | 0x0096 | |------------------------------------------------------------------------------| @@ -6121,15 +6388,14 @@ class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand | * ClearLoadControlEventsRequest | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * DeviceClass | 0x0000 | -| * LoadControlPrograms | 0x0001 | -| * NumberOfLoadControlPrograms | 0x0002 | -| * Events | 0x0003 | -| * ActiveEvents | 0x0004 | -| * NumberOfEventsPerProgram | 0x0005 | -| * NumberOfTransistions | 0x0006 | -| * DefaultRandomStart | 0x0007 | -| * DefaultRandomDuration | 0x0008 | +| * LoadControlPrograms | 0x0000 | +| * NumberOfLoadControlPrograms | 0x0001 | +| * Events | 0x0002 | +| * ActiveEvents | 0x0003 | +| * NumberOfEventsPerProgram | 0x0004 | +| * NumberOfTransitions | 0x0005 | +| * DefaultRandomStart | 0x0006 | +| * DefaultRandomDuration | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -12247,7 +12513,7 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "remaining-capacity", Attributes::RemainingCapacity::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -12270,8 +12536,9 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds credsIssuerConfig), // make_unique>(Id, "scene-table-size", 0, UINT16_MAX, Attributes::SceneTableSize::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "remaining-capacity", 0, UINT8_MAX, Attributes::RemainingCapacity::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -12293,7 +12560,7 @@ void registerClusterScenes(Commands & commands, CredentialIssuerCommands * creds make_unique(Id, "name-support", Attributes::NameSupport::Id, credsIssuerConfig), // make_unique(Id, "last-configured-by", Attributes::LastConfiguredBy::Id, credsIssuerConfig), // make_unique(Id, "scene-table-size", Attributes::SceneTableSize::Id, credsIssuerConfig), // - make_unique(Id, "remaining-capacity", Attributes::RemainingCapacity::Id, credsIssuerConfig), // + make_unique(Id, "fabric-scene-info", Attributes::FabricSceneInfo::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13038,6 +13305,8 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "specification-version", Attributes::SpecificationVersion::Id, credsIssuerConfig), // + make_unique(Id, "max-paths-per-invoke", Attributes::MaxPathsPerInvoke::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13087,6 +13356,10 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman Id, "capability-minima", Attributes::CapabilityMinima::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>( Id, "product-appearance", Attributes::ProductAppearance::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "specification-version", 0, UINT32_MAX, Attributes::SpecificationVersion::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-paths-per-invoke", 0, UINT16_MAX, Attributes::MaxPathsPerInvoke::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13122,6 +13395,8 @@ void registerClusterBasicInformation(Commands & commands, CredentialIssuerComman make_unique(Id, "unique-id", Attributes::UniqueID::Id, credsIssuerConfig), // make_unique(Id, "capability-minima", Attributes::CapabilityMinima::Id, credsIssuerConfig), // make_unique(Id, "product-appearance", Attributes::ProductAppearance::Id, credsIssuerConfig), // + make_unique(Id, "specification-version", Attributes::SpecificationVersion::Id, credsIssuerConfig), // + make_unique(Id, "max-paths-per-invoke", Attributes::MaxPathsPerInvoke::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15733,6 +16008,75 @@ void registerClusterTimer(Commands & commands, CredentialIssuerCommands * credsI commands.RegisterCluster(clusterName, clusterCommands); } +void registerClusterOvenMode(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::OvenMode; + + const char * clusterName = "OvenMode"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "supported-modes", Attributes::SupportedModes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "current-mode", 0, UINT8_MAX, Attributes::CurrentMode::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "start-up-mode", 0, UINT8_MAX, Attributes::StartUpMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "on-mode", 0, UINT8_MAX, Attributes::OnMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "supported-modes", Attributes::SupportedModes::Id, credsIssuerConfig), // + make_unique(Id, "current-mode", Attributes::CurrentMode::Id, credsIssuerConfig), // + make_unique(Id, "start-up-mode", Attributes::StartUpMode::Id, credsIssuerConfig), // + make_unique(Id, "on-mode", Attributes::OnMode::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} void registerClusterModeSelect(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::ModeSelect; @@ -17094,6 +17438,182 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands, Credent commands.RegisterCluster(clusterName, clusterCommands); } +void registerClusterBooleanSensorConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::BooleanSensorConfiguration; + + const char * clusterName = "BooleanSensorConfiguration"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "sensitivity-level", Attributes::SensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // + make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // + make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>( + Id, "sensitivity-level", 0, UINT8_MAX, Attributes::SensitivityLevel::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "alarms-active", 0, UINT8_MAX, Attributes::AlarmsActive::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "alarms-suppressed", 0, UINT8_MAX, Attributes::AlarmsSuppressed::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "alarms-enabled", 0, UINT8_MAX, Attributes::AlarmsEnabled::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "sensitivity-level", Attributes::SensitivityLevel::Id, credsIssuerConfig), // + make_unique(Id, "alarms-active", Attributes::AlarmsActive::Id, credsIssuerConfig), // + make_unique(Id, "alarms-suppressed", Attributes::AlarmsSuppressed::Id, credsIssuerConfig), // + make_unique(Id, "alarms-enabled", Attributes::AlarmsEnabled::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "alarms-state-changed", Events::AlarmsStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Events::SensorFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "alarms-state-changed", Events::AlarmsStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "sensor-fault", Events::SensorFault::Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} +void registerClusterValveConfigurationAndControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::ValveConfigurationAndControl; + + const char * clusterName = "ValveConfigurationAndControl"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "open-duration", Attributes::OpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "auto-close-time", Attributes::AutoCloseTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-duration", Attributes::RemainingDuration::Id, credsIssuerConfig), // + make_unique(Id, "current-state", Attributes::CurrentState::Id, credsIssuerConfig), // + make_unique(Id, "target-state", Attributes::TargetState::Id, credsIssuerConfig), // + make_unique(Id, "start-up-state", Attributes::StartUpState::Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "target-level", Attributes::TargetLevel::Id, credsIssuerConfig), // + make_unique(Id, "open-level", Attributes::OpenLevel::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Attributes::ValveFault::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "open-duration", 0, UINT32_MAX, Attributes::OpenDuration::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>(Id, "auto-close-time", 0, UINT64_MAX, + Attributes::AutoCloseTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "remaining-duration", 0, UINT32_MAX, + Attributes::RemainingDuration::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttribute>>( + Id, "current-state", 0, UINT8_MAX, Attributes::CurrentState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttribute>>( + Id, "target-state", 0, UINT8_MAX, Attributes::TargetState::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "start-up-state", 0, UINT8_MAX, Attributes::StartUpState::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "current-level", 0, UINT8_MAX, Attributes::CurrentLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "target-level", 0, UINT8_MAX, Attributes::TargetLevel::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "open-level", 0, UINT8_MAX, Attributes::OpenLevel::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "valve-fault", 0, UINT16_MAX, Attributes::ValveFault::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "open-duration", Attributes::OpenDuration::Id, credsIssuerConfig), // + make_unique(Id, "auto-close-time", Attributes::AutoCloseTime::Id, credsIssuerConfig), // + make_unique(Id, "remaining-duration", Attributes::RemainingDuration::Id, credsIssuerConfig), // + make_unique(Id, "current-state", Attributes::CurrentState::Id, credsIssuerConfig), // + make_unique(Id, "target-state", Attributes::TargetState::Id, credsIssuerConfig), // + make_unique(Id, "start-up-state", Attributes::StartUpState::Id, credsIssuerConfig), // + make_unique(Id, "current-level", Attributes::CurrentLevel::Id, credsIssuerConfig), // + make_unique(Id, "target-level", Attributes::TargetLevel::Id, credsIssuerConfig), // + make_unique(Id, "open-level", Attributes::OpenLevel::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Attributes::ValveFault::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "valve-state-changed", Events::ValveStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Events::ValveFault::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "valve-state-changed", Events::ValveStateChanged::Id, credsIssuerConfig), // + make_unique(Id, "valve-fault", Events::ValveFault::Id, credsIssuerConfig), // + }; + + commands.RegisterCluster(clusterName, clusterCommands); +} void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::DemandResponseLoadControl; @@ -17114,7 +17634,6 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "device-class", Attributes::DeviceClass::Id, credsIssuerConfig), // make_unique(Id, "load-control-programs", Attributes::LoadControlPrograms::Id, credsIssuerConfig), // make_unique(Id, "number-of-load-control-programs", Attributes::NumberOfLoadControlPrograms::Id, credsIssuerConfig), // @@ -17122,7 +17641,7 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss make_unique(Id, "active-events", Attributes::ActiveEvents::Id, credsIssuerConfig), // make_unique(Id, "number-of-events-per-program", Attributes::NumberOfEventsPerProgram::Id, credsIssuerConfig), // - make_unique(Id, "number-of-transistions", Attributes::NumberOfTransistions::Id, credsIssuerConfig), // + make_unique(Id, "number-of-transitions", Attributes::NumberOfTransitions::Id, credsIssuerConfig), // make_unique(Id, "default-random-start", Attributes::DefaultRandomStart::Id, credsIssuerConfig), // make_unique(Id, "default-random-duration", Attributes::DefaultRandomDuration::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -17132,8 +17651,6 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "device-class", 0, UINT32_MAX, Attributes::DeviceClass::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "load-control-programs", Attributes::LoadControlPrograms::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -17149,7 +17666,7 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss make_unique>(Id, "number-of-events-per-program", 0, UINT8_MAX, Attributes::NumberOfEventsPerProgram::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "number-of-transistions", 0, UINT8_MAX, Attributes::NumberOfTransistions::Id, + make_unique>(Id, "number-of-transitions", 0, UINT8_MAX, Attributes::NumberOfTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "default-random-start", 0, UINT8_MAX, Attributes::DefaultRandomStart::Id, WriteCommandType::kWrite, credsIssuerConfig), // @@ -17169,7 +17686,6 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "device-class", Attributes::DeviceClass::Id, credsIssuerConfig), // make_unique(Id, "load-control-programs", Attributes::LoadControlPrograms::Id, credsIssuerConfig), // make_unique(Id, "number-of-load-control-programs", Attributes::NumberOfLoadControlPrograms::Id, credsIssuerConfig), // @@ -17177,7 +17693,7 @@ void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIss make_unique(Id, "active-events", Attributes::ActiveEvents::Id, credsIssuerConfig), // make_unique(Id, "number-of-events-per-program", Attributes::NumberOfEventsPerProgram::Id, credsIssuerConfig), // - make_unique(Id, "number-of-transistions", Attributes::NumberOfTransistions::Id, credsIssuerConfig), // + make_unique(Id, "number-of-transitions", Attributes::NumberOfTransitions::Id, credsIssuerConfig), // make_unique(Id, "default-random-start", Attributes::DefaultRandomStart::Id, credsIssuerConfig), // make_unique(Id, "default-random-duration", Attributes::DefaultRandomDuration::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -22525,6 +23041,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterBooleanState(commands, credsIssuerConfig); registerClusterIcdManagement(commands, credsIssuerConfig); registerClusterTimer(commands, credsIssuerConfig); + registerClusterOvenMode(commands, credsIssuerConfig); registerClusterModeSelect(commands, credsIssuerConfig); registerClusterLaundryWasherMode(commands, credsIssuerConfig); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands, credsIssuerConfig); @@ -22543,6 +23060,8 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterRvcOperationalState(commands, credsIssuerConfig); registerClusterHepaFilterMonitoring(commands, credsIssuerConfig); registerClusterActivatedCarbonFilterMonitoring(commands, credsIssuerConfig); + registerClusterBooleanSensorConfiguration(commands, credsIssuerConfig); + registerClusterValveConfigurationAndControl(commands, credsIssuerConfig); registerClusterDemandResponseLoadControl(commands, credsIssuerConfig); registerClusterDoorLock(commands, credsIssuerConfig); registerClusterWindowCovering(commands, credsIssuerConfig); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 0d3781a511ce02..b99220cfda2c75 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -283,6 +283,66 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::Exten ComplexArgumentParser::Finalize(request.attributeValueList); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + // Copy to track which members we already processed. + Json::Value valueCopy(value); + + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneCount", "sceneCount", value.isMember("sceneCount"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentScene", "currentScene", value.isMember("currentScene"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.currentGroup", "currentGroup", value.isMember("currentGroup"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.sceneValid", "sceneValid", value.isMember("sceneValid"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("SceneInfoStruct.remainingCapacity", "remainingCapacity", + value.isMember("remainingCapacity"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneCount"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneCount, value["sceneCount"])); + valueCopy.removeMember("sceneCount"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentScene"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentScene, value["currentScene"])); + valueCopy.removeMember("currentScene"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currentGroup"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currentGroup, value["currentGroup"])); + valueCopy.removeMember("currentGroup"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "sceneValid"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.sceneValid, value["sceneValid"])); + valueCopy.removeMember("sceneValid"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "remainingCapacity"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.remainingCapacity, value["remainingCapacity"])); + valueCopy.removeMember("remainingCapacity"); + + if (value.isMember("fabricIndex")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricIndex"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricIndex, value["fabricIndex"])); + } + valueCopy.removeMember("fabricIndex"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.sceneCount); + ComplexArgumentParser::Finalize(request.currentScene); + ComplexArgumentParser::Finalize(request.currentGroup); + ComplexArgumentParser::Finalize(request.sceneValid); + ComplexArgumentParser::Finalize(request.remainingCapacity); + ComplexArgumentParser::Finalize(request.fabricIndex); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 6cad8c0944afba..39eeb0b1fb5cce 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -61,6 +61,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs static void Finalize(chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Scenes::Structs::SceneInfoStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 62bd8c41261e1e..2bbe4f01f08c79 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -237,6 +237,63 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("SceneCount", indent + 1, value.sceneCount); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneCount'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentScene", indent + 1, value.currentScene); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentScene'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CurrentGroup", indent + 1, value.currentGroup); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CurrentGroup'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("SceneValid", indent + 1, value.sceneValid); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SceneValid'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("RemainingCapacity", indent + 1, value.remainingCapacity); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RemainingCapacity'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("FabricIndex", indent + 1, value.fabricIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value) { @@ -4295,6 +4352,70 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmsActive", indent + 1, value.alarmsActive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmsActive'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("AlarmsSuppressed", indent + 1, value.alarmsSuppressed); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'AlarmsSuppressed'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const BooleanSensorConfiguration::Events::SensorFault::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("ValveState", indent + 1, value.valveState); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ValveState'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const ValveConfigurationAndControl::Events::ValveFault::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("ValveFault", indent + 1, value.valveFault); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ValveFault'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value) { @@ -5121,6 +5242,23 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const IcdManagement::Commands::StayActiveResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("promisedActiveDuration", indent + 1, value.promisedActiveDuration)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OvenMode::Commands::ChangeToModeResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); + ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value) { @@ -5639,10 +5777,10 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SceneTableSize", 1, value); } - case Scenes::Attributes::RemainingCapacity::Id: { - uint8_t value; + case Scenes::Attributes::FabricSceneInfo::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemainingCapacity", 1, value); + return DataModelLogger::LogValue("FabricSceneInfo", 1, value); } case Scenes::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; @@ -6333,6 +6471,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ProductAppearance", 1, value); } + case BasicInformation::Attributes::SpecificationVersion::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SpecificationVersion", 1, value); + } + case BasicInformation::Attributes::MaxPathsPerInvoke::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxPathsPerInvoke", 1, value); + } case BasicInformation::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -8515,6 +8663,62 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case OvenMode::Id: { + switch (path.mAttributeId) + { + case OvenMode::Attributes::SupportedModes::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedModes", 1, value); + } + case OvenMode::Attributes::CurrentMode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentMode", 1, value); + } + case OvenMode::Attributes::StartUpMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpMode", 1, value); + } + case OvenMode::Attributes::OnMode::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OnMode", 1, value); + } + case OvenMode::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case OvenMode::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case OvenMode::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case OvenMode::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case OvenMode::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case OvenMode::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case ModeSelect::Id: { switch (path.mAttributeId) { @@ -9606,14 +9810,151 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case DemandResponseLoadControl::Id: { + case BooleanSensorConfiguration::Id: { switch (path.mAttributeId) { - case DemandResponseLoadControl::Attributes::DeviceClass::Id: { - chip::BitMask value; + case BooleanSensorConfiguration::Attributes::SensitivityLevel::Id: { + chip::app::Clusters::BooleanSensorConfiguration::SensitivityEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SensitivityLevel", 1, value); + } + case BooleanSensorConfiguration::Attributes::AlarmsActive::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsActive", 1, value); + } + case BooleanSensorConfiguration::Attributes::AlarmsSuppressed::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsSuppressed", 1, value); + } + case BooleanSensorConfiguration::Attributes::AlarmsEnabled::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsEnabled", 1, value); + } + case BooleanSensorConfiguration::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case BooleanSensorConfiguration::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case BooleanSensorConfiguration::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case BooleanSensorConfiguration::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case BooleanSensorConfiguration::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case BooleanSensorConfiguration::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case ValveConfigurationAndControl::Id: { + switch (path.mAttributeId) + { + case ValveConfigurationAndControl::Attributes::OpenDuration::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OpenDuration", 1, value); + } + case ValveConfigurationAndControl::Attributes::AutoCloseTime::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AutoCloseTime", 1, value); + } + case ValveConfigurationAndControl::Attributes::RemainingDuration::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("RemainingDuration", 1, value); + } + case ValveConfigurationAndControl::Attributes::CurrentState::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentState", 1, value); + } + case ValveConfigurationAndControl::Attributes::TargetState::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TargetState", 1, value); + } + case ValveConfigurationAndControl::Attributes::StartUpState::Id: { + chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StartUpState", 1, value); + } + case ValveConfigurationAndControl::Attributes::CurrentLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("CurrentLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::TargetLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TargetLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::OpenLevel::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OpenLevel", 1, value); + } + case ValveConfigurationAndControl::Attributes::ValveFault::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveFault", 1, value); + } + case ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case ValveConfigurationAndControl::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case ValveConfigurationAndControl::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("DeviceClass", 1, value); + return DataModelLogger::LogValue("AttributeList", 1, value); } + case ValveConfigurationAndControl::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case ValveConfigurationAndControl::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } + case DemandResponseLoadControl::Id: { + switch (path.mAttributeId) + { case DemandResponseLoadControl::Attributes::LoadControlPrograms::Id: { chip::app::DataModel::DecodableList< chip::app::Clusters::DemandResponseLoadControl::Structs::LoadControlProgramStruct::DecodableType> @@ -9645,10 +9986,10 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("NumberOfEventsPerProgram", 1, value); } - case DemandResponseLoadControl::Attributes::NumberOfTransistions::Id: { + case DemandResponseLoadControl::Attributes::NumberOfTransitions::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("NumberOfTransistions", 1, value); + return DataModelLogger::LogValue("NumberOfTransitions", 1, value); } case DemandResponseLoadControl::Attributes::DefaultRandomStart::Id: { uint8_t value; @@ -14462,6 +14803,22 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RegisterClientResponse", 1, value); } + case IcdManagement::Commands::StayActiveResponse::Id: { + IcdManagement::Commands::StayActiveResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("StayActiveResponse", 1, value); + } + } + break; + } + case OvenMode::Id: { + switch (path.mCommandId) + { + case OvenMode::Commands::ChangeToModeResponse::Id: { + OvenMode::Commands::ChangeToModeResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ChangeToModeResponse", 1, value); + } } break; } @@ -15192,6 +15549,38 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case BooleanSensorConfiguration::Id: { + switch (header.mPath.mEventId) + { + case BooleanSensorConfiguration::Events::AlarmsStateChanged::Id: { + chip::app::Clusters::BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AlarmsStateChanged", 1, value); + } + case BooleanSensorConfiguration::Events::SensorFault::Id: { + chip::app::Clusters::BooleanSensorConfiguration::Events::SensorFault::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SensorFault", 1, value); + } + } + break; + } + case ValveConfigurationAndControl::Id: { + switch (header.mPath.mEventId) + { + case ValveConfigurationAndControl::Events::ValveStateChanged::Id: { + chip::app::Clusters::ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveStateChanged", 1, value); + } + case ValveConfigurationAndControl::Events::ValveFault::Id: { + chip::app::Clusters::ValveConfigurationAndControl::Events::ValveFault::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ValveFault", 1, value); + } + } + break; + } case DemandResponseLoadControl::Id: { switch (header.mPath.mEventId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index fd07c7d7689334..a120b9021f7b95 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -44,6 +44,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Scenes::Structs::SceneInfoStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Descriptor::Structs::DeviceTypeStruct::DecodableType & value); @@ -386,6 +389,16 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::RvcOperationalState::Events::OperationCompletion::DecodableType & value); static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::BooleanSensorConfiguration::Events::AlarmsStateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::BooleanSensorConfiguration::Events::SensorFault::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::ValveConfigurationAndControl::Events::ValveStateChanged::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::ValveConfigurationAndControl::Events::ValveFault::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -517,6 +530,10 @@ LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType & value); static CHIP_ERROR 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 d99e1e416c97cc..38a0c96534ab1a 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -79,6 +79,7 @@ | BooleanState | 0x0045 | | IcdManagement | 0x0046 | | Timer | 0x0047 | +| OvenMode | 0x0049 | | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | @@ -97,6 +98,8 @@ | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | | ActivatedCarbonFilterMonitoring | 0x0072 | +| BooleanSensorConfiguration | 0x0080 | +| ValveConfigurationAndControl | 0x0081 | | DemandResponseLoadControl | 0x0096 | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | @@ -1899,7 +1902,7 @@ class SubscribeAttributeGroupsClusterRevision : public SubscribeAttribute { | * NameSupport | 0x0004 | | * LastConfiguredBy | 0x0005 | | * SceneTableSize | 0x0006 | -| * RemainingCapacity | 0x0007 | +| * FabricSceneInfo | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3102,34 +3105,38 @@ class SubscribeAttributeScenesSceneTableSize : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute RemainingCapacity + * Attribute FabricSceneInfo */ -class ReadScenesRemainingCapacity : public ReadAttribute { +class ReadScenesFabricSceneInfo : public ReadAttribute { public: - ReadScenesRemainingCapacity() - : ReadAttribute("remaining-capacity") + ReadScenesFabricSceneInfo() + : ReadAttribute("fabric-scene-info") { } - ~ReadScenesRemainingCapacity() + ~ReadScenesFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::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); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Scenes RemainingCapacity read Error", error); + LogNSError("Scenes FabricSceneInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -3138,21 +3145,21 @@ class ReadScenesRemainingCapacity : public ReadAttribute { } }; -class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { +class SubscribeAttributeScenesFabricSceneInfo : public SubscribeAttribute { public: - SubscribeAttributeScenesRemainingCapacity() - : SubscribeAttribute("remaining-capacity") + SubscribeAttributeScenesFabricSceneInfo() + : SubscribeAttribute("fabric-scene-info") { } - ~SubscribeAttributeScenesRemainingCapacity() + ~SubscribeAttributeScenesFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Scenes::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::RemainingCapacity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Scenes::Attributes::FabricSceneInfo::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); @@ -3167,10 +3174,10 @@ class SubscribeAttributeScenesRemainingCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingCapacityWithParams:params + [cluster subscribeAttributeFabricSceneInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Scenes.RemainingCapacity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14383,6 +14390,8 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { | * UniqueID | 0x0012 | | * CapabilityMinima | 0x0013 | | * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -16242,6 +16251,177 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SpecificationVersion + */ +class ReadBasicInformationSpecificationVersion : public ReadAttribute { +public: + ReadBasicInformationSpecificationVersion() + : ReadAttribute("specification-version") + { + } + + ~ReadBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SpecificationVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSpecificationVersion() + : SubscribeAttribute("specification-version") + { + } + + ~SubscribeAttributeBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSpecificationVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion 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 MaxPathsPerInvoke + */ +class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { +public: + ReadBasicInformationMaxPathsPerInvoke() + : ReadAttribute("max-paths-per-invoke") + { + } + + ~ReadBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationMaxPathsPerInvoke() + : SubscribeAttribute("max-paths-per-invoke") + { + } + + ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::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); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeMaxPathsPerInvokeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke 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 + /* * Attribute GeneratedCommandList */ @@ -49218,12 +49398,18 @@ class IcdManagementStayActiveRequest : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster stayActiveRequestWithParams:params completion: - ^(NSError * _Nullable error) { + ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -51427,6 +51613,1027 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OvenMode | 0x0049 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class OvenModeChangeToMode : public ClusterCommand { +public: + OvenModeChangeToMode() + : ClusterCommand("change-to-mode") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::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); + __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--) { + [cluster changeToModeWithParams:params completion: + ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadOvenModeSupportedModes : public ReadAttribute { +public: + ReadOvenModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadOvenModeSupportedModes() + { + } + + 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::SupportedModes::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") + { + } + + ~SubscribeAttributeOvenModeSupportedModes() + { + } + + 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::SupportedModes::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); + __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 subscribeAttributeSupportedModesWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.SupportedModes 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 CurrentMode + */ +class ReadOvenModeCurrentMode : public ReadAttribute { +public: + ReadOvenModeCurrentMode() + : ReadAttribute("current-mode") + { + } + + ~ReadOvenModeCurrentMode() + { + } + + 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::CurrentMode::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode CurrentMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeCurrentMode() + : SubscribeAttribute("current-mode") + { + } + + ~SubscribeAttributeOvenModeCurrentMode() + { + } + + 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::CurrentMode::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); + __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 subscribeAttributeCurrentModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode 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 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); + __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); + __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); + __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); + __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); + __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); + __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 + */ +class ReadOvenModeGeneratedCommandList : public ReadAttribute { +public: + ReadOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadOvenModeGeneratedCommandList() + { + } + + 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::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeOvenModeGeneratedCommandList() + { + } + + 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::GeneratedCommandList::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); + __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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadOvenModeAcceptedCommandList : public ReadAttribute { +public: + ReadOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadOvenModeAcceptedCommandList() + { + } + + 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::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeOvenModeAcceptedCommandList() + { + } + + 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::AcceptedCommandList::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); + __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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList 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 EventList + */ +class ReadOvenModeEventList : public ReadAttribute { +public: + ReadOvenModeEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOvenModeEventList() + { + } + + 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::EventList::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOvenModeEventList() + { + } + + 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::EventList::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); + __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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList 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 AttributeList + */ +class ReadOvenModeAttributeList : public ReadAttribute { +public: + ReadOvenModeAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadOvenModeAttributeList() + { + } + + 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::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeOvenModeAttributeList() + { + } + + 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::AttributeList::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); + __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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AttributeList 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 FeatureMap + */ +class ReadOvenModeFeatureMap : public ReadAttribute { +public: + ReadOvenModeFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadOvenModeFeatureMap() + { + } + + 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::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeOvenModeFeatureMap() + { + } + + 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::FeatureMap::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); + __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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.FeatureMap 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 ClusterRevision + */ +class ReadOvenModeClusterRevision : public ReadAttribute { +public: + ReadOvenModeClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadOvenModeClusterRevision() + { + } + + 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::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeOvenModeClusterRevision() + { + } + + 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::ClusterRevision::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); + __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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.ClusterRevision 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 #endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ @@ -70198,6 +71405,2706 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster BooleanSensorConfiguration | 0x0080 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SuppressRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SensitivityLevel | 0x0000 | +| * AlarmsActive | 0x0001 | +| * AlarmsSuppressed | 0x0002 | +| * AlarmsEnabled | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AlarmsStateChanged | 0x0000 | +| * SensorFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SuppressRequest + */ +class BooleanSensorConfigurationSuppressRequest : public ClusterCommand { +public: + BooleanSensorConfigurationSuppressRequest() + : ClusterCommand("suppress-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanSensorConfigurationClusterSuppressRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster suppressRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::BooleanSensorConfiguration::Commands::SuppressRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SensitivityLevel + */ +class ReadBooleanSensorConfigurationSensitivityLevel : public ReadAttribute { +public: + ReadBooleanSensorConfigurationSensitivityLevel() + : ReadAttribute("sensitivity-level") + { + } + + ~ReadBooleanSensorConfigurationSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.SensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration SensitivityLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBooleanSensorConfigurationSensitivityLevel : public WriteAttribute { +public: + WriteBooleanSensorConfigurationSensitivityLevel() + : WriteAttribute("sensitivity-level") + { + AddArgument("attr-name", "sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBooleanSensorConfigurationSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BooleanSensorConfiguration SensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBooleanSensorConfigurationSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationSensitivityLevel() + : SubscribeAttribute("sensitivity-level") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::SensitivityLevel::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeSensitivityLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.SensitivityLevel 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 AlarmsActive + */ +class ReadBooleanSensorConfigurationAlarmsActive : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAlarmsActive() + : ReadAttribute("alarms-active") + { + } + + ~ReadBooleanSensorConfigurationAlarmsActive() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsActive::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsActive response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AlarmsActive read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationAlarmsActive : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAlarmsActive() + : SubscribeAttribute("alarms-active") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAlarmsActive() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsActive::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAlarmsActiveWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsActive 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 AlarmsSuppressed + */ +class ReadBooleanSensorConfigurationAlarmsSuppressed : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAlarmsSuppressed() + : ReadAttribute("alarms-suppressed") + { + } + + ~ReadBooleanSensorConfigurationAlarmsSuppressed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSuppressed::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSuppressedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsSuppressed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AlarmsSuppressed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed() + : SubscribeAttribute("alarms-suppressed") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAlarmsSuppressed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsSuppressed::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAlarmsSuppressedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsSuppressed 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 AlarmsEnabled + */ +class ReadBooleanSensorConfigurationAlarmsEnabled : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAlarmsEnabled() + : ReadAttribute("alarms-enabled") + { + } + + ~ReadBooleanSensorConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AlarmsEnabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBooleanSensorConfigurationAlarmsEnabled : public WriteAttribute { +public: + WriteBooleanSensorConfigurationAlarmsEnabled() + : WriteAttribute("alarms-enabled") + { + AddArgument("attr-name", "alarms-enabled"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBooleanSensorConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeAlarmsEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BooleanSensorConfiguration AlarmsEnabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + : SubscribeAttribute("alarms-enabled") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AlarmsEnabled::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAlarmsEnabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AlarmsEnabled 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 + */ +class ReadBooleanSensorConfigurationGeneratedCommandList : public ReadAttribute { +public: + ReadBooleanSensorConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadBooleanSensorConfigurationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadBooleanSensorConfigurationAcceptedCommandList : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadBooleanSensorConfigurationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AcceptedCommandList 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 EventList + */ +class ReadBooleanSensorConfigurationEventList : public ReadAttribute { +public: + ReadBooleanSensorConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBooleanSensorConfigurationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.EventList 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 AttributeList + */ +class ReadBooleanSensorConfigurationAttributeList : public ReadAttribute { +public: + ReadBooleanSensorConfigurationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadBooleanSensorConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.AttributeList 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 FeatureMap + */ +class ReadBooleanSensorConfigurationFeatureMap : public ReadAttribute { +public: + ReadBooleanSensorConfigurationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadBooleanSensorConfigurationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.FeatureMap 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 ClusterRevision + */ +class ReadBooleanSensorConfigurationClusterRevision : public ReadAttribute { +public: + ReadBooleanSensorConfigurationClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadBooleanSensorConfigurationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanSensorConfiguration ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanSensorConfigurationClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeBooleanSensorConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeBooleanSensorConfigurationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanSensorConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanSensorConfiguration::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterBooleanSensorConfiguration 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanSensorConfiguration.ClusterRevision 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 +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ValveConfigurationAndControl | 0x0081 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Open | 0x00 | +| * Close | 0x01 | +| * SetLevel | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OpenDuration | 0x0000 | +| * AutoCloseTime | 0x0001 | +| * RemainingDuration | 0x0002 | +| * CurrentState | 0x0003 | +| * TargetState | 0x0004 | +| * StartUpState | 0x0005 | +| * CurrentLevel | 0x0006 | +| * TargetLevel | 0x0007 | +| * OpenLevel | 0x0008 | +| * ValveFault | 0x0009 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ValveStateChanged | 0x0000 | +| * ValveFault | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command Open + */ +class ValveConfigurationAndControlOpen : public ClusterCommand { +public: + ValveConfigurationAndControlOpen() + : ClusterCommand("open") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.openDuration.HasValue()) { + params.openDuration = [NSNumber numberWithUnsignedInt:mRequest.openDuration.Value()]; + } else { + params.openDuration = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Close + */ +class ValveConfigurationAndControlClose : public ClusterCommand { +public: + ValveConfigurationAndControlClose() + : ClusterCommand("close") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterCloseParams 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 closeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetLevel + */ +class ValveConfigurationAndControlSetLevel : public ClusterCommand { +public: + ValveConfigurationAndControlSetLevel() + : ClusterCommand("set-level") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Level", 0, UINT8_MAX, &mRequest.level); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterSetLevelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.openDuration.HasValue()) { + params.openDuration = [NSNumber numberWithUnsignedInt:mRequest.openDuration.Value()]; + } else { + params.openDuration = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setLevelWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::SetLevel::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute OpenDuration + */ +class ReadValveConfigurationAndControlOpenDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlOpenDuration() + : ReadAttribute("open-duration") + { + } + + ~ReadValveConfigurationAndControlOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl OpenDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteValveConfigurationAndControlOpenDuration : public WriteAttribute { +public: + WriteValveConfigurationAndControlOpenDuration() + : WriteAttribute("open-duration") + { + AddArgument("attr-name", "open-duration"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteValveConfigurationAndControlOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeOpenDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl OpenDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlOpenDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlOpenDuration() + : SubscribeAttribute("open-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeOpenDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenDuration 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 AutoCloseTime + */ +class ReadValveConfigurationAndControlAutoCloseTime : public ReadAttribute { +public: + ReadValveConfigurationAndControlAutoCloseTime() + : ReadAttribute("auto-close-time") + { + } + + ~ReadValveConfigurationAndControlAutoCloseTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAutoCloseTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AutoCloseTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + : SubscribeAttribute("auto-close-time") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAutoCloseTimeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AutoCloseTime 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 RemainingDuration + */ +class ReadValveConfigurationAndControlRemainingDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlRemainingDuration() + : ReadAttribute("remaining-duration") + { + } + + ~ReadValveConfigurationAndControlRemainingDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl RemainingDuration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlRemainingDuration() + : SubscribeAttribute("remaining-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlRemainingDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeRemainingDurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.RemainingDuration 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 CurrentState + */ +class ReadValveConfigurationAndControlCurrentState : public ReadAttribute { +public: + ReadValveConfigurationAndControlCurrentState() + : ReadAttribute("current-state") + { + } + + ~ReadValveConfigurationAndControlCurrentState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl CurrentState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlCurrentState : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlCurrentState() + : SubscribeAttribute("current-state") + { + } + + ~SubscribeAttributeValveConfigurationAndControlCurrentState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeCurrentStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentState 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 TargetState + */ +class ReadValveConfigurationAndControlTargetState : public ReadAttribute { +public: + ReadValveConfigurationAndControlTargetState() + : ReadAttribute("target-state") + { + } + + ~ReadValveConfigurationAndControlTargetState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl TargetState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlTargetState : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlTargetState() + : SubscribeAttribute("target-state") + { + } + + ~SubscribeAttributeValveConfigurationAndControlTargetState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeTargetStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState 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 StartUpState + */ +class ReadValveConfigurationAndControlStartUpState : public ReadAttribute { +public: + ReadValveConfigurationAndControlStartUpState() + : ReadAttribute("start-up-state") + { + } + + ~ReadValveConfigurationAndControlStartUpState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::StartUpState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.StartUpState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl StartUpState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteValveConfigurationAndControlStartUpState : public WriteAttribute { +public: + WriteValveConfigurationAndControlStartUpState() + : WriteAttribute("start-up-state") + { + AddArgument("attr-name", "start-up-state"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteValveConfigurationAndControlStartUpState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::StartUpState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeStartUpStateWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl StartUpState write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlStartUpState : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlStartUpState() + : SubscribeAttribute("start-up-state") + { + } + + ~SubscribeAttributeValveConfigurationAndControlStartUpState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::StartUpState::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeStartUpStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.StartUpState 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 CurrentLevel + */ +class ReadValveConfigurationAndControlCurrentLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlCurrentLevel() + : ReadAttribute("current-level") + { + } + + ~ReadValveConfigurationAndControlCurrentLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl CurrentLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlCurrentLevel() + : SubscribeAttribute("current-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlCurrentLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeCurrentLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel 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 TargetLevel + */ +class ReadValveConfigurationAndControlTargetLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlTargetLevel() + : ReadAttribute("target-level") + { + } + + ~ReadValveConfigurationAndControlTargetLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl TargetLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlTargetLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlTargetLevel() + : SubscribeAttribute("target-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlTargetLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeTargetLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel 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 OpenLevel + */ +class ReadValveConfigurationAndControlOpenLevel : public ReadAttribute { +public: + ReadValveConfigurationAndControlOpenLevel() + : ReadAttribute("open-level") + { + } + + ~ReadValveConfigurationAndControlOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl OpenLevel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteValveConfigurationAndControlOpenLevel : public WriteAttribute { +public: + WriteValveConfigurationAndControlOpenLevel() + : WriteAttribute("open-level") + { + AddArgument("attr-name", "open-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteValveConfigurationAndControlOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 writeAttributeOpenLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl OpenLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlOpenLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlOpenLevel() + : SubscribeAttribute("open-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenLevel::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeOpenLevelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenLevel 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 ValveFault + */ +class ReadValveConfigurationAndControlValveFault : public ReadAttribute { +public: + ReadValveConfigurationAndControlValveFault() + : ReadAttribute("valve-fault") + { + } + + ~ReadValveConfigurationAndControlValveFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeValveFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl ValveFault read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlValveFault : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlValveFault() + : SubscribeAttribute("valve-fault") + { + } + + ~SubscribeAttributeValveConfigurationAndControlValveFault() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeValveFaultWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault 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 + */ +class ReadValveConfigurationAndControlGeneratedCommandList : public ReadAttribute { +public: + ReadValveConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadValveConfigurationAndControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList 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 AcceptedCommandList + */ +class ReadValveConfigurationAndControlAcceptedCommandList : public ReadAttribute { +public: + ReadValveConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadValveConfigurationAndControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList 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 EventList + */ +class ReadValveConfigurationAndControlEventList : public ReadAttribute { +public: + ReadValveConfigurationAndControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadValveConfigurationAndControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList 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 AttributeList + */ +class ReadValveConfigurationAndControlAttributeList : public ReadAttribute { +public: + ReadValveConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadValveConfigurationAndControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeValveConfigurationAndControlAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList 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 FeatureMap + */ +class ReadValveConfigurationAndControlFeatureMap : public ReadAttribute { +public: + ReadValveConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadValveConfigurationAndControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeValveConfigurationAndControlFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.FeatureMap 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 ClusterRevision + */ +class ReadValveConfigurationAndControlClusterRevision : public ReadAttribute { +public: + ReadValveConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadValveConfigurationAndControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ValveConfigurationAndControl ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeValveConfigurationAndControlClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeValveConfigurationAndControlClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::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); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl 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 subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ClusterRevision 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 #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL @@ -70212,15 +74119,14 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public | * ClearLoadControlEventsRequest | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * DeviceClass | 0x0000 | -| * LoadControlPrograms | 0x0001 | -| * NumberOfLoadControlPrograms | 0x0002 | -| * Events | 0x0003 | -| * ActiveEvents | 0x0004 | -| * NumberOfEventsPerProgram | 0x0005 | -| * NumberOfTransistions | 0x0006 | -| * DefaultRandomStart | 0x0007 | -| * DefaultRandomDuration | 0x0008 | +| * LoadControlPrograms | 0x0000 | +| * NumberOfLoadControlPrograms | 0x0001 | +| * Events | 0x0002 | +| * ActiveEvents | 0x0003 | +| * NumberOfEventsPerProgram | 0x0004 | +| * NumberOfTransitions | 0x0005 | +| * DefaultRandomStart | 0x0006 | +| * DefaultRandomDuration | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -70467,7 +74373,7 @@ class DemandResponseLoadControlAddLoadControlEventRequest : public ClusterComman } if (entry_1.powerSavingsControl.HasValue()) { newElement_1.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; - newElement_1.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.powerSavingsControl.Value().powerSavings)]; + newElement_1.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_1.powerSavingsControl.Value().powerSavings]; } else { newElement_1.powerSavingsControl = nil; } @@ -70615,91 +74521,6 @@ class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCom #if MTR_ENABLE_PROVISIONAL -/* - * Attribute DeviceClass - */ -class ReadDemandResponseLoadControlDeviceClass : public ReadAttribute { -public: - ReadDemandResponseLoadControlDeviceClass() - : ReadAttribute("device-class") - { - } - - ~ReadDemandResponseLoadControlDeviceClass() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DeviceClass::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); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceClassWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DeviceClass response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DemandResponseLoadControl DeviceClass read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDemandResponseLoadControlDeviceClass : public SubscribeAttribute { -public: - SubscribeAttributeDemandResponseLoadControlDeviceClass() - : SubscribeAttribute("device-class") - { - } - - ~SubscribeAttributeDemandResponseLoadControlDeviceClass() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DeviceClass::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); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl 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 subscribeAttributeDeviceClassWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DeviceClass 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 LoadControlPrograms */ @@ -71126,34 +74947,34 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfTransistions + * Attribute NumberOfTransitions */ -class ReadDemandResponseLoadControlNumberOfTransistions : public ReadAttribute { +class ReadDemandResponseLoadControlNumberOfTransitions : public ReadAttribute { public: - ReadDemandResponseLoadControlNumberOfTransistions() - : ReadAttribute("number-of-transistions") + ReadDemandResponseLoadControlNumberOfTransitions() + : ReadAttribute("number-of-transitions") { } - ~ReadDemandResponseLoadControlNumberOfTransistions() + ~ReadDemandResponseLoadControlNumberOfTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransistions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::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); __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTransistionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfTransistions response %@", [value description]); + [cluster readAttributeNumberOfTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl NumberOfTransistions read Error", error); + LogNSError("DemandResponseLoadControl NumberOfTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71162,21 +74983,21 @@ class ReadDemandResponseLoadControlNumberOfTransistions : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlNumberOfTransistions : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlNumberOfTransistions() - : SubscribeAttribute("number-of-transistions") + SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() + : SubscribeAttribute("number-of-transitions") { } - ~SubscribeAttributeDemandResponseLoadControlNumberOfTransistions() + ~SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransistions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::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); @@ -71191,10 +75012,10 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfTransistions : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfTransistionsWithParams:params + [cluster subscribeAttributeNumberOfTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfTransistions response %@", [value description]); + NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158311,8 +162132,8 @@ void registerClusterScenes(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -158802,6 +162623,14 @@ void registerClusterBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#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(), // make_unique(), // make_unique(), // @@ -160206,6 +164035,68 @@ void registerClusterTimer(Commands & commands) 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 +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL + }; + + commands.RegisterCluster(clusterName, clusterCommands); +#endif // MTR_ENABLE_PROVISIONAL +} void registerClusterModeSelect(Commands & commands) { using namespace chip::app::Clusters::ModeSelect; @@ -161353,6 +165244,165 @@ void registerClusterActivatedCarbonFilterMonitoring(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } +void registerClusterBooleanSensorConfiguration(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::BooleanSensorConfiguration; + + const char * clusterName = "BooleanSensorConfiguration"; + + 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(), // + 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(), // + 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 registerClusterValveConfigurationAndControl(Commands & commands) +{ +#if MTR_ENABLE_PROVISIONAL + using namespace chip::app::Clusters::ValveConfigurationAndControl; + + const char * clusterName = "ValveConfigurationAndControl"; + + 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(), // + 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(), // + 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(), // + 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 registerClusterDemandResponseLoadControl(Commands & commands) { #if MTR_ENABLE_PROVISIONAL @@ -161380,10 +165430,6 @@ void registerClusterDemandResponseLoadControl(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(), // @@ -161405,8 +165451,8 @@ void registerClusterDemandResponseLoadControl(Commands & commands) make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // @@ -164558,6 +168604,7 @@ void registerClusters(Commands & commands) registerClusterBooleanState(commands); registerClusterIcdManagement(commands); registerClusterTimer(commands); + registerClusterOvenMode(commands); registerClusterModeSelect(commands); registerClusterLaundryWasherMode(commands); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands); @@ -164576,6 +168623,8 @@ void registerClusters(Commands & commands) registerClusterRvcOperationalState(commands); registerClusterHepaFilterMonitoring(commands); registerClusterActivatedCarbonFilterMonitoring(commands); + registerClusterBooleanSensorConfiguration(commands); + registerClusterValveConfigurationAndControl(commands); registerClusterDemandResponseLoadControl(commands); registerClusterDoorLock(commands); registerClusterWindowCovering(commands); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 3db46600ff03ff..1c9892f1a4c767 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -296,6 +296,7 @@ class TestList : public Command { printf("Test_TC_DRLK_2_11\n"); printf("TestGroupsCluster\n"); printf("Test_TC_G_1_1\n"); + printf("TestScenesFabricRemoval\n"); printf("Test_TC_S_1_1\n"); printf("Test_TC_S_2_1\n"); printf("Test_TC_S_2_4\n"); @@ -45169,7 +45170,7 @@ class Test_TC_BINFO_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 2U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -55560,104 +55561,108 @@ class TestIcdManagementCluster : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read IdleModeDuration\n"); - err = TestReadIdleModeDuration_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read Feature Map\n"); + err = TestReadFeatureMap_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read ActiveModeDuration\n"); - err = TestReadActiveModeDuration_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read IdleModeDuration\n"); + err = TestReadIdleModeDuration_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read ActiveModeThreshold\n"); - err = TestReadActiveModeThreshold_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read ActiveModeDuration\n"); + err = TestReadActiveModeDuration_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ICDCounter\n"); - err = TestReadICDCounter_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read ActiveModeThreshold\n"); + err = TestReadActiveModeThreshold_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read ClientsSupportedPerFabric\n"); - err = TestReadClientsSupportedPerFabric_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read ICDCounter\n"); + err = TestReadICDCounter_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Unregister 1.0\n"); - err = TestUnregister10_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read ClientsSupportedPerFabric\n"); + err = TestReadClientsSupportedPerFabric_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Unregister 2.0\n"); - err = TestUnregister20_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Unregister 1.0\n"); + err = TestUnregister10_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Unregister 3.0\n"); - err = TestUnregister30_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Unregister 2.0\n"); + err = TestUnregister20_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Unregister 3.0\n"); + err = TestUnregister30_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Register 1.0 (key too short)\n"); - err = TestRegister10KeyTooShort_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Register 1.0 (key too long)\n"); - err = TestRegister10KeyTooLong_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Register 1.0 (key too short)\n"); + err = TestRegister10KeyTooShort_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Register 1.1\n"); - err = TestRegister11_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Register 1.0 (key too long)\n"); + err = TestRegister10KeyTooLong_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Register 2.1\n"); - err = TestRegister21_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Register 1.1\n"); + err = TestRegister11_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Register 3.1\n"); - err = TestRegister31_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Register 2.1\n"); + err = TestRegister21_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Register 3.1\n"); + err = TestRegister31_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Register 1.1 (update)\n"); - err = TestRegister11Update_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Register 1.1 (update)\n"); + err = TestRegister11Update_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Register 2.2 (wrong verification key)\n"); - err = TestRegister22WrongVerificationKey_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Register 2.2 (wrong verification key)\n"); + err = TestRegister22WrongVerificationKey_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Unregister 1.1 (wrong key)\n"); - err = TestUnregister11WrongKey_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Unregister 1.1 (wrong key)\n"); + err = TestUnregister11WrongKey_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Unregister 2.1\n"); - err = TestUnregister21_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read RegisteredClients\n"); - err = TestReadRegisteredClients_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Unregister 2.1\n"); + err = TestUnregister21_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Unregister 1.3\n"); - err = TestUnregister13_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Read RegisteredClients\n"); + err = TestReadRegisteredClients_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Unregister 2.2\n"); - err = TestUnregister22_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Unregister 1.3\n"); + err = TestUnregister13_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Unregister 2.2\n"); + err = TestUnregister22_26(); break; } @@ -55689,7 +55694,7 @@ class TestIcdManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); @@ -55698,25 +55703,25 @@ class TestIcdManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_CONSTRAINT_ERROR)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_RESOURCE_EXHAUSTED)); break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -55743,11 +55748,14 @@ class TestIcdManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); + break; } // Go on to the next test. @@ -55758,7 +55766,7 @@ class TestIcdManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 26; + const uint16_t mTestCount = 27; chip::Optional mNodeId; chip::Optional mCluster; @@ -55773,7 +55781,34 @@ class TestIcdManagementCluster : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadIdleModeDuration_1() + CHIP_ERROR TestReadFeatureMap_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Read Feature Map: Error: %@", err); + } else { + NSLog(@"Read Feature Map: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 7UL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadIdleModeDuration_2() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55800,7 +55835,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadActiveModeDuration_2() + CHIP_ERROR TestReadActiveModeDuration_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55827,7 +55862,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadActiveModeThreshold_3() + CHIP_ERROR TestReadActiveModeThreshold_4() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55854,7 +55889,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadICDCounter_4() + CHIP_ERROR TestReadICDCounter_5() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55881,7 +55916,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadClientsSupportedPerFabric_5() + CHIP_ERROR TestReadClientsSupportedPerFabric_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55908,7 +55943,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister10_6() + CHIP_ERROR TestUnregister10_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55933,7 +55968,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister20_7() + CHIP_ERROR TestUnregister20_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55958,7 +55993,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister30_8() + CHIP_ERROR TestUnregister30_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -55983,7 +56018,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_9() + CHIP_ERROR TestReadRegisteredClients_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56012,7 +56047,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister10KeyTooShort_10() + CHIP_ERROR TestRegister10KeyTooShort_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56041,7 +56076,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister10KeyTooLong_11() + CHIP_ERROR TestRegister10KeyTooLong_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56070,7 +56105,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister11_12() + CHIP_ERROR TestRegister11_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56105,7 +56140,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister21_13() + CHIP_ERROR TestRegister21_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56140,7 +56175,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister31_14() + CHIP_ERROR TestRegister31_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56169,7 +56204,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_15() + CHIP_ERROR TestReadRegisteredClients_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56202,7 +56237,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister11Update_16() + CHIP_ERROR TestRegister11Update_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56237,7 +56272,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_17() + CHIP_ERROR TestReadRegisteredClients_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56270,7 +56305,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRegister22WrongVerificationKey_18() + CHIP_ERROR TestRegister22WrongVerificationKey_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56307,7 +56342,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_19() + CHIP_ERROR TestReadRegisteredClients_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56340,7 +56375,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister11WrongKey_20() + CHIP_ERROR TestUnregister11WrongKey_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56368,7 +56403,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_21() + CHIP_ERROR TestReadRegisteredClients_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56399,7 +56434,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister21_22() + CHIP_ERROR TestUnregister21_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56425,7 +56460,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadRegisteredClients_23() + CHIP_ERROR TestReadRegisteredClients_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56454,7 +56489,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister13_24() + CHIP_ERROR TestUnregister13_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -56479,7 +56514,7 @@ class TestIcdManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestUnregister22_25() + CHIP_ERROR TestUnregister22_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -149592,8 +149627,16 @@ class TestBasicInformation : public TestCommandBridge { err = TestRestoreInitialLocalConfigDisabledValue_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read the ProductApppearance value\n"); - err = TestReadTheProductApppearanceValue_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : Read the ProductAppearance value\n"); + err = TestReadTheProductAppearanceValue_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read the Specification Version value\n"); + err = TestReadTheSpecificationVersionValue_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Read the Max Paths Per Invoke value\n"); + err = TestReadTheMaxPathsPerInvokeValue_21(); break; } @@ -149666,6 +149709,12 @@ class TestBasicInformation : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -149676,7 +149725,7 @@ class TestBasicInformation : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -149811,7 +149860,7 @@ class TestBasicInformation : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(26))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(28))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); @@ -149832,12 +149881,14 @@ class TestBasicInformation : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[17], 18UL)); VerifyOrReturn(CheckValue("", actualValue[18], 19UL)); VerifyOrReturn(CheckValue("", actualValue[19], 20UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 65530UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[25], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 21UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 22UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65530UL)); + VerifyOrReturn(CheckValue("", actualValue[25], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[27], 65533UL)); } NextTest(); @@ -149864,7 +149915,7 @@ class TestBasicInformation : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(25))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(27))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); @@ -149885,11 +149936,13 @@ class TestBasicInformation : public TestCommandBridge { VerifyOrReturn(CheckValue("", actualValue[17], 18UL)); VerifyOrReturn(CheckValue("", actualValue[18], 19UL)); VerifyOrReturn(CheckValue("", actualValue[19], 20UL)); - VerifyOrReturn(CheckValue("", actualValue[20], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[21], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[22], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[23], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[24], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[20], 21UL)); + VerifyOrReturn(CheckValue("", actualValue[21], 22UL)); + VerifyOrReturn(CheckValue("", actualValue[22], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[23], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[24], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[25], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[26], 65533UL)); } NextTest(); @@ -150173,7 +150226,7 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheProductApppearanceValue_19() + CHIP_ERROR TestReadTheProductAppearanceValue_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -150182,9 +150235,9 @@ class TestBasicInformation : public TestCommandBridge { [cluster readAttributeProductAppearanceWithCompletion:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Read the ProductApppearance value: Error: %@", err); + NSLog(@"Read the ProductAppearance value: Error: %@", err); } else { - NSLog(@"Read the ProductApppearance value: Success"); + NSLog(@"Read the ProductAppearance value: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -150201,200 +150254,53 @@ class TestBasicInformation : public TestCommandBridge { return CHIP_NO_ERROR; } -}; - -class TestFabricRemovalWhileSubscribed : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestFabricRemovalWhileSubscribed() - : TestCommandBridge("TestFabricRemovalWhileSubscribed") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~TestFabricRemovalWhileSubscribed() - { - } - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestFabricRemovalWhileSubscribed\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestFabricRemovalWhileSubscribed\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); - err = TestReadNumberOfCommissionedFabrics_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); - err = TestReadCurrentFabricIndex_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Open commissioning window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from beta\n"); - err = TestCommissionFromBeta_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for beta\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Report: Subscribe Fabrics Attribute from beta\n"); - err = TestReportSubscribeFabricsAttributeFromBeta_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Subscribe Fabrics Attribute from beta\n"); - err = TestSubscribeFabricsAttributeFromBeta_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Remove single own fabric\n"); - err = TestRemoveSingleOwnFabric_8(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() + CHIP_ERROR TestReadTheSpecificationVersionValue_20() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Read number of commissioned fabrics: Error: %@", err); + NSLog(@"Read the Specification Version value: Error: %@", err); } else { - NSLog(@"Read number of commissioned fabrics: Success"); + NSLog(@"Read the Specification Version value: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); + VerifyOrReturn(CheckValue("SpecificationVersion", actualValue, 16973824UL)); } - VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ourFabricIndex; - CHIP_ERROR TestReadCurrentFabricIndex_2() + CHIP_ERROR TestReadTheMaxPathsPerInvokeValue_21() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Read current fabric index: Error: %@", err); + NSLog(@"Read the Max Paths Per Invoke value: Error: %@", err); } else { - NSLog(@"Read current fabric index: Success"); + NSLog(@"Read the Max Paths Per Invoke value: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { - ourFabricIndex = value; + id actualValue = value; + VerifyOrReturn(CheckValue("MaxPathsPerInvoke", actualValue, 1U)); } NextTest(); @@ -150402,147 +150308,13 @@ class TestFabricRemovalWhileSubscribed : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = - [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params completion: - ^(NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Open commissioning window from alpha: Error: %@", err); - } else { - NSLog(@"Open commissioning window from alpha: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCommissionFromBeta_4() - { - - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = 74565ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = 74565ULL; - return WaitForCommissionee("beta", value); - } - bool testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = false; - ResponseHandler _Nullable test_TestFabricRemovalWhileSubscribed_Fabrics_Reported - = nil; - - CHIP_ERROR TestReportSubscribeFabricsAttributeFromBeta_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - test_TestFabricRemovalWhileSubscribed_Fabrics_Reported - = ^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Report: Subscribe Fabrics Attribute from beta: Error: %@", err); - } else { - NSLog(@"Report: Subscribe Fabrics Attribute from beta: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); - testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = true; - }; - - NextTest(); - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSubscribeFabricsAttributeFromBeta_7() - { - - MTRBaseDevice * device = GetDevice("beta"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - uint16_t minIntervalArgument = 2U; - uint16_t maxIntervalArgument = 5U; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) maxInterval:@(maxIntervalArgument)]; - params.filterByFabric = true; - params.replaceExistingSubscriptions = true; - [cluster subscribeAttributeFabricsWithParams:params - subscriptionEstablished:^{ - VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); - NextTest(); - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Subscribe Fabrics Attribute from beta: Error: %@", err); - } else { - NSLog(@"Subscribe Fabrics Attribute from beta: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (test_TestFabricRemovalWhileSubscribed_Fabrics_Reported - != nil) { - ResponseHandler callback = test_TestFabricRemovalWhileSubscribed_Fabrics_Reported; - test_TestFabricRemovalWhileSubscribed_Fabrics_Reported - = nil; - callback(value, err); - } - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestRemoveSingleOwnFabric_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = - [ourFabricIndex copy]; - [cluster removeFabricWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Remove single own fabric: Error: %@", err); - } else { - NSLog(@"Remove single own fabric: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } }; -class TestGeneralCommissioning : public TestCommandBridge { +class TestFabricRemovalWhileSubscribed : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - TestGeneralCommissioning() - : TestCommandBridge("TestGeneralCommissioning") + TestFabricRemovalWhileSubscribed() + : TestCommandBridge("TestFabricRemovalWhileSubscribed") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -150554,7 +150326,7 @@ class TestGeneralCommissioning : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~TestGeneralCommissioning() + ~TestFabricRemovalWhileSubscribed() { } @@ -150564,11 +150336,11 @@ class TestGeneralCommissioning : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: TestGeneralCommissioning\n"); + ChipLogProgress(chipTool, " **** Test Start: TestFabricRemovalWhileSubscribed\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: TestGeneralCommissioning\n"); + ChipLogProgress(chipTool, " **** Test Complete: TestFabricRemovalWhileSubscribed\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -150585,160 +150357,495 @@ class TestGeneralCommissioning : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Write Breadcrumb (1/2)\n"); - err = TestWriteBreadcrumb12_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read number of commissioned fabrics\n"); + err = TestReadNumberOfCommissionedFabrics_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Breadcrumb (1/2)\n"); - err = TestReadBackBreadcrumb12_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read current fabric index\n"); + err = TestReadCurrentFabricIndex_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Write Breadcrumb (2/2)\n"); - err = TestWriteBreadcrumb22_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Open commissioning window from alpha\n"); + err = TestOpenCommissioningWindowFromAlpha_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Breadcrumb (2/2)\n"); - err = TestReadBackBreadcrumb22_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from beta\n"); + err = TestCommissionFromBeta_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot to reset Breadcrumb\n"); - err = TestRebootToResetBreadcrumb_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for beta\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Connect to the device again\n"); - err = TestConnectToTheDeviceAgain_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Report: Subscribe Fabrics Attribute from beta\n"); + err = TestReportSubscribeFabricsAttributeFromBeta_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read back Breadcrumb after reboot and ensure it was not persisted\n"); - err = TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Subscribe Fabrics Attribute from beta\n"); + err = TestSubscribeFabricsAttributeFromBeta_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Set Breadcrumb to nonzero value\n"); - err = TestSetBreadcrumbToNonzeroValue_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Check Breadcrumb set worked\n"); - err = TestCheckBreadcrumbSetWorked_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Send CommissioningComplete without armed fail-safe\n"); - err = TestSendCommissioningCompleteWithoutArmedFailSafe_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check Breadcrumb was not touched by invalid CommissioningComplete\n"); - err = TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Open Commissioning Window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Try to arm fail-safe\n"); - err = TestTryToArmFailSafe_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Check Breadcrumb was not touched by ArmFailSafe with commissioning window open\n"); - err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reset Breadcrumb to 0 so we can commission\n"); - err = TestResetBreadcrumbTo0SoWeCanCommission_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Commission from beta\n"); - err = TestCommissionFromBeta_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait for the commissioned device to be retrieved for beta\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Arm fail-safe\n"); - err = TestArmFailSafe_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check Breadcrumb was properly set by ArmFailSafe\n"); - err = TestCheckBreadcrumbWasProperlySetByArmFailSafe_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Try to arm fail-safe from wrong fabric\n"); - err = TestTryToArmFailSafeFromWrongFabric_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed\n"); - err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Send CommissioningComplete from wrong fabric\n"); - err = TestSendCommissioningCompleteFromWrongFabric_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Check Breadcrumb was not touched by CommissioningComplete from wrong fabric\n"); - err = TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Close out the fail-safe gracefully\n"); - err = TestCloseOutTheFailSafeGracefully_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Check Breadcrumb was reset to 0 by CommissioningComplete\n"); - err = TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Arm fail-safe again\n"); - err = TestArmFailSafeAgain_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Check Breadcrumb was set by arming fail-safe again\n"); - err = TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Force-expire the fail-safe\n"); - err = TestForceExpireTheFailSafe_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Check Breadcrumb was reset by expiring the fail-safe\n"); - err = TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Validate presence of SupportsConcurrentConnection\n"); - err = TestValidatePresenceOfSupportsConcurrentConnection_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read original regulatory location\n"); - err = TestReadOriginalRegulatoryLocation_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read original location\n"); - err = TestReadOriginalLocation_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Try to SetRegulatoryConfig with 0-length country code\n"); - err = TestTryToSetRegulatoryConfigWith0LengthCountryCode_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read back location\n"); - err = TestReadBackLocation_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Try to SetRegulatoryConfig with length-1 country code\n"); - err = TestTryToSetRegulatoryConfigWithLength1CountryCode_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read back location second time\n"); - err = TestReadBackLocationSecondTime_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Try to SetRegulatoryConfig with length-2 country code\n"); - err = TestTryToSetRegulatoryConfigWithLength2CountryCode_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read back location third time\n"); - err = TestReadBackLocationThirdTime_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Restore initial values\n"); - err = TestRestoreInitialValues_39(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Remove single own fabric\n"); + err = TestRemoveSingleOwnFabric_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadNumberOfCommissionedFabrics_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Read number of commissioned fabrics: Error: %@", err); + } else { + NSLog(@"Read number of commissioned fabrics: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("commissionedFabrics", "int8u", "int8u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull ourFabricIndex; + + CHIP_ERROR TestReadCurrentFabricIndex_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Read current fabric index: Error: %@", err); + } else { + NSLog(@"Read current fabric index: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("currentFabricIndex", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); + { + ourFabricIndex = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = + [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Open commissioning window from alpha: Error: %@", err); + } else { + NSLog(@"Open commissioning window from alpha: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCommissionFromBeta_4() + { + + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = 74565ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode("beta", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = 74565ULL; + return WaitForCommissionee("beta", value); + } + bool testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = false; + ResponseHandler _Nullable test_TestFabricRemovalWhileSubscribed_Fabrics_Reported + = nil; + + CHIP_ERROR TestReportSubscribeFabricsAttributeFromBeta_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + test_TestFabricRemovalWhileSubscribed_Fabrics_Reported + = ^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Report: Subscribe Fabrics Attribute from beta: Error: %@", err); + } else { + NSLog(@"Report: Subscribe Fabrics Attribute from beta: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); + testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled = true; + }; + + NextTest(); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSubscribeFabricsAttributeFromBeta_7() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + uint16_t minIntervalArgument = 2U; + uint16_t maxIntervalArgument = 5U; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(minIntervalArgument) maxInterval:@(maxIntervalArgument)]; + params.filterByFabric = true; + params.replaceExistingSubscriptions = true; + [cluster subscribeAttributeFabricsWithParams:params + subscriptionEstablished:^{ + VerifyOrReturn(testSendClusterTestFabricRemovalWhileSubscribed_6_WaitForReport_Fulfilled, SetCommandExitStatus(CHIP_ERROR_INCORRECT_STATE)); + NextTest(); + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Subscribe Fabrics Attribute from beta: Error: %@", err); + } else { + NSLog(@"Subscribe Fabrics Attribute from beta: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (test_TestFabricRemovalWhileSubscribed_Fabrics_Reported + != nil) { + ResponseHandler callback = test_TestFabricRemovalWhileSubscribed_Fabrics_Reported; + test_TestFabricRemovalWhileSubscribed_Fabrics_Reported + = nil; + callback(value, err); + } + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRemoveSingleOwnFabric_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = + [ourFabricIndex copy]; + [cluster removeFabricWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Remove single own fabric: Error: %@", err); + } else { + NSLog(@"Remove single own fabric: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class TestGeneralCommissioning : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestGeneralCommissioning() + : TestCommandBridge("TestGeneralCommissioning") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestGeneralCommissioning() + { + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestGeneralCommissioning\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestGeneralCommissioning\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Write Breadcrumb (1/2)\n"); + err = TestWriteBreadcrumb12_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read back Breadcrumb (1/2)\n"); + err = TestReadBackBreadcrumb12_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Write Breadcrumb (2/2)\n"); + err = TestWriteBreadcrumb22_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back Breadcrumb (2/2)\n"); + err = TestReadBackBreadcrumb22_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reboot to reset Breadcrumb\n"); + err = TestRebootToResetBreadcrumb_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Connect to the device again\n"); + err = TestConnectToTheDeviceAgain_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read back Breadcrumb after reboot and ensure it was not persisted\n"); + err = TestReadBackBreadcrumbAfterRebootAndEnsureItWasNotPersisted_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Set Breadcrumb to nonzero value\n"); + err = TestSetBreadcrumbToNonzeroValue_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Check Breadcrumb set worked\n"); + err = TestCheckBreadcrumbSetWorked_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Send CommissioningComplete without armed fail-safe\n"); + err = TestSendCommissioningCompleteWithoutArmedFailSafe_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Check Breadcrumb was not touched by invalid CommissioningComplete\n"); + err = TestCheckBreadcrumbWasNotTouchedByInvalidCommissioningComplete_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Open Commissioning Window from alpha\n"); + err = TestOpenCommissioningWindowFromAlpha_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Try to arm fail-safe\n"); + err = TestTryToArmFailSafe_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Check Breadcrumb was not touched by ArmFailSafe with commissioning window open\n"); + err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithCommissioningWindowOpen_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reset Breadcrumb to 0 so we can commission\n"); + err = TestResetBreadcrumbTo0SoWeCanCommission_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Commission from beta\n"); + err = TestCommissionFromBeta_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait for the commissioned device to be retrieved for beta\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrievedForBeta_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Arm fail-safe\n"); + err = TestArmFailSafe_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Check Breadcrumb was properly set by ArmFailSafe\n"); + err = TestCheckBreadcrumbWasProperlySetByArmFailSafe_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Try to arm fail-safe from wrong fabric\n"); + err = TestTryToArmFailSafeFromWrongFabric_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Check Breadcrumb was not touched by ArmFailSafe with existing fail-safe armed\n"); + err = TestCheckBreadcrumbWasNotTouchedByArmFailSafeWithExistingFailSafeArmed_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Send CommissioningComplete from wrong fabric\n"); + err = TestSendCommissioningCompleteFromWrongFabric_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Check Breadcrumb was not touched by CommissioningComplete from wrong fabric\n"); + err = TestCheckBreadcrumbWasNotTouchedByCommissioningCompleteFromWrongFabric_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Close out the fail-safe gracefully\n"); + err = TestCloseOutTheFailSafeGracefully_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Check Breadcrumb was reset to 0 by CommissioningComplete\n"); + err = TestCheckBreadcrumbWasResetTo0ByCommissioningComplete_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Arm fail-safe again\n"); + err = TestArmFailSafeAgain_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Check Breadcrumb was set by arming fail-safe again\n"); + err = TestCheckBreadcrumbWasSetByArmingFailSafeAgain_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Force-expire the fail-safe\n"); + err = TestForceExpireTheFailSafe_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Check Breadcrumb was reset by expiring the fail-safe\n"); + err = TestCheckBreadcrumbWasResetByExpiringTheFailSafe_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Validate presence of SupportsConcurrentConnection\n"); + err = TestValidatePresenceOfSupportsConcurrentConnection_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Read original regulatory location\n"); + err = TestReadOriginalRegulatoryLocation_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read original location\n"); + err = TestReadOriginalLocation_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Try to SetRegulatoryConfig with 0-length country code\n"); + err = TestTryToSetRegulatoryConfigWith0LengthCountryCode_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read back location\n"); + err = TestReadBackLocation_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Try to SetRegulatoryConfig with length-1 country code\n"); + err = TestTryToSetRegulatoryConfigWithLength1CountryCode_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read back location second time\n"); + err = TestReadBackLocationSecondTime_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Try to SetRegulatoryConfig with length-2 country code\n"); + err = TestTryToSetRegulatoryConfigWithLength2CountryCode_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read back location third time\n"); + err = TestReadBackLocationThirdTime_38(); + break; + case 39: + ChipLogProgress(chipTool, " ***** Test Step 39 : Restore initial values\n"); + err = TestRestoreInitialValues_39(); break; } @@ -187554,14 +187661,1605 @@ class Test_TC_G_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT: Error: %@", err); + } else { + NSLog(@"Step 2: TH reads the ClusterRevision from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3aThReadsTheFeatureMapFromDut_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 3a: TH reads the FeatureMap from DUT: Error: %@", err); + } else { + NSLog(@"Step 3a: TH reads the FeatureMap from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep3bGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 3b: Given G.S.F00 ensure featuremap has the correct bit set: Error: %@", err); + } else { + NSLog(@"Step 3b: Given G.S.F00 ensure featuremap has the correct bit set: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 4: TH reads AttributeList from DUT: Error: %@", err); + } else { + NSLog(@"Step 4: TH reads AttributeList from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep4ThReadsAttributeListFromDut_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 4: TH reads AttributeList from DUT: Error: %@", err); + } else { + NSLog(@"Step 4: TH reads AttributeList from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT: Error: %@", err); + } else { + NSLog(@"Step 6: TH reads AcceptedCommandList from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT: Error: %@", err); + } else { + NSLog(@"Step 7: TH reads GeneratedCommandList from DUT: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class TestScenesFabricRemoval : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + TestScenesFabricRemoval() + : TestCommandBridge("TestScenesFabricRemoval") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("payload", &mPayload); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); + AddArgument("PakeVerifier", &mPakeVerifier); + AddArgument("G1", 0, UINT16_MAX, &mG1); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~TestScenesFabricRemoval() + { + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: TestScenesFabricRemoval\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: TestScenesFabricRemoval\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Commission DUT to TH1\n"); + err = TestCommissionDutToTh1_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH1 reads the fabric index\n"); + err = TestTh1ReadsTheFabricIndex_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Open Commissioning Window from alpha\n"); + err = TestOpenCommissioningWindowFromAlpha_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Waiting after opening commissioning window\n"); + err = TestWaitingAfterOpeningCommissioningWindow_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from TH2\n"); + err = TestCommissionFromTh2_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for TH2\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH2 reads the fabric index\n"); + err = TestTh2ReadsTheFabricIndex_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH1 sends a RemoveAllGroups command to DUT.\n"); + err = TestTh1SendsARemoveAllGroupsCommandToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH 1 Add Group KeySet.\n"); + err = TestTh1AddGroupKeySet_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH1 Map KeySets to GroupId.\n"); + err = TestTh1MapKeySetsToGroupId_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH1 sends a AddGroup command to DUT for G1.\n"); + err = TestTh1SendsAAddGroupCommandToDutForG1_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Preparation step : TH2 Add Group KeySet.\n"); + err = TestPreparationStepTh2AddGroupKeySet_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Preparation step TH2 Map KeySets to GroupId.\n"); + err = TestPreparationStepTh2MapKeySetsToGroupId_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH2 sends a AddGroup command to DUT for G1.\n"); + err = TestTh2SendsAAddGroupCommandToDutForG1_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH1 confirms its Scene table is empty and gets its capacity\n"); + err = TestTh1ConfirmsItsSceneTableIsEmptyAndGetsItsCapacity_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH2 confirms its Scene table is empty and has the same capacity as TH1\n"); + err = TestTh2ConfirmsItsSceneTableIsEmptyAndHasTheSameCapacityAsTh1_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH1 sends an AddScene command to DUT for Scene 1 G1\n"); + err = TestTh1SendsAnAddSceneCommandToDutForScene1G1_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH1 sends an AddScene command to DUT for Scene 2 G1\n"); + err = TestTh1SendsAnAddSceneCommandToDutForScene2G1_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH2 sends an AddScene command to DUT for Scene 1 G1\n"); + err = TestTh2SendsAnAddSceneCommandToDutForScene1G1_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH2 sends an AddScene command to DUT for Scene 2 G1\n"); + err = TestTh2SendsAnAddSceneCommandToDutForScene2G1_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH1 confirms its G1 holds 2 scenes\n"); + err = TestTh1ConfirmsItsG1Holds2Scenes_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH2 confirms its G1 holds 2 scenes\n"); + err = TestTh2ConfirmsItsG1Holds2Scenes_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH1 sends RemoveFabric command for TH2\n"); + err = TestTh1SendsRemoveFabricCommandForTh2_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH1 confirms its G1 still holds 2 scenes\n"); + err = TestTh1ConfirmsItsG1StillHolds2Scenes_23(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 24; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mPayload; + chip::Optional mDiscriminator; + chip::Optional mWaitAfterCommissioning; + chip::Optional mPakeVerifier; + chip::Optional mG1; + chip::Optional mTimeout; + + CHIP_ERROR TestCommissionDutToTh1_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + NSNumber * _Nonnull th1FabricIndex; + + CHIP_ERROR TestTh1ReadsTheFabricIndex_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 reads the fabric index: Error: %@", err); + } else { + NSLog(@"TH1 reads the fabric index: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + th1FabricIndex = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = + [NSNumber numberWithUnsignedShort:180U]; + params.pakePasscodeVerifier = mPakeVerifier.HasValue() ? [NSData dataWithBytes:mPakeVerifier.Value().data() length:mPakeVerifier.Value().size()] : [[NSData alloc] initWithBytes:"\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" length:97]; + params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] : [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = + [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = + [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Open Commissioning Window from alpha: Error: %@", err); + } else { + NSLog(@"Open Commissioning Window from alpha: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWaitingAfterOpeningCommissioningWindow_3() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCommissionFromTh2_4() + { + + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode("beta", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_5() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("beta", value); + } + NSNumber * _Nonnull th2FabricIndex; + + CHIP_ERROR TestTh2ReadsTheFabricIndex_6() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 reads the fabric index: Error: %@", err); + } else { + NSLog(@"TH2 reads the fabric index: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + th2FabricIndex = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1SendsARemoveAllGroupsCommandToDut_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster removeAllGroupsWithCompletion: + ^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 sends a RemoveAllGroups command to DUT.: Error: %@", err); + } else { + NSLog(@"TH1 sends a RemoveAllGroups command to DUT.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1AddGroupKeySet_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1110000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1110001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1110002ULL]; + + [cluster keySetWriteWithParams:params completion: + ^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH 1 Add Group KeySet.: Error: %@", err); + } else { + NSLog(@"TH 1 Add Group KeySet.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1MapKeySetsToGroupId_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = + [NSNumber numberWithUnsignedShort:417U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = + [NSNumber numberWithUnsignedChar:0U]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument completion:^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 Map KeySets to GroupId.: Error: %@", err); + } else { + NSLog(@"TH1 Map KeySets to GroupId.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1SendsAAddGroupCommandToDutForG1_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.groupName = @"Group1"; + [cluster addGroupWithParams:params completion: + ^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 sends a AddGroup command to DUT for G1.: Error: %@", err); + } else { + NSLog(@"TH1 sends a AddGroup command to DUT for G1.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestPreparationStepTh2AddGroupKeySet_11() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:1120000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:1120001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317" length:16]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:1120002ULL]; + + [cluster keySetWriteWithParams:params completion: + ^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Preparation step : TH2 Add Group KeySet.: Error: %@", err); + } else { + NSLog(@"Preparation step : TH2 Add Group KeySet.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestPreparationStepTh2MapKeySetsToGroupId_12() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = + [NSNumber numberWithUnsignedShort:418U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = + [NSNumber numberWithUnsignedChar:0U]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument completion:^(NSError * _Nullable err) { + if (err != nil) { + NSLog(@"Preparation step TH2 Map KeySets to GroupId.: Error: %@", err); + } else { + NSLog(@"Preparation step TH2 Map KeySets to GroupId.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh2SendsAAddGroupCommandToDutForG1_13() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.groupName = @"Group1"; + [cluster addGroupWithParams:params completion: + ^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 sends a AddGroup command to DUT for G1.: Error: %@", err); + } else { + NSLog(@"TH2 sends a AddGroup command to DUT for G1.: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable fabricCapacity; + + CHIP_ERROR TestTh1ConfirmsItsSceneTableIsEmptyAndGetsItsCapacity_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 confirms its Scene table is empty and gets its capacity: Error: %@", err); + } else { + NSLog(@"TH1 confirms its Scene table is empty and gets its capacity: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + fabricCapacity = values.capacity; + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh2ConfirmsItsSceneTableIsEmptyAndHasTheSameCapacityAsTh1_15() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 confirms its Scene table is empty and has the same capacity as TH1: Error: %@", err); + } else { + NSLog(@"TH2 confirms its Scene table is empty and has the same capacity as TH1: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.capacity; + if (fabricCapacity == nil) { + VerifyOrReturn(CheckValueNull("Capacity", actualValue)); + } else { + VerifyOrReturn(CheckValueNonNull("Capacity", actualValue)); + VerifyOrReturn(CheckValue("Capacity", actualValue, fabricCapacity)); + } + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1SendsAnAddSceneCommandToDutForScene1G1_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.sceneID = + [NSNumber numberWithUnsignedChar:1U]; + params.transitionTime = + [NSNumber numberWithUnsignedShort:1U]; + params.sceneName = @"Scene1"; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + params.extensionFieldSets = temp_0; + } + [cluster addSceneWithParams:params completion: + ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 sends an AddScene command to DUT for Scene 1 G1: Error: %@", err); + } else { + NSLog(@"TH1 sends an AddScene command to DUT for Scene 1 G1: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneID; + VerifyOrReturn(CheckValue("SceneID", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1SendsAnAddSceneCommandToDutForScene2G1_17() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.sceneID = + [NSNumber numberWithUnsignedChar:2U]; + params.transitionTime = + [NSNumber numberWithUnsignedShort:0U]; + params.sceneName = @"Scene2"; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + params.extensionFieldSets = temp_0; + } + [cluster addSceneWithParams:params completion: + ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 sends an AddScene command to DUT for Scene 2 G1: Error: %@", err); + } else { + NSLog(@"TH1 sends an AddScene command to DUT for Scene 2 G1: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneID; + VerifyOrReturn(CheckValue("SceneID", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh2SendsAnAddSceneCommandToDutForScene1G1_18() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.sceneID = + [NSNumber numberWithUnsignedChar:1U]; + params.transitionTime = + [NSNumber numberWithUnsignedShort:1U]; + params.sceneName = @"Scene1"; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + params.extensionFieldSets = temp_0; + } + [cluster addSceneWithParams:params completion: + ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 sends an AddScene command to DUT for Scene 1 G1: Error: %@", err); + } else { + NSLog(@"TH2 sends an AddScene command to DUT for Scene 1 G1: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneID; + VerifyOrReturn(CheckValue("SceneID", actualValue, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh2SendsAnAddSceneCommandToDutForScene2G1_19() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterAddSceneParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + params.sceneID = + [NSNumber numberWithUnsignedChar:2U]; + params.transitionTime = + [NSNumber numberWithUnsignedShort:0U]; + params.sceneName = @"Scene2"; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + params.extensionFieldSets = temp_0; + } + [cluster addSceneWithParams:params completion: + ^(MTRScenesClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 sends an AddScene command to DUT for Scene 2 G1: Error: %@", err); + } else { + NSLog(@"TH2 sends an AddScene command to DUT for Scene 2 G1: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneID; + VerifyOrReturn(CheckValue("SceneID", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1ConfirmsItsG1Holds2Scenes_20() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 confirms its G1 holds 2 scenes: Error: %@", err); + } else { + NSLog(@"TH1 confirms its G1 holds 2 scenes: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNonNull("Capacity", actualValue)); + VerifyOrReturn(CheckValue("Capacity", actualValue, [fabricCapacity unsignedCharValue] - 2U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneList; + VerifyOrReturn(CheckValue("SceneList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh2ConfirmsItsG1Holds2Scenes_21() + { + + MTRBaseDevice * device = GetDevice("beta"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH2 confirms its G1 holds 2 scenes: Error: %@", err); + } else { + NSLog(@"TH2 confirms its G1 holds 2 scenes: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNonNull("Capacity", actualValue)); + VerifyOrReturn(CheckValue("Capacity", actualValue, [fabricCapacity unsignedCharValue] - 2U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneList; + VerifyOrReturn(CheckValue("SceneList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1SendsRemoveFabricCommandForTh2_22() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = + [th2FabricIndex copy]; + [cluster removeFabricWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 sends RemoveFabric command for TH2: Error: %@", err); + } else { + NSLog(@"TH1 sends RemoveFabric command for TH2: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTh1ConfirmsItsG1StillHolds2Scenes_23() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; + params.groupID = mG1.HasValue() ? [NSNumber numberWithUnsignedShort:mG1.Value()] : [NSNumber numberWithUnsignedShort:1U]; + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable err) { + if (err != nil) { + NSLog(@"TH1 confirms its G1 still holds 2 scenes: Error: %@", err); + } else { + NSLog(@"TH1 confirms its G1 still holds 2 scenes: Success"); + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.capacity; + VerifyOrReturn(CheckValueNonNull("Capacity", actualValue)); + VerifyOrReturn(CheckValue("Capacity", actualValue, [fabricCapacity unsignedCharValue] - 2U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, mG1.HasValue() ? mG1.Value() : 1U)); + } + + { + id actualValue = values.sceneList; + VerifyOrReturn(CheckValue("SceneList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_S_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_S_1_1() + : TestCommandBridge("Test_TC_S_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_S_1_1() + { + } + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_S_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_S_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH (can be skipped if done in a preceding test)\n"); + err = TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read ClusterRevision (global attribute 65533)\n"); + err = TestStep2ReadClusterRevisionGlobalAttribute65533_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read FeatureMap NameSupport bit (global attribute 65532)\n"); + if (ShouldSkip("(!S.S.F00)")) { + NextTest(); + return; + } + err = TestStep3aReadFeatureMapNameSupportBitGlobalAttribute65532_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Read FeatureMap NameSupport bit (global attribute 65532)\n"); + if (ShouldSkip("S.S.F00")) { + NextTest(); + return; + } + err = TestStep3aReadFeatureMapNameSupportBitGlobalAttribute65532_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Read FeatureMap Explicit bit (global attribute 65532)\n"); + if (ShouldSkip("(!S.S.F01)")) { + NextTest(); + return; + } + err = TestStep3bReadFeatureMapExplicitBitGlobalAttribute65532_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3b: Read FeatureMap Explicit bit (global attribute 65532)\n"); + if (ShouldSkip("S.S.F01")) { + NextTest(); + return; + } + err = TestStep3bReadFeatureMapExplicitBitGlobalAttribute65532_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Step 3c: Read FeatureMap TableSize bit (global attribute 65532)\n"); + if (ShouldSkip("(!S.S.F02)")) { + NextTest(); + return; + } + err = TestStep3cReadFeatureMapTableSizeBitGlobalAttribute65532_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 3c: Read FeatureMap TableSize bit (global attribute 65532)\n"); + if (ShouldSkip("S.S.F02")) { + NextTest(); + return; + } + err = TestStep3cReadFeatureMapTableSizeBitGlobalAttribute65532_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Step 3d: Read FeatureMap FabricScene bit (global attribute 65532)\n"); + if (ShouldSkip("(!S.S.F03)")) { + NextTest(); + return; + } + err = TestStep3dReadFeatureMapFabricSceneBitGlobalAttribute65532_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 3d: Read FeatureMap FabricScene bit (global attribute 65532)\n"); + if (ShouldSkip("S.S.F03")) { + NextTest(); + return; + } + err = TestStep3dReadFeatureMapFabricSceneBitGlobalAttribute65532_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4: Read Mandatory attributes in AttributeList (global attribute 65531)\n"); + if (ShouldSkip("S.S")) { + NextTest(); + return; + } + err = TestStep4ReadMandatoryAttributesInAttributeListGlobalAttribute65531_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Step 4b: Read optional attributes(SceneCount, CurrentScene, CurrentGroup, SceneValid) in AttributeList (global attribute 65531)\n"); + if (ShouldSkip("(!S.S.F03)")) { + NextTest(); + return; + } + err = TestStep4bReadOptionalAttributesSceneCountCurrentSceneCurrentGroupSceneValidInAttributeListGlobalAttribute65531_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Step 4c: Read optinnal attribute(LastConfiguredBy) in AttributeList (global attribute 65531)\n"); + if (ShouldSkip("S.S.A0005")) { + NextTest(); + return; + } + err = TestStep4cReadOptinnalAttributeLastConfiguredByInAttributeListGlobalAttribute65531_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Step 4d: Read optionnal attribute(SceneTableSize) in AttributeList (global attribute 65531)\n"); + if (ShouldSkip("S.S.F02")) { + NextTest(); + return; + } + err = TestStep4dReadOptionnalAttributeSceneTableSizeInAttributeListGlobalAttribute65531_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Step 4e: Read optional attribute(FabricSceneInfo) in AttributeList (global attribute 65531)\n"); + if (ShouldSkip("S.S.F03")) { + NextTest(); + return; + } + err = TestStep4eReadOptionalAttributeFabricSceneInfoInAttributeListGlobalAttribute65531_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Step 5: Read EventList (global attribute 65530)\n"); + if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { + NextTest(); + return; + } + NextTest(); + return; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Step 6a: Read Mandatory commands in AcceptedCommandList (global attribute 65529)\n"); + if (ShouldSkip("S.S")) { + NextTest(); + return; + } + err = TestStep6aReadMandatoryCommandsInAcceptedCommandListGlobalAttribute65529_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Step 6b: Read optional command(EnhancedAddSceneResponse) AcceptedCommandList (global attribute 65529)\n"); + if (ShouldSkip("S.S.C40.Rsp")) { + NextTest(); + return; + } + err = TestStep6bReadOptionalCommandEnhancedAddSceneResponseAcceptedCommandListGlobalAttribute65529_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Step 6c: Read optional command(EnhancedViewSceneResponse) AcceptedCommandList (global attribute 65529)\n"); + if (ShouldSkip("S.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestStep6cReadOptionalCommandEnhancedViewSceneResponseAcceptedCommandListGlobalAttribute65529_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Step 6d: Read optional command(CopySceneResponse) AcceptedCommandList (global attribute 65529)\n"); + if (ShouldSkip("S.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestStep6dReadOptionalCommandCopySceneResponseAcceptedCommandListGlobalAttribute65529_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Step 7a: Read GeneratedCommandList (global attribute 65528)\n"); + err = TestStep7aReadGeneratedCommandListGlobalAttribute65528_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Step 7b: Read optional command(EnhancedAddSceneResponse) in GeneratedCommandList (global attribute 65528)\n"); + if (ShouldSkip("S.S.C40.Rsp")) { + NextTest(); + return; + } + err = TestStep7bReadOptionalCommandEnhancedAddSceneResponseInGeneratedCommandListGlobalAttribute65528_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Step 7c: Read optional command(EnhancedViewSceneResponse) in GeneratedCommandList (global attribute 65528)\n"); + if (ShouldSkip("S.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestStep7cReadOptionalCommandEnhancedViewSceneResponseInGeneratedCommandListGlobalAttribute65528_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Step 7d: Read optional command(CopySceneResponse) in GeneratedCommandList (global attribute 65528)\n"); + if (ShouldSkip("S.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestStep7dReadOptionalCommandCopySceneResponseInGeneratedCommandListGlobalAttribute65528_23(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 24; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestStep1WaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -187569,25 +189267,25 @@ class Test_TC_G_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStep2ThReadsTheClusterRevisionFromDut_1() + CHIP_ERROR TestStep2ReadClusterRevisionGlobalAttribute65533_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT: Error: %@", err); + NSLog(@"Step 2: Read ClusterRevision (global attribute 65533): Error: %@", err); } else { - NSLog(@"Step 2: TH reads the ClusterRevision from DUT: Success"); + NSLog(@"Step 2: Read ClusterRevision (global attribute 65533): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); @@ -187597,27 +189295,22 @@ class Test_TC_G_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aThReadsTheFeatureMapFromDut_2() + CHIP_ERROR TestStep3aReadFeatureMapNameSupportBitGlobalAttribute65532_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3a: TH reads the FeatureMap from DUT: Error: %@", err); + NSLog(@"Step 3a: Read FeatureMap NameSupport bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3a: TH reads the FeatureMap from DUT: Success"); + NSLog(@"Step 3a: Read FeatureMap NameSupport bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; @@ -187625,18 +189318,18 @@ class Test_TC_G_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bGivenGsf00EnsureFeaturemapHasTheCorrectBitSet_3() + CHIP_ERROR TestStep3aReadFeatureMapNameSupportBitGlobalAttribute65532_3() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3b: Given G.S.F00 ensure featuremap has the correct bit set: Error: %@", err); + NSLog(@"Step 3a: Read FeatureMap NameSupport bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3b: Given G.S.F00 ensure featuremap has the correct bit set: Success"); + NSLog(@"Step 3a: Read FeatureMap NameSupport bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -187648,431 +189341,53 @@ class Test_TC_G_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4: TH reads AttributeList from DUT: Error: %@", err); - } else { - NSLog(@"Step 4: TH reads AttributeList from DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65530UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep4ThReadsAttributeListFromDut_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 4: TH reads AttributeList from DUT: Error: %@", err); - } else { - NSLog(@"Step 4: TH reads AttributeList from DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestStep6ThReadsAcceptedCommandListFromDut_7() + CHIP_ERROR TestStep3bReadFeatureMapExplicitBitGlobalAttribute65532_4() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT: Error: %@", err); + NSLog(@"Step 3b: Read FeatureMap Explicit bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 6: TH reads AcceptedCommandList from DUT: Success"); + NSLog(@"Step 3b: Read FeatureMap Explicit bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); - + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7ThReadsGeneratedCommandListFromDut_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - if (err != nil) { - NSLog(@"Step 7: TH reads GeneratedCommandList from DUT: Error: %@", err); - } else { - NSLog(@"Step 7: TH reads GeneratedCommandList from DUT: Success"); - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_S_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_S_1_1() - : TestCommandBridge("Test_TC_S_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_S_1_1() - { - } - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_S_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_S_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Step 1: Commission DUT to TH (can be skipped if done in a preceding test)\n"); - err = TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: Read ClusterRevision (global attribute 65533)\n"); - err = TestStep2ReadClusterRevisionGlobalAttribute65533_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3a: Read FeatureMap (global attribute 65532)\n"); - if (ShouldSkip("(!S.S.F00)")) { - NextTest(); - return; - } - err = TestStep3aReadFeatureMapGlobalAttribute65532_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Step 3a: Read FeatureMap (global attribute 65532)\n"); - if (ShouldSkip("S.S.F00")) { - NextTest(); - return; - } - err = TestStep3aReadFeatureMapGlobalAttribute65532_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Step 3b: Read FeatureMap (global attribute 65532)\n"); - err = TestStep3bReadFeatureMapGlobalAttribute65532_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Step 3c: Read FeatureMap (global attribute 65532)\n"); - err = TestStep3cReadFeatureMapGlobalAttribute65532_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Step 4: Read Mandatory attributes in AttributeList (global attribute 65531)\n"); - if (ShouldSkip("S.S")) { - NextTest(); - return; - } - err = TestStep4ReadMandatoryAttributesInAttributeListGlobalAttribute65531_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Step 4b: Read optional attributes(SceneCount, CurrentScene, CurrentGroup, SceneValid) in AttributeList (global attribute 65531)\n"); - if (ShouldSkip("(!S.S.F03)")) { - NextTest(); - return; - } - err = TestStep4bReadOptionalAttributesSceneCountCurrentSceneCurrentGroupSceneValidInAttributeListGlobalAttribute65531_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Step 4c: Read optinnal attribute(LastConfiguredBy) in AttributeList (global attribute 65531)\n"); - if (ShouldSkip("S.S.A0005")) { - NextTest(); - return; - } - err = TestStep4cReadOptinnalAttributeLastConfiguredByInAttributeListGlobalAttribute65531_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 4d: Read optionnal attribute(SceneTableSize) in AttributeList (global attribute 65531)\n"); - if (ShouldSkip("S.S.F02")) { - NextTest(); - return; - } - err = TestStep4dReadOptionnalAttributeSceneTableSizeInAttributeListGlobalAttribute65531_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Step 4e: Read optional attribute(FabricSceneInfo) in AttributeList (global attribute 65531)\n"); - if (ShouldSkip("S.S.F03")) { - NextTest(); - return; - } - err = TestStep4eReadOptionalAttributeFabricSceneInfoInAttributeListGlobalAttribute65531_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Step 5: Read EventList (global attribute 65530)\n"); - if (ShouldSkip("PICS_EVENT_LIST_ENABLED")) { - NextTest(); - return; - } - NextTest(); - return; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Step 6a: Read Mandatory commands in AcceptedCommandList (global attribute 65529)\n"); - if (ShouldSkip("S.S")) { - NextTest(); - return; - } - err = TestStep6aReadMandatoryCommandsInAcceptedCommandListGlobalAttribute65529_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Step 6b: Read optional command(EnhancedAddSceneResponse) AcceptedCommandList (global attribute 65529)\n"); - if (ShouldSkip("S.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestStep6bReadOptionalCommandEnhancedAddSceneResponseAcceptedCommandListGlobalAttribute65529_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Step 6c: Read optional command(EnhancedViewSceneResponse) AcceptedCommandList (global attribute 65529)\n"); - if (ShouldSkip("S.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestStep6cReadOptionalCommandEnhancedViewSceneResponseAcceptedCommandListGlobalAttribute65529_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Step 6d: Read optional command(CopySceneResponse) AcceptedCommandList (global attribute 65529)\n"); - if (ShouldSkip("S.S.C42.Rsp")) { - NextTest(); - return; - } - err = TestStep6dReadOptionalCommandCopySceneResponseAcceptedCommandListGlobalAttribute65529_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Step 7a: Read GeneratedCommandList (global attribute 65528)\n"); - err = TestStep7aReadGeneratedCommandListGlobalAttribute65528_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Step 7b: Read optional command(EnhancedAddSceneResponse) in GeneratedCommandList (global attribute 65528)\n"); - if (ShouldSkip("S.S.C40.Rsp")) { - NextTest(); - return; - } - err = TestStep7bReadOptionalCommandEnhancedAddSceneResponseInGeneratedCommandListGlobalAttribute65528_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Step 7c: Read optional command(EnhancedViewSceneResponse) in GeneratedCommandList (global attribute 65528)\n"); - if (ShouldSkip("S.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestStep7cReadOptionalCommandEnhancedViewSceneResponseInGeneratedCommandListGlobalAttribute65528_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Step 7d: Read optional command(CopySceneResponse) in GeneratedCommandList (global attribute 65528)\n"); - if (ShouldSkip("S.S.C42.Rsp")) { - NextTest(); - return; - } - err = TestStep7dReadOptionalCommandCopySceneResponseInGeneratedCommandListGlobalAttribute65528_19(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestStep1CommissionDutToThCanBeSkippedIfDoneInAPrecedingTest_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestStep2ReadClusterRevisionGlobalAttribute65533_1() + CHIP_ERROR TestStep3bReadFeatureMapExplicitBitGlobalAttribute65532_5() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 2: Read ClusterRevision (global attribute 65533): Error: %@", err); + NSLog(@"Step 3b: Read FeatureMap Explicit bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 2: Read ClusterRevision (global attribute 65533): Success"); + NSLog(@"Step 3b: Read FeatureMap Explicit bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadFeatureMapGlobalAttribute65532_2() + CHIP_ERROR TestStep3cReadFeatureMapTableSizeBitGlobalAttribute65532_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188081,9 +189396,9 @@ class Test_TC_S_1_1 : public TestCommandBridge { [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3a: Read FeatureMap (global attribute 65532): Error: %@", err); + NSLog(@"Step 3c: Read FeatureMap TableSize bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3a: Read FeatureMap (global attribute 65532): Success"); + NSLog(@"Step 3c: Read FeatureMap TableSize bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -188095,7 +189410,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3aReadFeatureMapGlobalAttribute65532_3() + CHIP_ERROR TestStep3cReadFeatureMapTableSizeBitGlobalAttribute65532_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188104,9 +189419,9 @@ class Test_TC_S_1_1 : public TestCommandBridge { [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3a: Read FeatureMap (global attribute 65532): Error: %@", err); + NSLog(@"Step 3c: Read FeatureMap TableSize bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3a: Read FeatureMap (global attribute 65532): Success"); + NSLog(@"Step 3c: Read FeatureMap TableSize bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -188118,7 +189433,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3bReadFeatureMapGlobalAttribute65532_4() + CHIP_ERROR TestStep3dReadFeatureMapFabricSceneBitGlobalAttribute65532_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188127,9 +189442,9 @@ class Test_TC_S_1_1 : public TestCommandBridge { [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3b: Read FeatureMap (global attribute 65532): Error: %@", err); + NSLog(@"Step 3d: Read FeatureMap FabricScene bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3b: Read FeatureMap (global attribute 65532): Success"); + NSLog(@"Step 3d: Read FeatureMap FabricScene bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -188141,7 +189456,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep3cReadFeatureMapGlobalAttribute65532_5() + CHIP_ERROR TestStep3dReadFeatureMapFabricSceneBitGlobalAttribute65532_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188150,9 +189465,9 @@ class Test_TC_S_1_1 : public TestCommandBridge { [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 3c: Read FeatureMap (global attribute 65532): Error: %@", err); + NSLog(@"Step 3d: Read FeatureMap FabricScene bit (global attribute 65532): Error: %@", err); } else { - NSLog(@"Step 3c: Read FeatureMap (global attribute 65532): Success"); + NSLog(@"Step 3d: Read FeatureMap FabricScene bit (global attribute 65532): Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -188164,7 +189479,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4ReadMandatoryAttributesInAttributeListGlobalAttribute65531_6() + CHIP_ERROR TestStep4ReadMandatoryAttributesInAttributeListGlobalAttribute65531_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188194,7 +189509,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4bReadOptionalAttributesSceneCountCurrentSceneCurrentGroupSceneValidInAttributeListGlobalAttribute65531_7() + CHIP_ERROR TestStep4bReadOptionalAttributesSceneCountCurrentSceneCurrentGroupSceneValidInAttributeListGlobalAttribute65531_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188222,7 +189537,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4cReadOptinnalAttributeLastConfiguredByInAttributeListGlobalAttribute65531_8() + CHIP_ERROR TestStep4cReadOptinnalAttributeLastConfiguredByInAttributeListGlobalAttribute65531_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188247,7 +189562,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4dReadOptionnalAttributeSceneTableSizeInAttributeListGlobalAttribute65531_9() + CHIP_ERROR TestStep4dReadOptionnalAttributeSceneTableSizeInAttributeListGlobalAttribute65531_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188272,7 +189587,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep4eReadOptionalAttributeFabricSceneInfoInAttributeListGlobalAttribute65531_10() + CHIP_ERROR TestStep4eReadOptionalAttributeFabricSceneInfoInAttributeListGlobalAttribute65531_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188297,7 +189612,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6aReadMandatoryCommandsInAcceptedCommandListGlobalAttribute65529_12() + CHIP_ERROR TestStep6aReadMandatoryCommandsInAcceptedCommandListGlobalAttribute65529_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188328,7 +189643,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6bReadOptionalCommandEnhancedAddSceneResponseAcceptedCommandListGlobalAttribute65529_13() + CHIP_ERROR TestStep6bReadOptionalCommandEnhancedAddSceneResponseAcceptedCommandListGlobalAttribute65529_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188353,7 +189668,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6cReadOptionalCommandEnhancedViewSceneResponseAcceptedCommandListGlobalAttribute65529_14() + CHIP_ERROR TestStep6cReadOptionalCommandEnhancedViewSceneResponseAcceptedCommandListGlobalAttribute65529_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188378,7 +189693,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep6dReadOptionalCommandCopySceneResponseAcceptedCommandListGlobalAttribute65529_15() + CHIP_ERROR TestStep6dReadOptionalCommandCopySceneResponseAcceptedCommandListGlobalAttribute65529_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188403,7 +189718,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7aReadGeneratedCommandListGlobalAttribute65528_16() + CHIP_ERROR TestStep7aReadGeneratedCommandListGlobalAttribute65528_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188433,7 +189748,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7bReadOptionalCommandEnhancedAddSceneResponseInGeneratedCommandListGlobalAttribute65528_17() + CHIP_ERROR TestStep7bReadOptionalCommandEnhancedAddSceneResponseInGeneratedCommandListGlobalAttribute65528_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188458,7 +189773,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7cReadOptionalCommandEnhancedViewSceneResponseInGeneratedCommandListGlobalAttribute65528_18() + CHIP_ERROR TestStep7cReadOptionalCommandEnhancedViewSceneResponseInGeneratedCommandListGlobalAttribute65528_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188483,7 +189798,7 @@ class Test_TC_S_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep7dReadOptionalCommandCopySceneResponseInGeneratedCommandListGlobalAttribute65528_19() + CHIP_ERROR TestStep7dReadOptionalCommandCopySceneResponseInGeneratedCommandListGlobalAttribute65528_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -188555,7 +189870,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Step 2: TH reads from the DUT the (0x0000) SceneCount attribute\n"); - if (ShouldSkip("S.S.A0000")) { + if (ShouldSkip("S.S.A0000 && (!S.S.F03)")) { NextTest(); return; } @@ -188563,7 +189878,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Step 3: TH reads from the DUT the (0x0001) CurrentScene attribute\n"); - if (ShouldSkip("S.S.A0001")) { + if (ShouldSkip("S.S.A0001 && (!S.S.F03)")) { NextTest(); return; } @@ -188571,7 +189886,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Step 4: TH reads from the DUT the (0x0002) CurrentGroup attribute\n"); - if (ShouldSkip("S.S.A0002")) { + if (ShouldSkip("S.S.A0002 && (!S.S.F03)")) { NextTest(); return; } @@ -188579,7 +189894,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step 5: TH reads from the DUT the (0x0003) SceneValid attribute\n"); - if (ShouldSkip("S.S.A0003")) { + if (ShouldSkip("S.S.A0003 && (!S.S.F03)")) { NextTest(); return; } @@ -188587,7 +189902,7 @@ class Test_TC_S_2_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Step 6: TH reads from the DUT the (0x0004) NameSupport attribute\n"); - if (ShouldSkip("S.S.A0003 && S.S.F00")) { + if (ShouldSkip("S.S.A0004 && S.S.F00")) { NextTest(); return; } @@ -188618,12 +189933,12 @@ class Test_TC_S_2_1 : public TestCommandBridge { err = TestStep8ThReadsFromTheDutThe0x0006SceneTableSizeAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Step 9: TH reads from the DUT the (0x0007) RemainingCapacity attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : Step 9: TH reads from the DUT the (0x0007) FabricSceneInfo attribute\n"); if (ShouldSkip("S.S.A0007")) { NextTest(); return; } - err = TestStep9ThReadsFromTheDutThe0x0007RemainingCapacityAttribute_9(); + err = TestStep9ThReadsFromTheDutThe0x0007FabricSceneInfoAttribute_9(); break; } @@ -188889,23 +190204,25 @@ class Test_TC_S_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestStep9ThReadsFromTheDutThe0x0007RemainingCapacityAttribute_9() + CHIP_ERROR TestStep9ThReadsFromTheDutThe0x0007FabricSceneInfoAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRemainingCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable err) { if (err != nil) { - NSLog(@"Step 9: TH reads from the DUT the (0x0007) RemainingCapacity attribute: Error: %@", err); + NSLog(@"Step 9: TH reads from the DUT the (0x0007) FabricSceneInfo attribute: Error: %@", err); } else { - NSLog(@"Step 9: TH reads from the DUT the (0x0007) RemainingCapacity attribute: Success"); + NSLog(@"Step 9: TH reads from the DUT the (0x0007) FabricSceneInfo attribute: Success"); } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("remainingCapacity", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintType("fabricSceneInfo", "list", "list")); NextTest(); }]; @@ -192351,6 +193668,7 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),