diff --git a/.github/labeler.yml b/.github/labeler.yml index 525a93e0d37048..7e02fe6d368df3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -119,6 +119,15 @@ test driver: - src/test_driver/* - src/test_driver/**/* +# Cert tests touched: add current milestone delta-tracking label. +# TODO: Change after Aug 15, 2024 +matter-1.4-te2-script-change: + - changed-files: + - any-glob-to-any-file: + - src/python_testing/* + - src/python_testing/**/* + - src/app/tests/suites/certification/* + ############################################################ # Source Code ############################################################ diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 4f6adeea522da6..00000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Stale config for https://github.com/marketplace/stale -# Issues with these labels will never be considered stale -exemptLabels: - - security - - blocked - -# Label to use when marking a pull request as stale -staleLabel: stale - -pulls: - # Number of days of inactivity before a pull request becomes stale - daysUntilStale: 60 - - # Number of days of inactivity before a stale pull request is closed - daysUntilClose: 30 - - # Comment to post when marking a pull request as stale. Set to `false` to disable - markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. - - # Comment to post when closing a stale pull request. Set to `false` to disable - closeComment: > - This stale pull request has been automatically closed. - Thank you for your contributions. - -issues: - # Number of days of inactivity before a issue becomes stale - daysUntilStale: 180 - - # Number of days of inactivity before a stale issue is closed - daysUntilClose: 7 - - # Comment to post when marking a issue as stale. Set to `false` to disable - markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. - - # Comment to post when closing a stale issue. Set to `false` to disable - closeComment: > - This stale issue has been automatically closed. - Thank you for your contributions. diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 10f638a67de092..3ec8fd379c3fe7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:54 + image: ghcr.io/project-chip/chip-build:65 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index da12476696bce9..efb408f80bfc26 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:66 + image: ghcr.io/project-chip/chip-build-esp32:67 options: --user root steps: diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 5a8b9e104dc41b..05594606a610c7 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -102,7 +102,6 @@ jobs: # - "-imx" - "-java" - "-k32w" - - "-mbed-os" - "-nrf-platform" - "-telink" - "-ti" diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index cdfdee65148aff..fb0d2bc29b5b8d 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:66 + image: ghcr.io/project-chip/chip-build-esp32:67 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:66 + image: ghcr.io/project-chip/chip-build-esp32:67 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml deleted file mode 100644 index 5b39c51e8fa0a8..00000000000000 --- a/.github/workflows/examples-mbed.yaml +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Build example - Mbed OS - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - workflow_dispatch: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - mbedos: - name: Mbed OS examples building - - env: - PLATFORM_NAME: mbed - APP_PROFILE: release - APP_TARGET: cy8cproto_062_4343w - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-mbed-os:66 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: mbed - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build lock-app example - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-lock-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET lock-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-lock-$APP_PROFILE/chip-mbed-lock-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build lighting-app example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-light-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET lighting-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-light-$APP_PROFILE/chip-mbed-lighting-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build pigweed-app example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-pigweed-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET pigweed-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-pigweed-$APP_PROFILE/chip-mbed-pigweed-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build all-clusters-app example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-all-clusters-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET all-clusters-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-all-clusters-$APP_PROFILE/chip-mbed-all-clusters-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build all-clusters-minimal-app example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-all-clusters-minimal-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET all-clusters-minimal-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-all-clusters-minimal-$APP_PROFILE/chip-mbed-all-clusters-minimal-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build shell example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-shell-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET shell-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-shell-$APP_PROFILE/chip-mbed-shell-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build ota-requestor-app example - if: github.event_name == 'push' - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target $PLATFORM_NAME-$APP_TARGET-ota-requestor-$APP_PROFILE \ - build \ - " - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - $PLATFORM_NAME $APP_TARGET ota-requestor-app-$APP_PROFILE \ - out/$PLATFORM_NAME-$APP_TARGET-ota-requestor-$APP_PROFILE/chip-mbed-ota-requestor-app-example.elf \ - /tmp/bloat_reports/ - rm -rf ./out - - - name: Build unit tests - # Temporarily disabled build due to running out of flash space - # TODO Issue #33978: re-enable unit testing after split of unit tests is done - if: false - run: scripts/tests/mbed/mbed_unit_tests.sh -b=$APP_TARGET -p=$APP_PROFILE - - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: Mbed diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index d3ea4af06df3dc..747813d6aa1037 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -96,7 +96,71 @@ jobs: if: ${{ !env.ACT }} with: platform-name: K32W + rw61x: + name: RW61X + env: + BUILD_TYPE: gn_rw61x + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: ghcr.io/project-chip/chip-build-rw61x:66 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: nxp + extra-submodule-parameters: --recursive + + - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports + if: ${{ !env.ACT }} + with: + gh-context: ${{ toJson(github) }} + + - name: Build RW61X all clusters example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-all-clusters-wifi \ + --target nxp-rw61x-freertos-all-clusters-thread \ + --target nxp-rw61x-freertos-all-clusters-thread-wifi \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: Build RW61X thermostat example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-thermostat-wifi \ + --target nxp-rw61x-freertos-thermostat-thread \ + --target nxp-rw61x-freertos-thermostat-thread-wifi \ + build \ + --copy-artifacts-to out/artifacts \ + " + + - name: Build RW61X laundry-washer example app + run: | + scripts/run_in_build_env.sh "\ + ./scripts/build/build_examples.py \ + --target nxp-rw61x-freertos-laundry-washer-wifi \ + --target nxp-rw61x-freertos-laundry-washer-thread \ + --target nxp-rw61x-freertos-laundry-washer-thread-wifi \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Uploading Size Reports + uses: ./.github/actions/upload-size-reports + if: ${{ !env.ACT }} + with: + platform-name: RW61X zephyr: name: ZEPHYR_RW61X diff --git a/.github/workflows/examples-rw61x.yaml b/.github/workflows/examples-rw61x.yaml deleted file mode 100644 index 8766a9b1958e10..00000000000000 --- a/.github/workflows/examples-rw61x.yaml +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Build example - RW61X - -on: - push: - branches-ignore: - - 'dependabot/**' - pull_request: - merge_group: - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -env: - CHIP_NO_LOG_TIMESTAMPS: true - -jobs: - rw61x: - name: RW61X - - env: - BUILD_TYPE: gn_rw61x - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: ghcr.io/project-chip/chip-build-rw61x:66 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Checkout submodules & Bootstrap - uses: ./.github/actions/checkout-submodules-and-bootstrap - with: - platform: nxp - extra-submodule-parameters: --recursive - - - name: Set up environment for size reports - uses: ./.github/actions/setup-size-reports - if: ${{ !env.ACT }} - with: - gh-context: ${{ toJson(github) }} - - - name: Build RW61X all clusters example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target rw61x-all-clusters-app-wifi \ - --target rw61x-all-clusters-app-thread \ - --target rw61x-all-clusters-app-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - - name: Build RW61X thermostat example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target rw61x-thermostat-wifi \ - --target rw61x-thermostat-thread \ - --target rw61x-thermostat-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - - name: Build RW61X laundry-washer example app - run: | - scripts/run_in_build_env.sh "\ - ./scripts/build/build_examples.py \ - --target rw61x-laundry-washer-wifi \ - --target rw61x-laundry-washer-thread \ - --target rw61x-laundry-washer-thread-wifi \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Uploading Size Reports - uses: ./.github/actions/upload-size-reports - if: ${{ !env.ACT }} - with: - platform-name: RW61X diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 98dd81edceca88..6694decc421372 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -290,8 +290,8 @@ jobs: git grep -I -n 'emberAfWriteAttribute' -- './*' \ ':(exclude).github/workflows/lint.yml' \ ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' \ - ':(exclude)src/app/codegen-data-model/CodegenDataModel_Write.cpp' \ - ':(exclude)src/app/codegen-data-model/tests/EmberReadWriteOverride.cpp' \ + ':(exclude)src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp' \ + ':(exclude)src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp' \ ':(exclude)src/app/util/attribute-table.cpp' \ ':(exclude)src/app/util/attribute-table.h' \ ':(exclude)src/app/util/ember-compatibility-functions.cpp' \ diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index acced0da5d9849..051af08a2893da 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -27,7 +27,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - + jobs: qemu-esp32: @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:66 + image: ghcr.io/project-chip/chip-build-esp32-qemu:67 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 97468ec3b5ce0c..481def01c629c6 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:66 + image: ghcr.io/project-chip/chip-build-esp32:67 steps: - name: Checkout diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 00000000000000..a9953e69b08ac1 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,42 @@ +name: "Process Stale Issues and PRs" +on: + workflow_dispatch: + schedule: + - cron: "30 1 * * *" + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: + "This issue has been automatically marked as stale because + it has not had recent activity. It will be closed if no + further activity occurs. Remove stale label or comment or + this will be closed in 30 days." + stale-pr-message: + "This pull request has been automatically marked as stale + because it has not had recent activity. It will be closed + if no further activity occurs. Remove stale label or + comment or this will be closed in 10 days." + close-issue-message: + "This stale issue has been automatically closed. Thank you + for your contributions." + close-pr-message: + "This stale pull request has been automatically closed. + Thank you for your contributions." + days-before-issue-stale: 30 + days-before-issue-close: -1 # Don't close them for now + days-before-pr-stale: 90 + days-before-pr-close: 10 + exempt-issue-labels: + "security,blocked,cert blocker,build issue,Spec XML + align,CI/CD improvements,memory" + exempt-pr-labels: + "security,blocked,cert blocker,build issue,Spec XML + align,CI/CD improvements,memory" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8284b5a9abd284..6974999d0d134f 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -91,6 +91,8 @@ jobs: --no-print \ --log-level info \ src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \ + src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \ + src/app/zap-templates/zcl/data-model/chip/global-enums.xml \ src/app/zap-templates/zcl/data-model/chip/global-structs.xml \ src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \ src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \ @@ -504,106 +506,7 @@ jobs: run: | mkdir -p out/trace_data scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ACE_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ACE_1_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ACE_1_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ACE_1_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_AccessChecker.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CC_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CC_10_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CGEN_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_CNET_1_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DA_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DA_1_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DA_1_7.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DGGEN_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DRLK_2_12.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DRLK_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DRLK_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DeviceBasicComposition.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DeviceConformance.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_6.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_7.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_8.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_9.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EPM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EPM_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_FAN_3_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_FAN_3_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_FAN_3_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_FAN_3_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_FAN_3_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ICDM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ICDM_3_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ICDManagementCluster.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_1_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_IDM_4_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_PWRTL_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RR_1_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SC_3_6.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_10.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_11.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_12.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_13.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_6.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_7.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_8.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_2_9.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TIMESYNC_3_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_TestEventTrigger.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TestBatchInvoke.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TestGroupTableReports.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPCREDS_3_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPCREDS_3_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPSTATE_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPSTATE_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPSTATE_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPSTATE_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OPSTATE_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OVENOPSTATE_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OVENOPSTATE_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OVENOPSTATE_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OVENOPSTATE_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_OVENOPSTATE_2_5.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_MWOCTRL_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_MWOCTRL_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_MWOCTRL_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_MWOM_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_PS_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCRUNM_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCRUNM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCRUNM_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCCLEANM_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCCLEANM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCCLEANM_2_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCOPSTATE_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCOPSTATE_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_RVCOPSTATE_2_4.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SC_7_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_SWTCH.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_WHM_1_2.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_WHM_2_1.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_LVL_2_3.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TCP_Tests.py' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestConformanceSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py' @@ -611,6 +514,7 @@ jobs: scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py' diff --git a/.mergify.yml b/.mergify.yml index c27419c8d0fc3e..77530c4521b676 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,20 +1,29 @@ pull_request_rules: + - name: Label conflicting pull requests + description: Add a label to a pull request with conflict to spot it easily + conditions: + - conflict + - '-closed' + actions: + label: + toggle: + - conflict - name: Automatic merge on PullApprove conditions: - or: - - "check-success=pullapprove" - - label="fast track" - - "#approved-reviews-by>=1" - - "#review-threads-unresolved=0" - - "-draft" - - "label!=docker" # Don't auto merge docker images - - "#check-failure=0" # Don't auto merge with a failure - - "#check-pending=0" # Don't auto merge with anything pending - - "check-success~=Build" # Don't auto merge unless a build has succeeded, needed because above is true on a fresh PR before builds + - check-success=pullapprove + - label="fast track" + - '#approved-reviews-by>=1' + - '#review-threads-unresolved=0' + - '-draft' + - label!=docker + - '#check-failure=0' + - '#check-pending=0' + - check-success~=Build - or: - - "check-success=pullapprove" - - "check-skipped=pullapprove" - - "check-neutral=pullapprove" + - check-success=pullapprove + - check-skipped=pullapprove + - check-neutral=pullapprove actions: merge: method: squash diff --git a/.restyled.yaml b/.restyled.yaml index f55a0e367d91bd..c201729d30e41a 100644 --- a/.restyled.yaml +++ b/.restyled.yaml @@ -72,7 +72,6 @@ exclude: - "scripts/tools/zap/tests/outputs/**/*" # Matches generated output 1:1 - "examples/chef/sample_app_util/test_files/*.yaml" - "examples/chef/zzz_generated/**/*" - - "examples/platform/nxp/k32w/k32w0/scripts/demo_generated_certs/**/*" - "examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/zap-generated/*" # zap-generated files - "integrations/cloudbuild/*.yaml" # uglier long command line content - "scripts/run_codegen_targets.sh" # shellharden breaks for loops over command outputs diff --git a/.vscode/settings.json b/.vscode/settings.json index a8b3dd631afe4f..33bdd5e9f63d6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -134,7 +134,9 @@ "thread": "cpp", "variant": "cpp", "any": "cpp", - "future": "cpp" + "future": "cpp", + "list": "cpp", + "unordered_set": "cpp" }, // Configure paths or glob patterns to exclude from file watching. "files.watcherExclude": { diff --git a/BUILD.gn b/BUILD.gn index 82c8d855bfd291..8a78d8f55f3bd0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -689,7 +689,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_k32w_lighting_app_build) { group("k32w_lighting_app") { - deps = [ "${chip_root}/examples/lighting-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ] + deps = [ "${chip_root}/examples/lighting-app/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lighting_app)" ] } extra_build_deps += [ ":k32w_lighting_app" ] @@ -697,7 +697,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_k32w_lock_app_build) { group("k32w_lock_app") { - deps = [ "${chip_root}/examples/lock-app/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ] + deps = [ "${chip_root}/examples/lock-app/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_lock_app)" ] } extra_build_deps += [ ":k32w_lock_app" ] @@ -705,7 +705,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_k32w_shell_app_build) { group("k32w_shell_app") { - deps = [ "${chip_root}/examples/shell/nxp/k32w/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ] + deps = [ "${chip_root}/examples/shell/nxp/k32w0/(${chip_root}/config/k32w/toolchain:k32w_shell_app)" ] } extra_build_deps += [ ":k32w_shell_app" ] diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 93333078f6f477..fee0d745f6d136 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -334,7 +334,11 @@ config("warnings_third_party") { } config("symbols_default") { - cflags = [ "-g${symbol_level}" ] + if (strip_symbols) { + cflags = [ "-s" ] + } else { + cflags = [ "-g${symbol_level}" ] + } } config("std_default") { @@ -489,6 +493,7 @@ config("libfuzzer_fuzzing") { config("oss_fuzz") { cflags = string_split(getenv("CFLAGS")) + cflags_cc = string_split(getenv("CXXFLAGS")) ldflags = string_split(getenv("CXXFLAGS")) ldflags += [ getenv("LIB_FUZZING_ENGINE") ] } diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni index 74dc224f3ecec7..63b1840bc884d2 100644 --- a/build/config/compiler/compiler.gni +++ b/build/config/compiler/compiler.gni @@ -30,11 +30,11 @@ declare_args() { symbol_level = 2 # Enable position independent code (-fPIC). - enable_pic = - current_os == "linux" || current_os == "mac" || current_os == "android" + enable_pic = current_os == "linux" || current_os == "mac" || + current_os == "android" || current_os == "tizen" # Enable position independent executables (-pie). - enable_pie = current_os == "linux" + enable_pie = current_os == "linux" || current_os == "tizen" # Remove unwind tables from the binary to save space. exclude_unwind_tables = current_os != "android" @@ -48,6 +48,9 @@ declare_args() { # enable libfuzzer is_libfuzzer = false + # Remove all symbol table and relocation information from the binary. + strip_symbols = false + # Generate code coverage analysis artifacts when enabled. use_coverage = false diff --git a/config/beken/BUILD.gn b/config/beken/BUILD.gn index 3a0de665887e0b..35e5175a89f7cd 100644 --- a/config/beken/BUILD.gn +++ b/config/beken/BUILD.gn @@ -21,10 +21,7 @@ import("//build_overrides/chip.gni") #import("${chip_root}/build/chip/tests.gni") group("beken") { - deps = [ - "${chip_root}/examples/lighting-app/beken:MatterApp", - "${chip_root}/src/lib", - ] + deps = [ "${chip_root}/src/lib" ] } group("default") { deps = [ ":beken" ] diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 7052f4f7605781..7e9894a8d66065 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -467,6 +467,13 @@ if(NOT CONFIG_USE_MINIMAL_MDNS) endif() endif() +if(CONFIG_OPENTHREAD_BORDER_ROUTER) + idf_component_get_property(rcp_update_lib espressif__esp_rcp_update COMPONENT_LIB) + list(APPEND chip_libraries $) + idf_component_get_property(serial_flasher_lib espressif__esp-serial-flasher COMPONENT_LIB) + list(APPEND chip_libraries $) +endif() + if (CONFIG_ENABLE_ENCRYPTED_OTA) idf_component_get_property(esp_encrypted_img_lib espressif__esp_encrypted_img COMPONENT_LIB) list(APPEND chip_libraries $) diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index a9509f42853f1a..c82cc73f4ff739 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -26,8 +26,15 @@ dependencies: - if: "idf_version >=5.0" - if: "target != esp32h2" + espressif/esp_delta_ota: version: "^1.1.0" require: public rules: - if: "idf_version >=4.3" + + espressif/esp_rcp_update: + version: "1.0.3" + rules: + - if: "idf_version >=5.0" + diff --git a/config/k32w/toolchain/BUILD.gn b/config/k32w/toolchain/BUILD.gn index f386bcd0cd4c97..5189a17eff5a67 100644 --- a/config/k32w/toolchain/BUILD.gn +++ b/config/k32w/toolchain/BUILD.gn @@ -20,27 +20,27 @@ import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") arm_toolchain("k32w_lighting_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lighting-app/nxp/k32w/k32w0/args.gni") + import("${chip_root}/examples/lighting-app/nxp/k32w0/args.gni") } } arm_toolchain("k32w_lock_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lock-app/nxp/k32w/k32w0/args.gni") + import("${chip_root}/examples/lock-app/nxp/k32w0/args.gni") } } arm_toolchain("k32w_contact_sensor_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/contact-sensor-app/nxp/k32w/k32w0/args.gni") + import("${chip_root}/examples/contact-sensor-app/nxp/k32w0/args.gni") } } arm_toolchain("k32w_shell_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/shell/nxp/k32w/k32w0/args.gni") + import("${chip_root}/examples/shell/nxp/k32w0/args.gni") } } diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index f8986e7a954fb4..7b58f5c4b6fc05 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -125,7 +125,7 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID) matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE) endif() -if(CONFIG_WIFI_W91) +if (CONFIG_WIFI_W91) matter_add_gn_arg_string("chip_mdns" "minimal") elseif (CONFIG_NET_L2_OPENTHREAD) matter_add_gn_arg_string("chip_mdns" "platform") @@ -160,12 +160,11 @@ include(${TELINK_COMMON}/common.cmake) set(BLOCK_SIZE "1024") -# get code-partition mcuboot_partition size -dt_nodelabel(dts_partition_path NODELABEL "boot_partition") -dt_reg_size(mcuboot_size PATH ${dts_partition_path}) -math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) - if (CONFIG_BOOTLOADER_MCUBOOT) + dt_nodelabel(dts_partition_path NODELABEL "boot_partition") + dt_reg_size(mcuboot_size PATH ${dts_partition_path}) + math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) + add_custom_target(build_mcuboot ALL COMMAND west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr @@ -183,31 +182,30 @@ if (CONFIG_BOOTLOADER_MCUBOOT) add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE}) -if (CONFIG_CHIP_OTA_IMAGE_BUILD) - chip_ota_image(chip-ota-image - INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin - OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin - ) + if (CONFIG_CHIP_OTA_IMAGE_BUILD) + chip_ota_image(chip-ota-image + INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin + OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin + ) - add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE}) -endif() + add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE}) + endif() endif() -# get code-partition factory_partition address -dt_nodelabel(dts_partition_path NODELABEL "factory_partition") -dt_reg_addr(factory_size PATH ${dts_partition_path}) -math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) - if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) - add_custom_target(merge_factory_data ALL - COMMAND - dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks} - ) - if (CONFIG_CHIP_OTA_IMAGE_BUILD) - add_dependencies(merge_factory_data merge_mcuboot) - else() - add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE}) - endif() + dt_nodelabel(dts_partition_path NODELABEL "factory_partition") + dt_reg_addr(factory_size PATH ${dts_partition_path}) + math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) + + add_custom_target(merge_factory_data ALL + COMMAND + dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks} + ) + if (CONFIG_CHIP_OTA_IMAGE_BUILD) + add_dependencies(merge_factory_data merge_mcuboot) + else() + add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE}) + endif() endif() # ============================================================================== @@ -218,4 +216,27 @@ if (CONFIG_CHIP_FACTORY_DATA_BUILD) telink_generate_factory_data() endif() +if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN) + dt_nodelabel(flash_path NODELABEL "flash") + dt_reg_size(flash_size PATH ${flash_path}) + math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL) + + add_custom_target(merge_n22 ALL + COMMAND + [ -f ${PROJECT_BINARY_DIR}/n22.bin ] && ( + dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin && + dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc && + dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc + ) || true + ) + + if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE) + add_dependencies(merge_n22 merge_factory_data) + elseif (CONFIG_CHIP_OTA_IMAGE_BUILD) + add_dependencies(merge_n22 merge_mcuboot) + else() + add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE}) + endif() +endif() + endif() # CONFIG_CHIP diff --git a/docs/QUICK_START.md b/docs/QUICK_START.md index 10833e0c0c1ed7..d5d80703c5e61f 100644 --- a/docs/QUICK_START.md +++ b/docs/QUICK_START.md @@ -17,10 +17,10 @@ and platforms. Use one of the controllers listed above and then a Border Router and Node combination listed below. -|
Border Router
|
Node
| Description | -| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [**ot-br**](https://openthread.io/guides/border-router/build)
Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/silabs/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | -| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lock-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nxp/k32w/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md)
  • [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. | +|
    Border Router
    |
    Node
    | Description | +| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lighting-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect/README.md)
  • [NXP K32W](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nxp/k32w0/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/silabs/README.md) | The Lighting example is supported by many of the available Thread platforms. See the chip-tool controller instructions for how to actuate the light on/off cluster. | +| [**ot-br**](https://openthread.io/guides/border-router/build)
    Thread Border Router
  • RasPi
  • BeagleBone | **lock-app**
  • [Nordic nRF5x](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/nrfconnect/README.md)
  • [Qorvo QPG6100](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/qpg)
  • [Silicon Labs EFR32](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/efr32/README.md)
  • [TI CC13x2x7](https://github.com/project-chip/connectedhomeip/tree/master/examples/lock-app/cc13x2x7_26x2x7/README.md) | The Lock example is supported by many of the available Thread and Wi-Fi platforms. | ## Controllers diff --git a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md index e016ea78b7b7bf..e2460ff5a0a2b2 100644 --- a/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md +++ b/docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md @@ -107,9 +107,9 @@ ending in the cluster initialization code. EmberAfInitializeAttributes - ember attribute storage - for all attributes marked as “RAM” in the zap, sets defaults in the storage MatterPluginServerCallback - .h is a generated file, .cpp impl is done -in the server cluster code. Use this to setup the cluster and do attribute -overrides registerAttributeAccessOverride - use this if you want to handle -attribute reads and writes externally +in the server cluster code. Use this to setup the cluster and setup overrides in +chip::app::AttributeAccessInterfaceRegistry::Instance().Register - use this if +you want to handle attribute reads and writes externally Blue sections can be overridden. diff --git a/docs/examples/index.md b/docs/examples/index.md index 446c94f6f61f3b..9dbb0a5aa4e940 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -370,3 +370,12 @@ network-manager-app/README lit-icd-app/**/README ``` + +## Thread Border Router example + +```{toctree} +:glob: +:maxdepth: 1 + +thread-br-app/**/README +``` diff --git a/docs/guides/esp32/build_app_and_commission.md b/docs/guides/esp32/build_app_and_commission.md index 959a0e90173c74..942cb6add83bdc 100644 --- a/docs/guides/esp32/build_app_and_commission.md +++ b/docs/guides/esp32/build_app_and_commission.md @@ -168,9 +168,9 @@ $ out/debug/chip-tool pairing ble-wifi 12345 MY_SSID MY_PASSWORD 20202021 3840 #### Commissioning the Thread device (ESP32H2) - For ESP32-H2, firstly start OpenThread Border Router, you can either use - [Raspberry Pi OpenThread Border Router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + [Raspberry Pi OpenThread Border Router](../openthread_border_router_pi.md) OR - [ESP32 OpenThread Border Router](https://github.com/espressif/esp-idf/tree/master/examples/openthread/ot_br) + [ESP32 OpenThread Border Router](../../../examples/thread-br-app/esp32/README.md) - Get the active operational dataset. diff --git a/docs/guides/mbedos_add_new_target.md b/docs/guides/mbedos_add_new_target.md index 8ea7c35c7049d2..ef9b7c403249eb 100644 --- a/docs/guides/mbedos_add_new_target.md +++ b/docs/guides/mbedos_add_new_target.md @@ -2,6 +2,8 @@ # Mbed-OS add new hardware target +### WARNING, MbedOS is deprecated and support for it will be removed from the connectedhomeip project + ## Overview This document shows how to add the new Mbed OS hardware target to Matter diff --git a/docs/guides/nxp/nxp_k32w0_ota_guide.md b/docs/guides/nxp/nxp_k32w0_ota_guide.md new file mode 100644 index 00000000000000..147bfdf2ee97e4 --- /dev/null +++ b/docs/guides/nxp/nxp_k32w0_ota_guide.md @@ -0,0 +1,232 @@ +# NXP K32W0x1 OTA guide + +## The Secondary Stage Bootloader (SSBL) + +There are multiple SSBL binaries provided by the SDK: + +| description | github SDK path | package SDK path | +| ------------------------------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| Default SSBL | NA | `boards/k32w061dk6/wireless_examples/framework/ssbl/binary/ssbl.bin` | +| SSBL with PDM in external flash | `examples/k32w061dk6/wireless_examples/framework/ssbl/binary/ssbl_ext_flash_pdm_support.bin` | `boards/k32w061dk6/wireless_examples/framework/ssbl/binary/ssbl_ext_flash_pdm_support.bin` | + +The SSBL is also built alongside the reference application and it can be +configured according to the following table: + +| gn arg | default | description | +| --------------------------------- | --------------------------- | ---------------------------------------------------------------------------------------- | +| `ssbl_pdm_external_flash` | true | Enable/disable PDM in external flash | +| `ssbl_multi_image_support` | true | Enable/disable multi-image OTA feature | +| `ssbl_ota_entry_storage` | "OTACustomStorage_ExtFlash" | Configure custom OTA entry storage type | +| `ssbl_simple_hash_verification` | false | Enable/disable simple hash verification alternative to secure boot | +| `ssbl_optimize_spifi_flash` | false | Optimize `SPIFI` flash driver size | +| `ssbl_spifi_dual_mode` | false | Enable/disable `SPIFI` dual mode support (e.g. used by K32W041AM variant) | +| `ssbl_version` | 0 | Set SSBL version | +| `ssbl_use_redlib` | false | Enable/disable usage of `redlib` NXP library. If false, the build will use `newlib` nano | +| `ssbl_ota_data_in_external_flash` | false | Enable/disable OTA support for application with sections stored in external flash | + +## Simple hash verification + +When secure boot is not used, a simple hash can be appended at the end of the +image for integrity check. Applications should be built with +`chip_simple_hash_verification=1`. + +## Writing the SSBL + +Before writing the SSBL, it it recommanded to fully erase the internal flash. + +Using DK6Programmer utility from Windows: + +``` +DK6Programmer.exe -V 5 -P 1000000 -s -e Flash +``` + +Using `dk6prog` from `SPSDK`: + +``` +$ dk6prog listdev +This is an experimental utility. Use with caution! + +List of available devices: +DEVICE ID: DN038ZH3, VID: 0x403, PID: 0x6015, Serial number: DN038ZH3, Description: DK6 Carrier Board, Address: 9, Backend: Backend.PYFTDI +$ dk6prog -d DN038ZH3 erase 0 0x9de00 + +This is an experimental utility. Use with caution! + +Erasing memory [####################################] 100% +``` + +`chip-k32w0x-ssbl.bin` must be written at address 0 in the internal flash: + +Using DK6Programmer utility from Windows: + +``` +DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x00="chip-k32w0x-ssbl.bin" +``` + +Using `dk6prog` from `SPSDK`: + +``` +$ dk6prog -d DN038ZH3 write 0 ~/path/to/bin/chip-k32w0x-ssbl.bin + +This is an experimental utility. Use with caution! + +Writing memory [####################################] 100% +Written 7890 bytes to memory ID 0 at address 0x0 +``` + +### Writing the PSECT + +This is the list of all supported partitions: + +``` +0000000010000000 : SSBL partition + + 00000000 -----------> Start Address + 1000 ---------------> 0x0010 Number of 512-bytes pages + 00 -----------------> 0x00 Bootable flag + 00 -----------------> 0x00 Image type (0x00 = SSBL) + +00400000c9040101: Application partition + + 00400000 -----------> 0x00004000 Start Address + c904 ---------------> 0x04c9 Number of 512-bytes pages + 01 -----------------> 0x01 Bootable flag + 01 -----------------> 0x01 Image type (0x01 = Application) + +00000010800000fe: Ext Flash text partition + + 00000010 -----------> 0x10000000 Start Address (external flash) + 8000 ---------------> 0x0080 Number of 512-bytes pages + 00 -----------------> 0x00 Bootable flag + fe -----------------> 0xFE Image type (0xFE = Ext Flash text) + +00000110300200fc : OTA Image partition + + 00000110 -----------> 0x10010000 Start Address + 3002----------------> 0x0230 Number of 512-bytes pages + 00 -----------------> 0x00 Bootable flag + fc -----------------> 0xFC Image type (0xFC = OTA partition) + +00000510100000fd: NVM partition + + 00000510 -----------> 0x10050000 Start Address + 1000 ---------------> 0x0010 Number of 512-bytes pages + 00 -----------------> 0x00 Bootable flag + fd -----------------> 0xFD Image type (0xFD = NVM partition) +``` + +First, image directory 0 (SSBL partition) must be written: + +Using DK6Programmer utility from Windows: + +``` +DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_0=0000000010000000 +``` + +Using `dk6prog` from `SPSDK`: + +``` +$ dk6prog -d DN038ZH3 write 0x160 [[0000000010000000]] 8 PSECT + +This is an experimental utility. Use with caution! + +Writing memory [####################################] 100% +Written 8 bytes to memory ID PSECT at address 0x160 +``` + +Here is the interpretation of the fields: + +``` +00000000 -> start address 0x00000000 +1000 -> size = 0x0010 pages of 512-bytes (= 8kB) +00 -> not bootable (only used by the SSBL to support SSBL update) +00 -> SSBL Image Type +``` + +Second, image directory 1 (application partition) must be written: + +Using DK6Programmer utility from Windows: + +``` +DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_1=00400000C9040101 +``` + +Using `dk6prog` from `SPSDK`: + +``` +$ dk6prog -d DN038ZH3 write 0x168 [[00400000C9040101]] 8 PSECT + +This is an experimental utility. Use with caution! + +Writing memory [####################################] 100% +Written 8 bytes to memory ID PSECT at address 0x168 +``` + +Here is the interpretation of the fields: + +``` +00400000 -> start address 0x00004000 +C904 -> 0x4C9 pages of 512-bytes (= 612.5kB) +01 -> bootable flag +01 -> image type for the application +``` + +Please note the user can write additional partitions by writing +`image_dir_2/3/4` with the wanted configuration. In case of using the `SPSDK` +tool, the appropriate offset must be calculated + +## Removing SSBL Upgrade Region + +The example also offers the possibility to remove SSBL upgrade region, for +reserving more space for application level. + +A new flag `chip_reduce_ssbl_size` is introduced. In order to remove the SSBL +upgrade region, `chip_reduce_ssbl_size=true` must be provided to the build +system + +The programming method will change: + +- Writing image directory 1 should change to Using DK6Programmer utility from + Windows: + + ``` + DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_1=00200000D9040101 + ``` + + Using `dk6prog` from `SPSDK`: + + ``` + $ dk6prog -d DN038ZH3 write 0x168 [[00200000D9040101]] 8 PSECT + + This is an experimental utility. Use with caution! + + Writing memory [####################################] 100% + Written 8 bytes to memory ID PSECT at address 0x168 + ``` + + Here is the interpretation of the fields: + + ``` + 00200000 -> start address 0x00002000 + D904 -> 0x4D9 pages of 512-bytes (= 620.5kB) + 01 -> bootable flag + 01 -> image type for the application + ``` + +- Matter application offset address should change to Using DK6Programmer + utility from Windows: + + ``` + DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x2000="chip-k32w0x-contact-example.bin" + ``` + + Using `dk6prog` from `SPSDK`: + + ``` + $ dk6prog -d DN038ZH3 write 0x2000 ~/path/to/bin/chip-k32w0x-contact-example.bin + + This is an experimental utility. Use with caution! + + Writing memory [####################################] 100% + Written 596450 bytes to memory ID 0 at address 0x2000 + ``` diff --git a/docs/guides/nxp/nxp_k32w_android_commissioning.md b/docs/guides/nxp/nxp_k32w_android_commissioning.md index 6d872f5f7ba268..a37d60f0f0ba4e 100644 --- a/docs/guides/nxp/nxp_k32w_android_commissioning.md +++ b/docs/guides/nxp/nxp_k32w_android_commissioning.md @@ -8,16 +8,17 @@ onto a CHIP-enabled Thread network.
    -- [Overview](#overview) -- [Requirements](#requirements) -- [Building and programming OpenThread RCP firmware](#building-and-programming-openthread-rcp-firmware) -- [Configuring PC as Thread Border Router](#configuring-pc-as-a-thread-border-router) -- [Building and programming NXP K32W Light Example Application](#building-and-programming-nxp-k32w-light-example-application) -- [Building and installing Android CHIPTool](#building-and-installing-android-chiptool) -- [Forming a Thread network on the Border Router](#forming-a-thread-network-on-the-border-router) -- [Preparing accessory device](#preparing-accessory-device) -- [Commissioning accessory device](#commissioning-accessory-device) -- [Sending CHIP commands](#sending-chip-commands) +- [Commissioning NXP K32W using Android CHIPTool](#commissioning-nxp-k32w-using-android-chiptool) + - [Overview](#overview) + - [Requirements](#requirements) + - [Building and programming OpenThread RCP firmware](#building-and-programming-openthread-rcp-firmware) + - [Configuring PC as a Thread Border Router](#configuring-pc-as-a-thread-border-router) + - [Building and programming NXP K32W Light Example Application](#building-and-programming-nxp-k32w-light-example-application) + - [Building and installing Android CHIPTool](#building-and-installing-android-chiptool) + - [Forming a Thread network on the Border Router](#forming-a-thread-network-on-the-border-router) + - [Preparing accessory device](#preparing-accessory-device) + - [Commissioning accessory device](#commissioning-accessory-device) + - [Sending CHIP commands](#sending-chip-commands)
    @@ -47,7 +48,7 @@ The following diagram shows the connectivity between network components required to allow communication between devices running the CHIPTool and Light applications: -![nxp_hw_connectivity](../../../examples/platform/nxp/k32w/k32w0/doc/images/nxp_hw_connectivity.JPG) +![nxp_hw_connectivity](../../../examples/platform/nxp/k32w0/doc/images/nxp_hw_connectivity.JPG)
    @@ -111,7 +112,7 @@ the RCP firmware onto an K32W061 DK6: This creates an RCP image in the `bin/ot-rcp` directory. 6. Program the RCP firmware using the official - [OpenThread Flash Instructions](https://github.com/openthread/openthread/blob/master/examples/platforms/k32w/k32w061/README.md#flash-binaries). + [OpenThread Flash Instructions](https://github.com/openthread/openthread/blob/master/examples/platforms/k32w061/README.md#flash-binaries). 7. Plug-in the K32W061 DK6 to the PC. @@ -348,7 +349,7 @@ To make your PC work as a Thread Border Router, complete the following tasks: ## Building and programming NXP K32W Light Example Application See -[NXP K32W Light Example Application README](../../../examples/lighting-app/nxp/k32w/k32w0/README.md) +[NXP K32W Light Example Application README](../../../examples/lighting-app/nxp/k32w0/README.md) to learn how to build and program the light example onto an K32W061 DK6.
    @@ -396,7 +397,7 @@ CHIPTool is now ready to be used for commissioning. 3. Navigate to the _Form_ tab then push the _Form_ button using the default parameters: - ![nxp_form_nwk](../../../examples/platform/nxp/k32w/k32w0/doc/images/form_web.JPG) + ![nxp_form_nwk](../../../examples/platform/nxp/k32w0/doc/images/form_web.JPG) 4. The message _Form operation is successful_ should be display after a few seconds. @@ -430,7 +431,7 @@ To prepare the accessory device for commissioning, complete the following steps: 1. Make sure that JP4 and JP7 jumpers are in leftmost position and a mini-USB cable is connected between the LPC connector and PC - ![nxp_connectors](../../../examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6-connectors.jpg) + ![nxp_connectors](../../../examples/platform/nxp/k32w0/doc/images/k32w-dk6-connectors.jpg) 2. Use a terminal emulator (e.g.: Putty) to connect to the UART console of the accessory device. Use a baudrate of 115200. @@ -466,14 +467,14 @@ section, complete the following steps: progress with scanning, connection, and pairing. At the end of this process, the Thread network settings screen appears. - ![chiptool_main_screen](../../../examples/platform/nxp/k32w/k32w0/doc/images/chiptool_main_screen.png) + ![chiptool_main_screen](../../../examples/platform/nxp/k32w0/doc/images/chiptool_main_screen.png) 6. In the Thread network settings screen, use the default settings and tap the _SAVE NETWORK_ button to send a Thread provisioning message to the accessory device. You will see the "Network provisioning completed" message when the accessory device successfully joins the Thread network. - ![chiptool_credentials](../../../examples/platform/nxp/k32w/k32w0/doc/images/thread_credentials.png) + ![chiptool_credentials](../../../examples/platform/nxp/k32w0/doc/images/thread_credentials.png)
    @@ -483,7 +484,7 @@ section, complete the following steps: the provisioning is completed successfully and you are connected to the device. - ![on_off_cluster.png](../../../examples/platform/nxp/k32w/k32w0/doc/images/on_off_cluster.png) + ![on_off_cluster.png](../../../examples/platform/nxp/k32w0/doc/images/on_off_cluster.png) 2. Verify that the text box on the screen is not empty and contains the IPv6 address of the accessory device. diff --git a/docs/testing/yaml_schema.md b/docs/testing/yaml_schema.md index 8a4846bde5e4f1..292da55e0cd728 100644 --- a/docs/testing/yaml_schema.md +++ b/docs/testing/yaml_schema.md @@ -62,6 +62,7 @@ YAML schema |      hasMasksClear |list|| |      notValue |NoneType,bool,int,float,list,dict|Y| |      anyOf |list|| +|      python |str|Y| |    saveAs |str|| |    saveDataVersschemaionAs |str|| |  saveResponseAs |str|| diff --git a/docs/tools/index.md b/docs/tools/index.md index 003573ed5ebb14..a2ff8fd1587f89 100644 --- a/docs/tools/index.md +++ b/docs/tools/index.md @@ -49,6 +49,8 @@ Source files for these tools are located at `scripts/tools`. :maxdepth: 1 ../scripts/tools/silabs/README +../scripts/tools/silabs/ota/README +../scripts/tools/silabs/factory_data_generator/README ``` diff --git a/docs/upgrading.md b/docs/upgrading.md index 9a8c68987bec3b..5640c925aca5ec 100644 --- a/docs/upgrading.md +++ b/docs/upgrading.md @@ -69,10 +69,26 @@ independent of the InteractionModelEngine class. The following replacements exist: - `chip::app::InteractionModelEngine::RegisterCommandHandler` replaced by - `chip::app::CommandHandlerInterfaceRegistry::RegisterCommandHandler` + `chip::app::CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler` - `chip::app::InteractionModelEngine::UnregisterCommandHandler` replaced by - `chip::app::CommandHandlerInterfaceRegistry::UnregisterCommandHandler` + `chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterCommandHandler` - `chip::app::InteractionModelEngine::FindCommandHandler` replaced by - `chip::app::CommandHandlerInterfaceRegistry::GetCommandHandler` + `chip::app::CommandHandlerInterfaceRegistry::Instance().GetCommandHandler` - `chip::app::InteractionModelEngine::UnregisterCommandHandlers` replaced by - `chip::app::CommandHandlerInterfaceRegistry::UnregisterAllCommandHandlersForEndpoint` + `chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterAllCommandHandlersForEndpoint` + +### AttributeAccessInterface registration and removal + +A new object exists for the attribute access interface registry, accessible as +`chip::app::AttributeHandlerInterfaceRegistry::Instance()` + +Replacements for methods are: + +- `registerAttributeAccessOverride` replaced by + `chip::app::AttributeAccessInterfaceRegistry::Instance().Register` +- `unregisterAttributeAccessOverride` replaced by + `chip::app::AttributeAccessInterfaceRegistry::Instance().Unregister` +- `unregisterAllAttributeAccessOverridesForEndpoint` replaced by + `chip::app::AttributeAccessInterfaceRegistry::Instance().UnregisterAllForEndpoint` +- `chip::app::GetAttributeAccessOverride` replaced by + `chip::app::AttributeAccessInterfaceRegistry::Instance().Get` 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 993ad36232572f..cb1c102b239f3e 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1318,7 +1534,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1364,7 +1580,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1437,7 +1652,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1447,6 +1661,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1512,7 +1730,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1544,23 +1762,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1601,8 +1819,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1642,28 +1859,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ 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 391b5450b00993..0566f91f67a953 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 c0c22fc0df0191..776b241c6ed958 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -5155,7 +5371,7 @@ cluster PumpConfigurationAndControl = 512 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -5201,7 +5417,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -5274,7 +5489,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5284,6 +5498,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -5349,7 +5567,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -5381,23 +5599,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5438,8 +5656,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5479,28 +5696,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -6071,7 +6292,7 @@ cluster RelativeHumidityMeasurement = 1029 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -6949,6 +7170,7 @@ internal cluster UnitTesting = 4294048773 { SimpleBitmap f = 5; single g = 6; double h = 7; + optional TestGlobalEnum i = 8; } fabric_scoped struct TestFabricScoped { @@ -6981,6 +7203,7 @@ internal cluster UnitTesting = 4294048773 { int8u a = 0; boolean b = 1; SimpleStruct c = 2; + optional TestGlobalStruct d = 3; } struct NestedStructList { @@ -7066,6 +7289,8 @@ internal cluster UnitTesting = 4294048773 { timedwrite attribute boolean timedWriteBoolean = 48; attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; + attribute TestGlobalEnum globalEnum = 51; + attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; @@ -7101,6 +7326,8 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute nullable TestGlobalEnum nullableGlobalEnum = 16435; + attribute nullable TestGlobalStruct nullableGlobalStruct = 16436; attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -7252,6 +7479,11 @@ internal cluster UnitTesting = 4294048773 { SimpleEnum arg2 = 1; } + response struct GlobalEchoResponse = 14 { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestNullableOptionalRequestRequest { optional nullable int8u arg1 = 0; } @@ -7305,6 +7537,11 @@ internal cluster UnitTesting = 4294048773 { octet_string payload = 0; } + request struct GlobalEchoRequestRequest { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestDifferentVendorMeiRequestRequest { int8u arg1 = 0; } @@ -7388,6 +7625,9 @@ internal cluster UnitTesting = 4294048773 { the string back. If the string is large then it would require a session that supports large payloads. */ command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24; + /** Command that takes arguments that are global structs/enums and the + response just echoes them back. */ + command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25; /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } @@ -8813,14 +9053,28 @@ endpoint 1 { ram attribute minSetpointDeadBand default = 0x19; ram attribute controlSequenceOfOperation default = 0x04; ram attribute systemMode default = 0x01; + callback attribute presetTypes; + callback attribute scheduleTypes; + ram attribute numberOfPresets default = 0; + ram attribute numberOfSchedules default = 0; + ram attribute numberOfScheduleTransitionPerDay default = 0xFF; + ram attribute activePresetHandle; + ram attribute activeScheduleHandle; + callback attribute presets; + callback attribute schedules; + ram attribute setpointHoldExpiryTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x0023; + ram attribute featureMap default = 0x0123; ram attribute clusterRevision default = 6; handle command SetpointRaiseLower; + handle command SetActiveScheduleRequest; + handle command SetActivePresetRequest; + handle command AtomicResponse; + handle command AtomicRequest; } server cluster FanControl { @@ -8997,10 +9251,11 @@ endpoint 1 { server cluster OccupancySensing { ram attribute occupancy; ram attribute occupancySensorType; - ram attribute occupancySensorTypeBitmap; - ram attribute holdTime default = 10; + ram attribute occupancySensorTypeBitmap default = 1; + callback attribute holdTime; callback attribute holdTimeLimits; - ram attribute featureMap default = 0x01; + ram attribute PIROccupiedToUnoccupiedDelay default = 10; + callback attribute featureMap; ram attribute clusterRevision default = 5; } @@ -9274,6 +9529,8 @@ endpoint 1 { ram attribute timedWriteBoolean; callback attribute generalErrorBoolean; callback attribute clusterErrorBoolean; + ram attribute globalEnum; + callback attribute globalStruct; ram attribute nullableBoolean default = false; ram attribute nullableBitmap8 default = 0; ram attribute nullableBitmap16 default = 0; @@ -9308,6 +9565,8 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; callback attribute writeOnlyInt8u default = 0; + ram attribute nullableGlobalEnum; + callback attribute nullableGlobalStruct; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; ram attribute meiInt8u default = 0; @@ -9333,6 +9592,7 @@ endpoint 1 { handle command TestListInt8UReverseRequest; handle command StringEchoResponse; handle command TestEnumsRequest; + handle command GlobalEchoResponse; handle command TestNullableOptionalRequest; handle command SimpleStructEchoRequest; handle command TimedInvokeRequest; @@ -9342,6 +9602,7 @@ endpoint 1 { handle command TestBatchHelperRequest; handle command TestSecondBatchHelperRequest; handle command StringEchoRequest; + handle command GlobalEchoRequest; handle command TestDifferentVendorMeiRequest; handle command TestDifferentVendorMeiResponse; } @@ -9468,10 +9729,11 @@ endpoint 2 { server cluster OccupancySensing { ram attribute occupancy; ram attribute occupancySensorType; - ram attribute occupancySensorTypeBitmap; - ram attribute holdTime default = 20; + ram attribute occupancySensorTypeBitmap default = 1; + callback attribute holdTime; callback attribute holdTimeLimits; - ram attribute featureMap default = 0x01; + ram attribute PIROccupiedToUnoccupiedDelay default = 10; + callback attribute featureMap; ram attribute clusterRevision default = 5; } } 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 31b6a05057dc74..f817d147160ef9 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 @@ -16393,6 +16393,38 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "SetActiveScheduleRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetActivePresetRequest", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AtomicResponse", + "code": 253, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AtomicRequest", + "code": 254, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -16497,7 +16529,7 @@ "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16513,7 +16545,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16529,7 +16561,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16545,7 +16577,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16561,7 +16593,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16577,7 +16609,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -16636,6 +16668,166 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "PresetTypes", + "code": 72, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleTypes", + "code": 73, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPresets", + "code": 74, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfSchedules", + "code": 75, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfScheduleTransitionPerDay", + "code": 77, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActivePresetHandle", + "code": 78, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveScheduleHandle", + "code": 79, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Presets", + "code": 80, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Schedules", + "code": 81, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointHoldExpiryTimestamp", + "code": 82, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -16710,7 +16902,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0023", + "defaultValue": "0x0123", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18991,7 +19183,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -19004,10 +19196,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "10", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -19029,6 +19221,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -19036,10 +19244,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -22229,6 +22437,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoResponse", + "code": 14, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, { "name": "TestNullableOptionalRequest", "code": 15, @@ -22301,6 +22517,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoRequest", + "code": 25, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "TestDifferentVendorMeiRequest", "code": 4294049962, @@ -23071,6 +23295,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "global_enum", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "global_struct", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "nullable_boolean", "code": 16384, @@ -23615,6 +23871,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "nullable_global_enum", + "code": 16435, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_global_struct", + "code": 16436, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -25052,7 +25340,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -25065,10 +25353,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "20", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -25090,6 +25378,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "PIROccupiedToUnoccupiedDelay", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -25097,10 +25401,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x01", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -26554,4 +26858,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h index 60b6b09e9b6511..badadd68cd30a9 100644 --- a/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/operational-state-delegate-impl.h @@ -138,6 +138,7 @@ class OperationalStateDelegate : public GenericOperationalStateDelegateImpl }; Instance * GetOperationalStateInstance(); +OperationalStateDelegate * GetOperationalStateDelegate(); void Shutdown(); diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index 41171d760d0048..90d1b9ebd115b0 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -98,5 +98,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback() { - registerAttributeAccessOverride(&gAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp index 9309b597db434f..e0fb68c95f647c 100644 --- a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp @@ -173,6 +173,6 @@ void emberAfFanControlClusterInitCallback(EndpointId endpoint) { VerifyOrDie(mFanControlManager == nullptr); mFanControlManager = new FanControlManager(endpoint); - registerAttributeAccessOverride(mFanControlManager); + AttributeAccessInterfaceRegistry::Instance().Register(mFanControlManager); FanControl::SetDefaultDelegate(endpoint, mFanControlManager); } diff --git a/examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp index dcbb90ff659bcb..1ac4c40ef184aa 100644 --- a/examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/occupancy-sensing-stub.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include using namespace chip; @@ -28,30 +29,48 @@ using namespace chip::DeviceLayer; using chip::Protocols::InteractionModel::Status; -static std::unique_ptr - gAttrAccess[MATTER_DM_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; +namespace { + +static constexpr size_t kOccupancySensingClusterTableSize = + MATTER_DM_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT + CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; + +static_assert(kOccupancySensingClusterTableSize <= kEmberInvalidEndpointIndex, "Occupancy Sensing Cluster table size error"); + +static std::unique_ptr gOccupancySensingClusterInstances[kOccupancySensingClusterTableSize]; + +} // namespace void emberAfOccupancySensingClusterInitCallback(EndpointId endpointId) { - VerifyOrDie(!gAttrAccess[endpointId]); + uint16_t epIndex = emberAfGetClusterServerEndpointIndex(endpointId, chip::app::Clusters::OccupancySensing::Id, + MATTER_DM_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT); - gAttrAccess[endpointId] = std::make_unique( - BitMask(OccupancySensing::Feature::kOther)); + if (epIndex < kOccupancySensingClusterTableSize) + { + VerifyOrDie(!gOccupancySensingClusterInstances[epIndex]); - OccupancySensing::Structs::HoldTimeLimitsStruct::Type holdTimeLimits = { - .holdTimeMin = 1, - .holdTimeMax = 300, - .holdTimeDefault = 10, - }; + gOccupancySensingClusterInstances[epIndex] = + std::make_unique(BitMask(OccupancySensing::Feature::kPassiveInfrared)); - uint16_t holdTime = 10; + OccupancySensing::Structs::HoldTimeLimitsStruct::Type holdTimeLimits = { + .holdTimeMin = 1, + .holdTimeMax = 300, + .holdTimeDefault = 10, + }; - if (gAttrAccess[endpointId]) - { - gAttrAccess[endpointId]->Init(); + uint16_t holdTime = 10; + + if (gOccupancySensingClusterInstances[epIndex]) + { + gOccupancySensingClusterInstances[epIndex]->Init(); - SetHoldTimeLimits(endpointId, holdTimeLimits); + SetHoldTimeLimits(endpointId, holdTimeLimits); - SetHoldTime(endpointId, holdTime); + SetHoldTime(endpointId, holdTime); + } + } + else + { + ChipLogError(AppServer, "Error: invalid/unexpected OccupancySensing Cluster endpoint index."); } } diff --git a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp index d258b8261a1aed..d4a91cf259a2a7 100644 --- a/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/operational-state-delegate-impl.cpp @@ -59,6 +59,7 @@ void GenericOperationalStateDelegateImpl::HandlePauseStateCallback(GenericOperat auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); if (error == CHIP_NO_ERROR) { + GetInstance()->UpdateCountdownTimeFromDelegate(); err.Set(to_underlying(ErrorStateEnum::kNoError)); } else @@ -73,6 +74,7 @@ void GenericOperationalStateDelegateImpl::HandleResumeStateCallback(GenericOpera auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { + GetInstance()->UpdateCountdownTimeFromDelegate(); err.Set(to_underlying(ErrorStateEnum::kNoError)); } else @@ -96,6 +98,7 @@ void GenericOperationalStateDelegateImpl::HandleStartStateCallback(GenericOperat auto error = GetInstance()->SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { + GetInstance()->UpdateCountdownTimeFromDelegate(); (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, this); err.Set(to_underlying(ErrorStateEnum::kNoError)); } @@ -113,6 +116,8 @@ void GenericOperationalStateDelegateImpl::HandleStopStateCallback(GenericOperati { (void) DeviceLayer::SystemLayer().CancelTimer(onOperationalStateTimerTick, this); + GetInstance()->UpdateCountdownTimeFromDelegate(); + OperationalState::GenericOperationalError current_err(to_underlying(OperationalState::ErrorStateEnum::kNoError)); GetInstance()->GetCurrentOperationalError(current_err); @@ -152,6 +157,11 @@ static void onOperationalStateTimerTick(System::Layer * systemLayer, void * data delegate->mPausedTime++; } } + else if (!countdown_time.IsNull() && countdown_time.Value() <= 0) + { + OperationalState::GenericOperationalError noError(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + delegate->HandleStopStateCallback(noError); + } if (state == OperationalState::OperationalStateEnum::kRunning || state == OperationalState::OperationalStateEnum::kPaused) { @@ -173,6 +183,11 @@ OperationalState::Instance * OperationalState::GetOperationalStateInstance() return gOperationalStateInstance; } +OperationalStateDelegate * OperationalState::GetOperationalStateDelegate() +{ + return gOperationalStateDelegate; +} + void OperationalState::Shutdown() { if (gOperationalStateInstance != nullptr) diff --git a/examples/all-clusters-app/cc13x4_26x4/README.md b/examples/all-clusters-app/cc13x4_26x4/README.md index be6a38277edafc..b90e3933c351e5 100644 --- a/examples/all-clusters-app/cc13x4_26x4/README.md +++ b/examples/all-clusters-app/cc13x4_26x4/README.md @@ -109,7 +109,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming diff --git a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp index 98926214c4cb36..88099f009f2dac 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp @@ -76,8 +76,10 @@ AppTask AppTask::sAppTask; constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs); void CancelTimer(void); +#endif uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; @@ -100,9 +102,9 @@ void InitializeOTARequestor(void) sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); } -#endif TimerHandle_t sOTAInitTimer = 0; +#endif // The OTA Init Timer is only started upon the first Thread State Change // detected if the device is already on a Thread Network, or during the AppTask @@ -176,10 +178,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) #endif } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void OTAInitTimerEventHandler(TimerHandle_t xTimer) { InitializeOTARequestor(); } +#endif int AppTask::StartAppTask() { @@ -224,6 +228,7 @@ int AppTask::Init() ; } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Create FreeRTOS sw timer for OTA timer. sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) @@ -240,6 +245,7 @@ int AppTask::Init() { PLAT_LOG("sOTAInitTimer timer created successfully "); } +#endif ret = ThreadStackMgr().InitThreadStack(); if (ret != CHIP_NO_ERROR) diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults index 287262d17e57cc..03691548ea91db 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack.defaults @@ -73,3 +73,9 @@ CONFIG_BUILD_CHIP_TESTS=y # Move functions from IRAM to flash CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y + +# Reduce the event logging buffer to reduce the DRAM usage +# TODO: [ESP32] Fix the DRAM overflow in esp32 apps #34717 +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE=512 diff --git a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults index 56fed5d65e6797..0a426dffd0066e 100644 --- a/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -78,7 +78,16 @@ CONFIG_BUILD_CHIP_TESTS=y # Move functions from IRAM to flash CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y -# to avoid dram overflow, reduce the critical loggin buffer to 1K -CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=1024 - CONFIG_DIAG_USE_EXTERNAL_LOG_WRAP=y + +# Memory Optimizations +CONFIG_NIMBLE_MAX_CONNECTIONS=1 +CONFIG_BTDM_CTRL_BLE_MAX_CONN=1 +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n + +# Reduce the event logging buffer to reduce the DRAM overflow +# TODO: [ESP32] Fix the DRAM overflow in esp32 apps #34717 +CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE=512 +CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE=512 diff --git a/examples/all-clusters-app/infineon/psoc6/README.md b/examples/all-clusters-app/infineon/psoc6/README.md index 75a01995d8c9e4..138f132f7a0dba 100644 --- a/examples/all-clusters-app/infineon/psoc6/README.md +++ b/examples/all-clusters-app/infineon/psoc6/README.md @@ -30,10 +30,11 @@ will then join the network. ## Building -- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) +- Download and install + [Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox) - Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile` + or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and related tools. - Install some additional tools (likely already present for Matter @@ -62,11 +63,12 @@ will then join the network. - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the `MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in - proper mode. + proper mode. (Modustoolbox Software needs to be installed) - On the command line: $ cd ~/connectedhomeip + $ export CY_TOOLS_PATHS=/tools_3.2 $ python3 out/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.flash.py ## Commissioning and cluster control diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index d620731e93dc5c..6c1467fc62a145 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -667,21 +667,65 @@ void AllClustersAppCommandHandler::OnModeChangeHandler(std::string device, std:: void AllClustersAppCommandHandler::OnOperationalStateChange(std::string device, std::string operation, Json::Value param) { - OperationalState::Instance * operationalStateInstance = nullptr; if (device == "Generic") { - operationalStateInstance = OperationalState::GetOperationalStateInstance(); + OnGenericOperationalStateChange(device, operation, param); } else if (device == "Oven") { - operationalStateInstance = OvenCavityOperationalState::GetOperationalStateInstance(); + OnOvenOperationalStateChange(device, operation, param); } else { ChipLogDetail(NotSpecified, "Invalid device type : %s", device.c_str()); return; } +} + +void AllClustersAppCommandHandler::OnGenericOperationalStateChange(std::string device, std::string operation, Json::Value param) +{ + OperationalState::Instance * operationalStateInstance = OperationalState::GetOperationalStateInstance(); + OperationalState::OperationalStateDelegate * operationalStateDelegate = OperationalState::GetOperationalStateDelegate(); + OperationalState::GenericOperationalError noError(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + OperationalState::OperationalStateEnum state = + static_cast(operationalStateInstance->GetCurrentOperationalState()); + if (operation == "Start") + { + operationalStateDelegate->HandleStartStateCallback(noError); + } + else if (operation == "Resume") + { + operationalStateDelegate->HandleResumeStateCallback(noError); + } + else if (operation == "Pause") + { + operationalStateDelegate->HandlePauseStateCallback(noError); + } + else if (operation == "Stop" && state == OperationalState::OperationalStateEnum::kRunning) + { + operationalStateDelegate->HandleStopStateCallback(noError); + } + else if (operation == "OnFault") + { + uint8_t event_id = to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation); + if (!param.isNull()) + { + event_id = to_underlying(static_cast(param.asUInt())); + } + OperationalState::GenericOperationalError err(event_id); + operationalStateInstance->OnOperationalErrorDetected(err); + } + else + { + ChipLogDetail(NotSpecified, "Invalid operation : %s", operation.c_str()); + return; + } +} + +void AllClustersAppCommandHandler::OnOvenOperationalStateChange(std::string device, std::string operation, Json::Value param) +{ + OperationalState::Instance * operationalStateInstance = OvenCavityOperationalState::GetOperationalStateInstance(); if (operation == "Start" || operation == "Resume") { operationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index f097c539b54fb6..f1b873fc0d69c4 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -105,6 +105,16 @@ class AllClustersAppCommandHandler * Should be called when it is necessary to change the operational state as a manual operation. */ void OnOperationalStateChange(std::string device, std::string operation, Json::Value param); + + /** + * Should be called when it is necessary to change the operational state as a manual operation. + */ + void OnGenericOperationalStateChange(std::string device, std::string operation, Json::Value param); + + /** + * Should be called when it is necessary to change the operational state as a manual operation. + */ + void OnOvenOperationalStateChange(std::string device, std::string operation, Json::Value param); }; class AllClustersCommandDelegate : public NamedPipeCommandDelegate diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index e8671e701a7227..c7c5fb0f14ecd3 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -75,6 +75,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/device-energy-management-mode.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/energy-evse-mode.cpp", + "${chip_root}/examples/thermostat/linux/thermostat-delegate-impl.cpp", "AllClustersCommandDelegate.cpp", "AllClustersCommandDelegate.h", "AppOptions.cpp", @@ -98,6 +99,7 @@ source_set("chip-all-clusters-common") { include_dirs = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include", "${chip_root}/examples/energy-management-app/energy-management-common/include", + "${chip_root}/examples/thermostat/linux/include", ] if (chip_enable_pw_rpc) { diff --git a/examples/all-clusters-app/linux/ValveControlDelegate.cpp b/examples/all-clusters-app/linux/ValveControlDelegate.cpp index d0ce1b4ab3a980..29c744257fbabe 100644 --- a/examples/all-clusters-app/linux/ValveControlDelegate.cpp +++ b/examples/all-clusters-app/linux/ValveControlDelegate.cpp @@ -33,7 +33,7 @@ DataModel::Nullable ValveControlDelegate::HandleOpenValve(DataMod chip::Percent currentLevel = sLevel; sLevel = level.IsNull() ? 100 : level.Value(); sLastOpenDuration = 0; - ChipLogProgress(NotSpecified, "Valve openinig from level: %d to %d", currentLevel, sLevel); + ChipLogProgress(NotSpecified, "Valve opening from level: %d to %d", currentLevel, sLevel); // In this demo application, the trasition is considered instant, // so current level is set to the requested level and current state is set to kOpen. diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index bc547d5416377c..edddc6a8a7d62e 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -37,6 +37,7 @@ #include "rvc-modes.h" #include "rvc-operational-state-delegate-impl.h" #include "tcc-mode.h" +#include "thermostat-delegate-impl.h" #include "water-heater-mode.h" #include #include @@ -46,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -323,3 +325,12 @@ void emberAfDiagnosticLogsClusterInitCallback(chip::EndpointId endpoint) DiagnosticLogsServer::Instance().SetDiagnosticLogsProviderDelegate(endpoint, &logProvider); } + +using namespace chip::app::Clusters::Thermostat; +void emberAfThermostatClusterInitCallback(EndpointId endpoint) +{ + // Register the delegate for the Thermostat + auto & delegate = ThermostatDelegate::GetInstance(); + + SetDefaultDelegate(endpoint, &delegate); +} 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 4bf0d15e54f799..1444915c368b6b 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -3592,7 +3808,7 @@ cluster PumpConfigurationAndControl = 512 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -3638,7 +3854,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -3711,7 +3926,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -3721,6 +3935,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -3786,7 +4004,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -3818,23 +4036,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -3875,8 +4093,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3916,28 +4133,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -4508,7 +4729,7 @@ cluster RelativeHumidityMeasurement = 1029 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -5362,6 +5583,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { @@ -5540,6 +5764,7 @@ internal cluster UnitTesting = 4294048773 { SimpleBitmap f = 5; single g = 6; double h = 7; + optional TestGlobalEnum i = 8; } fabric_scoped struct TestFabricScoped { @@ -5572,6 +5797,7 @@ internal cluster UnitTesting = 4294048773 { int8u a = 0; boolean b = 1; SimpleStruct c = 2; + optional TestGlobalStruct d = 3; } struct NestedStructList { @@ -5657,6 +5883,8 @@ internal cluster UnitTesting = 4294048773 { timedwrite attribute boolean timedWriteBoolean = 48; attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; + attribute TestGlobalEnum globalEnum = 51; + attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; @@ -5692,6 +5920,8 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute nullable TestGlobalEnum nullableGlobalEnum = 16435; + attribute nullable TestGlobalStruct nullableGlobalStruct = 16436; attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -5843,6 +6073,11 @@ internal cluster UnitTesting = 4294048773 { SimpleEnum arg2 = 1; } + response struct GlobalEchoResponse = 14 { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestNullableOptionalRequestRequest { optional nullable int8u arg1 = 0; } @@ -5896,6 +6131,11 @@ internal cluster UnitTesting = 4294048773 { octet_string payload = 0; } + request struct GlobalEchoRequestRequest { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestDifferentVendorMeiRequestRequest { int8u arg1 = 0; } @@ -5979,6 +6219,9 @@ internal cluster UnitTesting = 4294048773 { the string back. If the string is large then it would require a session that supports large payloads. */ command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24; + /** Command that takes arguments that are global structs/enums and the + response just echoes them back. */ + command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25; /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } @@ -6682,8 +6925,8 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + callback attribute featureMap; + ram attribute clusterRevision default = 5; } server cluster WakeOnLan { @@ -6840,6 +7083,8 @@ endpoint 1 { ram attribute timedWriteBoolean; callback attribute generalErrorBoolean; callback attribute clusterErrorBoolean; + ram attribute globalEnum; + callback attribute globalStruct; ram attribute nullableBoolean default = false; ram attribute nullableBitmap8 default = 0; ram attribute nullableBitmap16 default = 0; @@ -6874,6 +7119,8 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; callback attribute writeOnlyInt8u default = 0; + ram attribute nullableGlobalEnum; + callback attribute nullableGlobalStruct; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; ram attribute meiInt8u default = 0; @@ -6899,6 +7146,7 @@ endpoint 1 { handle command TestListInt8UReverseRequest; handle command StringEchoResponse; handle command TestEnumsRequest; + handle command GlobalEchoResponse; handle command TestNullableOptionalRequest; handle command SimpleStructEchoRequest; handle command TimedInvokeRequest; @@ -6908,6 +7156,7 @@ endpoint 1 { handle command TestBatchHelperRequest; handle command TestSecondBatchHelperRequest; handle command StringEchoRequest; + handle command GlobalEchoRequest; handle command TestDifferentVendorMeiRequest; handle command TestDifferentVendorMeiResponse; } @@ -7029,8 +7278,8 @@ endpoint 2 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + callback attribute featureMap; + ram attribute clusterRevision default = 5; } } endpoint 65534 { 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 57f2c0412fca55..2482ca381ee7af 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 @@ -8014,7 +8014,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -9081,6 +9081,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoResponse", + "code": 14, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, { "name": "TestNullableOptionalRequest", "code": 15, @@ -9153,6 +9161,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoRequest", + "code": 25, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "TestDifferentVendorMeiRequest", "code": 4294049962, @@ -9923,6 +9939,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "global_enum", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "global_struct", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "nullable_boolean", "code": 16384, @@ -10467,6 +10515,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "nullable_global_enum", + "code": 16435, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_global_struct", + "code": 16436, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -11856,7 +11936,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults index 56fed5d65e6797..d2eaffb9bfd15b 100644 --- a/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults +++ b/examples/all-clusters-minimal-app/esp32/sdkconfig_m5stack_rpc.defaults @@ -72,6 +72,12 @@ CONFIG_BTDM_CTRL_LPCLK_SEL_MAIN_XTAL=n # Enable HKDF in mbedtls CONFIG_MBEDTLS_HKDF_C=y +# Memory Optimizations +CONFIG_NIMBLE_MAX_CONNECTIONS=1 +CONFIG_BTDM_CTRL_BLE_MAX_CONN=1 +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n + # Build chip tests CONFIG_BUILD_CHIP_TESTS=y diff --git a/examples/all-clusters-minimal-app/infineon/psoc6/README.md b/examples/all-clusters-minimal-app/infineon/psoc6/README.md index 4ebd3832f43de6..80b8e1ceb66791 100644 --- a/examples/all-clusters-minimal-app/infineon/psoc6/README.md +++ b/examples/all-clusters-minimal-app/infineon/psoc6/README.md @@ -30,10 +30,11 @@ will then join the network. ## Building -- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) +- Download and install + [Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox) - Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile` + or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and related tools. - Install some additional tools (likely already present for Matter @@ -62,11 +63,12 @@ will then join the network. - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the `MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in - proper mode. + proper mode. (Modustoolbox Software needs to be installed) - On the command line: $ cd ~/connectedhomeip + $ export CY_TOOLS_PATHS=/tools_3.2 $ python3 out/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.flash.py ## Commissioning and cluster control diff --git a/examples/bridge-app/asr/src/bridged-actions-stub.cpp b/examples/bridge-app/asr/src/bridged-actions-stub.cpp index 9e26bae9803fa1..73b7e8dd9877a0 100755 --- a/examples/bridge-app/asr/src/bridged-actions-stub.cpp +++ b/examples/bridge-app/asr/src/bridged-actions-stub.cpp @@ -97,5 +97,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback(void) { - registerAttributeAccessOverride(&gAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index c403ecd9d40ff6..1cc37299be6645 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp index 13ced6a2e1c7c6..768771555f3252 100644 --- a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp @@ -113,5 +113,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback(void) { - registerAttributeAccessOverride(&gAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 00f6913b8012c5..580f4f2239bd1a 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -133,5 +133,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback() { - registerAttributeAccessOverride(&gAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index c7e1dfb5a9c50b..d8446088a960a0 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -998,7 +998,7 @@ void ApplicationInit() } } - registerAttributeAccessOverride(&gPowerAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gPowerAttrAccess); } void ApplicationShutdown() {} diff --git a/examples/bridge-app/telink/src/DeviceCallbacks.cpp b/examples/bridge-app/telink/src/DeviceCallbacks.cpp index b0657e586fabc2..9e3273e7107472 100644 --- a/examples/bridge-app/telink/src/DeviceCallbacks.cpp +++ b/examples/bridge-app/telink/src/DeviceCallbacks.cpp @@ -101,5 +101,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback(void) { - registerAttributeAccessOverride(&gAttrAccess); + AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/chef/common/chef-concentration-measurement.cpp b/examples/chef/common/chef-concentration-measurement.cpp index f0b8109bdf9eda..d168b797b929ac 100644 --- a/examples/chef/common/chef-concentration-measurement.cpp +++ b/examples/chef/common/chef-concentration-measurement.cpp @@ -91,7 +91,7 @@ Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback( CHIP_ERROR err = clusterInstance->SetMeasuredValue(MakeNullable(newValue)); if (CHIP_NO_ERROR == err) { - ChipLogDetail(DeviceLayer, "Updated EP:%d, Cluster: 0x%04x to MeasuredValue: %f", endpoint, clusterId, newValue); + ChipLogDetail(DeviceLayer, "Updated EP:%d, Cluster: 0x%04x MeasuredValue", endpoint, clusterId); } else { diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index 899892501bf4f1..b30f58db27aee7 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -141,6 +141,6 @@ void emberAfFanControlClusterInitCallback(EndpointId endpoint) { VerifyOrDie(!mFanControlManager); mFanControlManager = std::make_unique(endpoint); - registerAttributeAccessOverride(mFanControlManager.get()); + AttributeAccessInterfaceRegistry::Instance().Register(mFanControlManager.get()); FanControl::SetDefaultDelegate(endpoint, mFanControlManager.get()); } diff --git a/examples/chef/common/chef-rpc-actions-worker.cpp b/examples/chef/common/chef-rpc-actions-worker.cpp index 98bba768e7f4d8..28413f098b6bcc 100644 --- a/examples/chef/common/chef-rpc-actions-worker.cpp +++ b/examples/chef/common/chef-rpc-actions-worker.cpp @@ -147,7 +147,9 @@ void ChefRpcActionsWorker::RegisterRpcActionsDelegate(ClusterId clusterId, Actio ChefRpcActionsWorker::ChefRpcActionsWorker() { +#if CONFIG_ENABLE_PW_RPC chip::rpc::SubscribeActions(ChefRpcActionsCallback); +#endif } static ChefRpcActionsWorker instance; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 2557a01f257fff..5edebd77931b80 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1703,7 +1919,7 @@ cluster FixedLabel = 64 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index 5cc3baccb0aa62..e4584f1ee4d086 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 9e1548b7dd36c5..ed130f29318062 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1241,7 +1457,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1287,7 +1503,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1360,7 +1575,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1370,6 +1584,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1435,7 +1653,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1467,23 +1685,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1524,8 +1742,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1565,28 +1782,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index 22282b4b3a8ffe..e155c0bb946563 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 4fb0ed83478012..84f789e40a1110 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 31241e3a4ab637..961f40352b1052 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 5735b2cf936ff4..d10dce747c4695 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1570,6 +1786,7 @@ internal cluster UnitTesting = 4294048773 { SimpleBitmap f = 5; single g = 6; double h = 7; + optional TestGlobalEnum i = 8; } fabric_scoped struct TestFabricScoped { @@ -1602,6 +1819,7 @@ internal cluster UnitTesting = 4294048773 { int8u a = 0; boolean b = 1; SimpleStruct c = 2; + optional TestGlobalStruct d = 3; } struct NestedStructList { @@ -1687,6 +1905,8 @@ internal cluster UnitTesting = 4294048773 { timedwrite attribute boolean timedWriteBoolean = 48; attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; + attribute TestGlobalEnum globalEnum = 51; + attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; @@ -1722,6 +1942,8 @@ internal cluster UnitTesting = 4294048773 { attribute nullable int16u nullableRangeRestrictedInt16u = 16424; attribute nullable int16s nullableRangeRestrictedInt16s = 16425; attribute optional int8u writeOnlyInt8u = 16426; + attribute nullable TestGlobalEnum nullableGlobalEnum = 16435; + attribute nullable TestGlobalStruct nullableGlobalStruct = 16436; attribute int8u meiInt8u = 4294070017; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1873,6 +2095,11 @@ internal cluster UnitTesting = 4294048773 { SimpleEnum arg2 = 1; } + response struct GlobalEchoResponse = 14 { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestNullableOptionalRequestRequest { optional nullable int8u arg1 = 0; } @@ -1926,6 +2153,11 @@ internal cluster UnitTesting = 4294048773 { octet_string payload = 0; } + request struct GlobalEchoRequestRequest { + TestGlobalStruct field1 = 0; + TestGlobalEnum field2 = 1; + } + request struct TestDifferentVendorMeiRequestRequest { int8u arg1 = 0; } @@ -2009,6 +2241,9 @@ internal cluster UnitTesting = 4294048773 { the string back. If the string is large then it would require a session that supports large payloads. */ command StringEchoRequest(StringEchoRequestRequest): StringEchoResponse = 24; + /** Command that takes arguments that are global structs/enums and the + response just echoes them back. */ + command GlobalEchoRequest(GlobalEchoRequestRequest): GlobalEchoResponse = 25; /** Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. */ command TestDifferentVendorMeiRequest(TestDifferentVendorMeiRequestRequest): TestDifferentVendorMeiResponse = 4294049962; } @@ -2332,6 +2567,8 @@ endpoint 1 { ram attribute timedWriteBoolean; callback attribute generalErrorBoolean; callback attribute clusterErrorBoolean; + ram attribute globalEnum; + callback attribute globalStruct; ram attribute nullableBoolean default = false; ram attribute nullableBitmap8 default = 0; ram attribute nullableBitmap16 default = 0; @@ -2366,6 +2603,8 @@ endpoint 1 { ram attribute nullableRangeRestrictedInt16u default = 200; ram attribute nullableRangeRestrictedInt16s default = -100; callback attribute writeOnlyInt8u default = 0; + ram attribute nullableGlobalEnum; + callback attribute nullableGlobalStruct; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; ram attribute meiInt8u default = 0; @@ -2390,6 +2629,7 @@ endpoint 1 { handle command TestListNestedStructListArgumentRequest; handle command TestListInt8UReverseRequest; handle command TestEnumsRequest; + handle command GlobalEchoResponse; handle command TestNullableOptionalRequest; handle command SimpleStructEchoRequest; handle command TimedInvokeRequest; @@ -2398,6 +2638,7 @@ endpoint 1 { handle command TestEmitTestFabricScopedEventRequest; handle command TestBatchHelperRequest; handle command TestSecondBatchHelperRequest; + handle command GlobalEchoRequest; handle command TestDifferentVendorMeiRequest; handle command TestDifferentVendorMeiResponse; } diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index 590dea9f9f3c8e..02a553e03f9cd1 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -3252,6 +3252,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoResponse", + "code": 14, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, { "name": "TestNullableOptionalRequest", "code": 15, @@ -3316,6 +3324,14 @@ "isIncoming": 1, "isEnabled": 1 }, + { + "name": "GlobalEchoRequest", + "code": 25, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, { "name": "TestDifferentVendorMeiRequest", "code": 4294049962, @@ -4086,6 +4102,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "global_enum", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "global_struct", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "nullable_boolean", "code": 16384, @@ -4630,6 +4678,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "nullable_global_enum", + "code": 16435, + "mfgCode": null, + "side": "server", + "type": "TestGlobalEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "nullable_global_struct", + "code": 16436, + "mfgCode": null, + "side": "server", + "type": "TestGlobalStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 657ce0dd5fe520..eff62c6119120c 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 9495bcd7e6b61e..8b8c2003f7bc29 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1598,7 +1814,7 @@ cluster FixedLabel = 64 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index e3a97805d6c5e8..0bf5f933e3d543 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1754,7 +1970,7 @@ provisional cluster ScenesManagement = 98 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index ceaeeecc4a7ef2..c8e41990993d27 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index d07df97b8f173a..71f96dbdf077d3 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -2510,7 +2726,7 @@ endpoint 1 { ram attribute credentialRulesSupport default = 1; ram attribute numberOfCredentialsSupportedPerUser default = 5; ram attribute language default = "en"; - ram attribute autoRelockTime default = 5; + ram attribute autoRelockTime default = 0; ram attribute soundVolume default = 0; ram attribute operatingMode default = 0; ram attribute supportedOperatingModes default = 0xFFFF; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 339fe71d2631a3..50e1a4bf1da25c 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -3665,7 +3665,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "5", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 06cefc49a5ce84..d9841f769a79dd 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 2eb6abd966f095..05a176ee9ab710 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 5c4452aabd8986..93eac702dcbc06 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 76d90d2ad12398..8748b8cd13b81f 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 5216ad0a5a3829..4c8e67c11e7726 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index cbbedfa6080098..ec62d4504f8601 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1598,7 +1814,7 @@ cluster FixedLabel = 64 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1644,7 +1860,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1717,7 +1932,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1727,6 +1941,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1792,7 +2010,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1824,23 +2042,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1881,8 +2099,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1922,28 +2139,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 05fd620ffd7518..adc500a4771045 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 7d10d932eefd39..06e8ba84d349b6 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index c7334375df90b2..be3a039189a5ed 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index c3e38b16d96ad4..146cc74bf0526f 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1401,7 +1617,7 @@ cluster FixedLabel = 64 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -1716,8 +1932,8 @@ endpoint 1 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; + callback attribute featureMap; + ram attribute clusterRevision default = 5; } } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 5fa3595ec45ee5..94cd749abacb5c 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -2993,7 +2993,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "5", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3022,4 +3022,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 17b66ebe5303ba..4627385f5a4c44 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 9492a186a67c3e..90131350b3ca47 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 03046a45af8ac8..cffe70d9aab388 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index a25ba3dafb35ac..a5e0f5505dffd8 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 4c45232b369f02..2b9b4036e638f5 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index ed9e7c58a90e11..cf42feded0cee8 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index d11ba11cc816be..78ae33bc847e5d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 026a69ae346280..7d8c54a3f41c4c 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index a116ea0892b644..d53a594c514919 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 7603eca8a44a52..95e0ba20d4adcb 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1181,7 +1397,7 @@ cluster GroupKeyManagement = 63 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1227,7 +1443,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1300,7 +1515,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1310,6 +1524,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1375,7 +1593,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1407,23 +1625,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1464,8 +1682,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1505,28 +1722,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index eab95df39549b2..3408fc64e6fc6f 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 52446c519d4ec5..bf55ae4be3bf03 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 3bafec9ed48427..b3178232de0291 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index c2b1ed117c6ff3..6c27235c7d3ade 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1401,7 +1617,7 @@ cluster FixedLabel = 64 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1447,7 +1663,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1520,7 +1735,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1530,6 +1744,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1595,7 +1813,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1627,23 +1845,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1684,8 +1902,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1725,28 +1942,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; + } + + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -1899,7 +2120,7 @@ cluster RelativeHumidityMeasurement = 1029 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index b318c7b3ed80b7..f49ed5824d5ce4 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/chef/esp32/partitions.csv b/examples/chef/esp32/partitions.csv index c0855b66229dc4..c84d53a64b6e59 100644 --- a/examples/chef/esp32/partitions.csv +++ b/examples/chef/esp32/partitions.csv @@ -3,4 +3,4 @@ nvs, data, nvs, , 0xC000, phy_init, data, phy, , 0x1000, # Factory partition size about 1.9MB -factory, app, factory, , 1945K, +factory, app, factory, , 2M, diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap index 420eaa37ef5615..87dd68c26e1d74 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap +++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap @@ -5654,7 +5654,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5683,4 +5683,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp index 294673512882b3..3c6342752a0a61 100644 --- a/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp +++ b/examples/chip-tool/commands/common/RemoteDataModelLogger.cpp @@ -160,8 +160,7 @@ CHIP_ERROR LogErrorAsJSON(const CHIP_ERROR & error) VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); Json::Value value; - chip::app::StatusIB status; - status.InitFromChipError(error); + chip::app::StatusIB status(error); return LogError(value, status); } diff --git a/examples/common/pigweed/BUILD.gn b/examples/common/pigweed/BUILD.gn index 6252f86e637890..a7b7d97da32ba6 100644 --- a/examples/common/pigweed/BUILD.gn +++ b/examples/common/pigweed/BUILD.gn @@ -90,6 +90,7 @@ pw_proto_library("fabric_admin_service") { pw_proto_library("fabric_bridge_service") { sources = [ "protos/fabric_bridge_service.proto" ] + inputs = [ "protos/fabric_bridge_service.options" ] deps = [ "$dir_pw_protobuf:common_protos" ] strip_prefix = "protos" prefix = "fabric_bridge_service" diff --git a/examples/common/pigweed/protos/fabric_bridge_service.options b/examples/common/pigweed/protos/fabric_bridge_service.options new file mode 100644 index 00000000000000..a095d85788eb1c --- /dev/null +++ b/examples/common/pigweed/protos/fabric_bridge_service.options @@ -0,0 +1,6 @@ +chip.rpc.SynchronizedDevice.unique_id max_size:33 +chip.rpc.SynchronizedDevice.vendor_name max_size:33 +chip.rpc.SynchronizedDevice.product_name max_size:33 +chip.rpc.SynchronizedDevice.node_label max_size:33 +chip.rpc.SynchronizedDevice.hardware_version_string max_size:65 +chip.rpc.SynchronizedDevice.software_version_string max_size:65 diff --git a/examples/common/pigweed/protos/fabric_bridge_service.proto b/examples/common/pigweed/protos/fabric_bridge_service.proto index 10e5ccf888583d..f2e4fd2f32fe53 100644 --- a/examples/common/pigweed/protos/fabric_bridge_service.proto +++ b/examples/common/pigweed/protos/fabric_bridge_service.proto @@ -7,6 +7,17 @@ package chip.rpc; // Define the message for a synchronized end device with necessary fields message SynchronizedDevice { uint64 node_id = 1; + + optional string unique_id = 2; + optional string vendor_name = 3; + optional uint32 vendor_id = 4; + optional string product_name = 5; + optional uint32 product_id = 6; + optional string node_label = 7; + optional uint32 hardware_version = 8; + optional string hardware_version_string = 9; + optional uint32 software_version = 10; + optional string software_version_string = 11; } service FabricBridge { 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 e1c580c030bc5a..bb1c2827a8d609 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1700,7 +1916,7 @@ cluster BooleanState = 69 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -2153,8 +2369,8 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + callback attribute featureMap; + ram attribute clusterRevision default = 5; } } 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 9d2dd1e830ff36..8815cb496a719c 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 @@ -4721,7 +4721,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -4750,4 +4750,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/build_overrides b/examples/contact-sensor-app/nxp/k32w/k32w0/build_overrides deleted file mode 120000 index ad07557834803a..00000000000000 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../../../build_overrides/ \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/third_party/connectedhomeip b/examples/contact-sensor-app/nxp/k32w/k32w0/third_party/connectedhomeip deleted file mode 120000 index 305f2077ffe860..00000000000000 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../../.. \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/.gn b/examples/contact-sensor-app/nxp/k32w0/.gn similarity index 93% rename from examples/contact-sensor-app/nxp/k32w/k32w0/.gn rename to examples/contact-sensor-app/nxp/k32w0/.gn index 363727423ce903..1f7e4941f8d9fc 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/.gn +++ b/examples/contact-sensor-app/nxp/k32w0/.gn @@ -27,5 +27,5 @@ default_args = { import("//args.gni") # Import default platform configs - import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") + import("${chip_root}/src/platform/nxp/k32w0/args.gni") } diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn similarity index 90% rename from examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn rename to examples/contact-sensor-app/nxp/k32w0/BUILD.gn index b69897172a1e8d..c51b8787ea2922 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w0/BUILD.gn @@ -41,7 +41,7 @@ if (chip_pw_tokenizer_logging) { assert(current_os == "freertos") -k32w0_platform_dir = "${chip_root}/examples/platform/nxp/k32w/k32w0" +k32w0_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/k32w0" k32w0_sdk("sdk") { sources = [ @@ -88,6 +88,7 @@ k32w0_executable("contact_sensor_app") { defines = [] sources = [ + "${k32w0_platform_dir}/util/DefaultTestEventTriggerDelegate.cpp", "${k32w0_platform_dir}/util/LEDWidget.cpp", "${k32w0_platform_dir}/util/include/LEDWidget.h", "main/AppTask.cpp", @@ -119,17 +120,12 @@ k32w0_executable("contact_sensor_app") { "${k32w0_platform_dir}/app/support:freertos_mbedtls_utils", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } + defines += [ "CONNECTIVITY_MANAGER_THREAD_DEVICE_TYPE=ConnectivityManager::kThreadDeviceType_SleepyEndDevice" ] + + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] #lit and sit are using different zap files if (chip_enable_icd_lit) { @@ -187,6 +183,11 @@ group("k32w0") { ":binsign", ":contact_sensor_app", ] + + if (chip_enable_ota_requestor) { + deps += [ "${k32w0_platform_dir}/ssbl:ssbl" ] + } + if (chip_pw_tokenizer_logging) { deps += [ ":contact_sensor_app.database" ] } @@ -201,6 +202,10 @@ action("binsign") { if (chip_simple_hash_verification == 1) { args = [ "--simple-hash" ] } + + if (chip_enable_ota_requestor) { + args = [ "--ota-enabled" ] + } } group("default") { diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md b/examples/contact-sensor-app/nxp/k32w0/README.md similarity index 72% rename from examples/contact-sensor-app/nxp/k32w/k32w0/README.md rename to examples/contact-sensor-app/nxp/k32w0/README.md index ac418ecbd4aa77..305aa0b176af2a 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/README.md +++ b/examples/contact-sensor-app/nxp/k32w0/README.md @@ -30,6 +30,8 @@ network. - [Rotating device id](#rotating-device-id) - [Manufacturing data](#manufacturing-data) - [Flashing and debugging](#flashing-and-debugging) + - [Using DK6programmer](#using-dk6programmer) + - [Using MCUXpresso](#using-mcuxpresso) - [Pigweed tokenizer](#pigweed-tokenizer) - [Detokenizer script](#detokenizer-script) - [Notes](#notes) @@ -39,21 +41,14 @@ network. - [Tinycrypt ECC library](#tinycrypt-ecc-library) - [Building steps](#building-steps-1) - [OTA](#ota) - - [Writing the SSBL](#writing-the-ssbl) - - [Features](#features) - - [Multi image](#multi-image) - - [Simple hash verification](#simple-hash-verification) - - [Writing the PSECT](#writing-the-psect) - - [Writing the application](#writing-the-application) - [OTA Testing](#ota-testing) - - [Known issues ota](#known-issues-ota) + - [Known issues OTA](#known-issues-ota) - [Low power](#low-power) - [Known issues low power](#known-issues-low-power) - - [Removing SSBL Upgrade Region](#removing-ssbl-upgrade-region) ## Introduction -![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg) +![K32W061 DK6](../../../platform/nxp/k32w0/doc/images/k32w-dk6.jpg) The K32W061 contact sensor example application provides a working demonstration of a connected contact sensor device, built using the Project CHIP codebase and @@ -83,7 +78,7 @@ Deployment of this firmware configuration requires the K32W061 board setups using the K32W061 module board, SE051 Expansion board and Generic Expansion board as shown below: -![SE051H + K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg) +![SE051H + K32W061 DK6](../../../platform/nxp/k32w0/doc/images/k32w-se.jpg) The SE051H Secure Element extension may be used for best in class security and offloading some of the Project CHIP cryptographic operations. Depending on your @@ -186,10 +181,10 @@ contact status. In order to build the Project CHIP example, we recommend using a Linux distribution (supported Operating Systems are listed in -[BUILDING.md](../../../../../docs/guides/BUILDING.md#tested-operating systems)). +[BUILDING.md](../../../../docs/guides/BUILDING.md#tested-operating-systems)). - Make sure that below prerequisites are correctly installed (as described in - [BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites))) + [BUILDING.md](../../../../docs/guides/BUILDING.md#prerequisites)) ``` sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ @@ -219,18 +214,18 @@ user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh - Step 3: Init NXP SDK(s) ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/setup/nxp/update_nxp_sdk.py --platform k32w0 +user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform k32w0 ``` -Note: By default setup/nxp/update_nxp_sdk.py will try to initialize all NXP -SDKs. Arg "-- help" could be used to view all available options. +Note: By default update_nxp_sdk.py will try to initialize all NXP SDKs. Arg "-- +help" could be used to view all available options. - Start building the application: ```bash -user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w/k32w0 -user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ gn gen out/debug -user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w/k32w0$ ninja -C out/debug +user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w0 +user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w0$ gn gen out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w0$ ninja -C out/debug ``` To build with Secure Element, follow the same steps as above but set @@ -267,7 +262,7 @@ used to control an antenna switch. In order to use this feature, user must set In case signing errors are encountered when running the "sign_images.sh" script (run automatically) install the recommanded packages (python version > 3, pip3, -pycrypto, pycryptodome): +pycryptodome): ``` user@ubuntu:~$ python3 --version @@ -275,7 +270,6 @@ Python 3.8.2 user@ubuntu:~$ pip3 --version pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) user@ubuntu:~$ pip3 list | grep -i pycrypto -pycrypto 2.6.1 pycryptodome 3.9.8 ``` @@ -357,20 +351,20 @@ Please use the following build args: ## Manufacturing data See -[Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). There are factory data generated binaries available in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data folder. -These are based on the DAC, PAI and PAA certificates found in +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data` +folder. These are based on the DAC, PAI and PAA certificates found in scripts/tools/nxp/demo_generated_certs folder. The demo_factory_data_dut1.bin uses the DAC certificate and private key found in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/dac/dut1 +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data/dac/dut1` folder. The demo_factory_data_dut2.bin uses the DAC certificate and private key found in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/dac/dut2 +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data/dac/dut2` folder. These two factory data binaries can be used for testing topologies with 2 DUTS. They contain the corresponding DACs/PAIs generated using -generate_nxp_chip_factory_bin.py script. The discriminator is 14014 and the +`generate_nxp_chip_factory_bin.py` script. The discriminator is 14014 and the passcode is 1000. These demo certificates are working with the CDs installed in CHIPProjectConfig.h. @@ -379,18 +373,140 @@ Regarding factory data provider, there are two options: - use the default factory data provider: `FactoryDataProviderImpl` by setting `chip_with_factory_data=1` in the gn build command. - use a custom factory data provider: please see - [Guide for implementing a custom factory data provider](../../../../platform/nxp/k32w/k32w0/common/README.md). + [Guide for implementing a custom factory data provider](../../../platform/nxp/k32w0/doc/CustomFactoryDataProvider.md). This can be enabled when `chip_with_factory_data=1` by setting `use_custom_factory_provider=1` in the gn build command. ## Flashing and debugging -Program the firmware using the official +Instructions to program the firmware can be found also at [OpenThread Flash Instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#flash-binaries). -All you have to do is to replace the Openthread binaries from the above -documentation with _out/debug/chip-k32w0x-contact-example.bin_ if DK6Programmer -is used or with _out/debug/chip-k32w0x-contact-example_ if MCUXpresso is used. +### Using DK6programmer + +The application binary's path is _out/debug/chip-k32w0x-contact-example.bin_. + +DK6Programmer can be used for flashing the application. There are two available +versions of the DK6Programmer tool. + +The legacy version consists of a Windows executable found inside the +[SDK](https://mcuxpresso.nxp.com/en/welcome) at path +`tools/JN-SW-4407-DK6-Flash-Programmer`. This is a Windows application that can +be installed using the .exe file. Once the application is installed, the COM +port for K32W061 must be identified: + +``` +C:\nxp\DK6ProductionFlashProgrammer>DK6Programmer.exe --list +Available connections: + +``` + +Once the COM port is identified, the required binary can be flashed: + +``` +DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w0x-contact-example.bin" +``` + +> **_Note:_** The above example takes into account that the binary uses the +> `chip_enable_ota_requestor=true` option. The address offset corresponds to the +> space left for the SSBL binary and the OTA space for the SSBL. If +> `chip_enable_ota_requestor` is set to `false`, then `0x4000` needs to be +> replaced with `0x0`. + +DK6 Flash Programmer tool has also been integrated part of +[NXP Secure Provisioning SDK (SPSDK)](https://github.com/nxp-mcuxpresso/spsdk). +This tool is supported by environments like Windows, Linux or Mac. + +`SPSDK` can be installed and run from a Python environment using +[these instructions](https://spsdk.readthedocs.io/en/latest/usage/installation.html). +This enables the user to have transparent access to the dk6 programming tool +through `SPSDK`. + +``` +# after specific environment installation steps +$ spsdk --help +... + +-- dk6prog Tool for reading and programming flash memory of DK6 target devices. + � +-- erase Erase the memory. + � +-- info Prints the information about the connected device. + � +-- isp Issues ISP sequence as defined in Driver interface. + � +-- listdev Prints the information about the connected devices. + � +-- read Reads the memory and writes it to the file or stdout. + � +-- write Write the memory. +... +``` + +Dependencies for the `dk6prog` module can be installed using the following +command, more details +[here](https://spsdk.readthedocs.io/en/latest/usage/installation.html#dk6-tools): + +``` +$ pip install spsdk[dk6] +``` + +The `SPSDK` installation adds `dk6prog` as executable to system path, so user +can use directly `dk6prog` from terminal. The following commands are to be used +to write the chip-k32w0x-contact-example binary to the board. + +``` +$ dk6prog listdev +This is an experimental utility. Use with caution! + +List of available devices: +DEVICE ID: DN038ZH3, VID: 0x403, PID: 0x6015, Serial number: DN038ZH3, Description: DK6 Carrier Board, Address: 9, Backend: Backend.PYFTDI +$ dk6prog -d DN038ZH3 write 0x4000 ~/path/to/bin/chip-k32w0x-contact-example.bin + +This is an experimental utility. Use with caution! + +Writing memory [####################################] 100% +Written 596450 bytes to memory ID 0 at address 0x4000 +``` + +> **_Note:_** Running `dk6prog` from Windows OS command line requires an integer +> value for DEVICE ID. + +``` +C:\nxp\spsdk>dk6prog listdev + +This is an experimental utility. Use with caution! + +List of available devices: +DEVICE ID: 0, VID: 0x0, PID: 0x0, Serial number: b'DN038ZH3', Description: b'DK6 Carrier Board', Address: 67330069, Backend: Backend.FTD2xx + +C:\nxp\spsdk>dk6prog -d 0 info + +This is an experimental utility. Use with caution! + +Chip ID: 0x88888888 +ROM Version: 0x140000cc +MAC Address: A8:2B:1F:03:00:8D:15:00 + +Detected DEVICE: UNKNOWN + + Memory Memory ID Base Address Length Sector Size Memory Type Access +---------------------------------------------------------------------------------------------- + FLASH 0 0x0 0x9de00 0x200 FLASH All is available + PSECT 1 0x0 0x1e0 0x10 FLASH All is available + pFLASH 2 0x0 0x1e0 0x10 FLASH All is available + Config 3 0x9fc00 0x200 0x200 FLASH All is available + EFUSE 4 0x0 0x80 0x2 EFUSE (OTP) Write Enabled + ROM 5 0x3000000 0x20000 0x1 ROM Write Enabled + RAM0 6 0x4000000 0x16000 0x1 RAM Write Enabled + RAM1 7 0x4020000 0x10000 0x1 RAM Write Enabled +``` + +> **_Note:_** The above example takes into account that the binary uses the +> `chip_enable_ota_requestor=true` option. The address offset corresponds to the +> space left for the SSBL binary and the OTA space for the SSBL. If +> `chip_enable_ota_requestor` is set to `false`, then `0x4000` needs to be +> replaced with `0x0`. + +### Using MCUXpresso + +If flashing and debugging is required, MCUXpresso can be used as instructed in +[MCUXpresso flashing and debugging instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#using-mcuxpresso-ide). +The file needed to be used in MCUXpresso is +_out/debug/chip-k32w0x-contact-example_. ## Pigweed tokenizer @@ -403,7 +519,7 @@ needed for parsing the hashed scripts. The python3 script detokenizer.py is a script that decodes the tokenized logs either from a file or from a serial port. It is located in the following path -`examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py`. +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/detokenizer.py`. The script can be used in the following ways: @@ -438,7 +554,7 @@ by the script is loaded by the environment. An example of running the detokenizer script to see logs of a contact-sensor app: ``` -python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-contact-example-database.bin -o device.txt +python3 ../../../../third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-contact-example-database.bin -o device.txt ``` ### Known issues tokenizer @@ -483,179 +599,49 @@ In order to use the Tinycrypt ECC library, use the following build arguments: ## OTA -The internal flash needs to be prepared for the OTA process. First 16K of the -internal flash needs to be populated with a Secondary Stage Bootloader (SSBL) -related data while the last 8.5K of flash space is holding image directory -related data (PSECT). The space between these two zones will be filled by the +Over the air updates (OTA) require several software components running on the +K32W0x1. Firstly, a Secondary Stage Bootloader (SSBL) is required written in the +first part of the internal flash memory, usually starting at address 0x0. This +enables the board to boot and check if a new OTA binary has been received. If +this is true, the bootloader writes the OTA binary to the appropriate storage, +internal and/or external flash, after which it reboots the board. If no new OTA +binaries have been found, then the bootloader gives execution control to the application. -### Writing the SSBL - -The SDK already provides an SSBL binary compiled with external flash support: -`boards/k32w061dk6/wireless_examples/framework/ssbl/binary/ssbl_ext_flash_pdm_support.bin`, -but it does not offer multi-image OTA support. - -Alternatively, the SSBL can ge generated from one of the SDK demo examples. The -SSBL demo application can be imported from the `Quickstart panel`: -`Import SDK example(s) -> select wireless -> framework -> ssbl` application. - -![SSBL Application Select](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_select.JPG) - -### Features - -#### Multi image - -To support multi-image OTA feature, the SSBL project must be compiled using the -following defines: - -- `PDM_EXT_FLASH=1` - support PDM in external flash. -- `gOTAUseCustomOtaEntry=1` - support custom OTA entry for multi-image. -- `gOTACustomOtaEntryMemory=OTACustomStorage_ExtFlash` - K32W0 uses - `OTACustomStorage_ExtFlash` (1) by default. -- `SPIFI_DUAL_MODE_SUPPORT=1` - only for configurations that use dual `SPIFI` - flash (e.g. K32W041AM variant). - -Optionally, add the following defines: - -- `SPIFI_OPTIM_SIZE=1` - to optimize SSBL size. -- `EXTERNAL_FLASH_DATA_OTA=1` - to support external read only data. - -![SSBL_MULTI_IMAGE](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_multi_image.JPG) - -#### Simple hash verification - -When secure boot is not used, a simple hash can be appended at the end of the -image for integrity check. Applications should be built with -`chip_simple_hash_verification=1`. - -To support simple hash verification feature, the SSBL project must be compiled -with: - -- `gSimpleHashVerification=1` - -and update the post-build command to use simple hash verification instead of the -default options. Go to -`Project -> Properties -> C/C++ Build -> Settings -> Build steps` and press -`Edit` under `Post-build steps` subsection. The command should look similar to: - -![SSBL_SIMPLE_HASH_VERIFICATION](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_simple_hash.JPG) - -Once compiled, the required SSBL file is called `k32w061dk6_ssbl.bin`. - -![SSBL_BIN](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_bin.JPG) - -Before writing the SSBL, it it recommanded to fully erase the internal flash: - -``` -DK6Programmer.exe -V 5 -P 1000000 -s -e Flash -``` - -`k32w061dk6_ssbl.bin` must be written at address 0 in the internal flash: - -``` -DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x00="k32w061dk6_ssbl.bin" -``` - -### Writing the PSECT - -This is the list of all supported partitions: - -``` -0000000010000000 : SSBL partition - - 00000000 -----------> Start Address - 1000 ---------------> 0x0010 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - 00 -----------------> 0x00 Image type (0x00 = SSBL) - -00400000c9040101: Application partition - - 00400000 -----------> 0x00004000 Start Address - c904 ---------------> 0x04c9 Number of 512-bytes pages - 01 -----------------> 0x01 Bootable flag - 01 -----------------> 0x01 Image type (0x01 = Application) - -00000010800000fe: Ext Flash text partition - - 00000010 -----------> 0x10000000 Start Address (external flash) - 8000 ---------------> 0x0080 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fe -----------------> 0xFE Image type (0xFE = Ext Flash text) - -00000110300200fc : OTA Image partition - - 00000110 -----------> 0x10010000 Start Address - 3002----------------> 0x0230 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fc -----------------> 0xFC Image type (0xFC = OTA partition) - -00000510100000fd: NVM partition - - 00000510 -----------> 0x10050000 Start Address - 1000 ---------------> 0x0010 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fd -----------------> 0xFD Image type (0xFD = NVM partition) -``` - -First, image directory 0 (SSBL partition) must be written: - -``` -DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_0=0000000010000000 -``` - -Here is the interpretation of the fields: - -``` -00000000 -> start address 0x00000000 -1000 -> size = 0x0010 pages of 512-bytes (= 8kB) -00 -> not bootable (only used by the SSBL to support SSBL update) -00 -> SSBL Image Type -``` - -Second, image directory 1 (application partition) must be written: - -``` -DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_1=00400000C9040101 -``` - -Here is the interpretation of the fields: - -``` -00400000 -> start address 0x00004000 -C904 -> 0x4C9 pages of 512-bytes (= 612.5kB) -01 -> bootable flag -01 -> image type for the application -``` - -Please note the user can write additional partitions by writing -`image_dir_2/3/4` with the wanted configuration. - -### Writing the application +The internal flash needs to be prepared for the OTA process. First 16K of the +internal flash needs to be populated with SSBL related data while the last 8.5K +of flash space is holding flash configuration related data. The space between +these two zones will be filled by the application. More details regarding the +internal flash space can be found in the +[linker file](../../../../third_party/nxp/nxp_matter_support/examples/platform/k32w0/app/ldscripts/chip-k32w0x-linker.ld). -DK6Programmer can be used for flashing the application: +The steps for building the SSBL binary with appropriate configuration and +writing to the board the binary and other OTA related configurations are +described in the +[K32W0x1 OTA guide](../../../../docs/guides/nxp/nxp_k32w0_ota_guide.md). -``` -DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w0x-contact-example.bin" -``` +Note that the application needs to be built using the +`chip_enable_ota_requestor=true` option. This is enabled in the configuration by +default if no `chip_enable_ota_requestor` explicit setting is done. -If debugging is needed, MCUXpresso can be used then for flashing the -application. Please make sure that the application is written at address 0x4000: - -![FLASH_LOCATION](../../../../platform/nxp/k32w/k32w0/doc/images/flash_location.JPG) +Please also note that, by default, the device expects the OTA image to be +encrypted with the same key specified by `chip_with_ota_key`. See `args.gni` for +the default gn configuration. ### OTA Testing The OTA topology used for OTA testing is illustrated in the figure below. Topology is similar with the one used for Matter Test Events. -![OTA_TOPOLOGY](../../../../platform/nxp/k32w/k32w0/doc/images/ota_topology.JPG) +![OTA_TOPOLOGY](../../../platform/nxp/k32w0/doc/images/ota_topology.JPG) The concept for OTA is the next one: - there is an OTA Provider Application that holds the OTA image. In our case, this is a Linux application running on an Ubuntu based-system; -- the OTA Requestor functionality is embedded inside the Lighting Application. - It will be used for requesting OTA blocks from the OTA Provider; +- the OTA Requestor functionality is embedded inside the Contact Sensor + Application. It will be used for requesting OTA blocks from the OTA + Provider; - the controller (a linux application called chip-tool) will be used for commissioning both the device and the OTA Provider App. The device will be commissioned using the standard Matter flow (BLE + IEEE 802.15.4) while the @@ -663,19 +649,19 @@ The concept for OTA is the next one: of chip-tool; - during commissioning, each device is assigned a node id by the chip-tool (can be specified manually by the user). Using the node id of the device and - of the lighting application, chip-tool triggers the OTA transfer by invoking - the _announce-ota-provider_ command - basically, the OTA Requestor is - informed of the node id of the OTA Provider Application. + of the contact sensor application, chip-tool triggers the OTA transfer by + invoking the _announce-ota-provider_ command - basically, the OTA Requestor + is informed of the node id of the OTA Provider Application. _Computer #1_ can be any system running an Ubuntu distribution. We recommand -using TE 7.5 instructions from -[here](https://groups.csa-iot.org/wg/matter-csg/document/24839), where RPi 4 are -proposed. Also, TE 7.5 instructions document point to the OS/Docker images that -should be used on the RPis. For compatibility reasons, we recommand compiling -chip-tool and OTA Provider applications with the same commit id that was used -for compiling the Lighting Application. Also, please note that there is a single -controller (chip-tool) running on Computer #1 which is used for commissioning -both the device and the OTA Provider Application. If needed, +using CSA official instructions from +[here](https://groups.csa-iot.org/wg/matter-csg/document/28566), where RPi 4 are +proposed. Also, CSA official instructions document point to the OS/Docker images +that should be used on the RPis. For compatibility reasons, we recommand +compiling chip-tool and OTA Provider applications with the same commit id that +was used for compiling the Contact Sensor Application. Also, please note that +there is a single controller (chip-tool) running on Computer #1 which is used +for commissioning both the device and the OTA Provider Application. If needed, [these instructions](https://itsfoss.com/connect-wifi-terminal-ubuntu/) could be used for connecting the RPis to WiFi. @@ -696,7 +682,7 @@ Build OTA image: In order to build an OTA image, use NXP wrapper over the standard tool `src/app/ota_image_tool.py`: -- `scripts/tools/nxp/ota/ota_image_tool.py`. +- `scripts/tools/nxp/ota/ota_image_tool.py` The tool can be used to generate an OTA image with the following format: @@ -725,7 +711,7 @@ The address for storing the custom OTA entry can also be specified: address that does not overlap with anything else. Please see more in the -[OTA image tool guide](../../../../../scripts/tools/nxp/ota/README.md). +[OTA image tool guide](../../../../scripts/tools/nxp/ota/README.md). Here is an example that generates an OTA image with application update TLV: @@ -735,16 +721,16 @@ Here is an example that generates an OTA image with application update TLV: Please note the two options `--enc_enable` and `--input_ota_key`, which are mandatory when `chip_with_ota_encryption=1`. The value of `--input_ota_key` must -match the value of `chip_with_ota_key`. See `args.gni` for the default gn -configuration. +match the value of `chip_with_ota_key`. A note regarding OTA image header version (`-vn` option). An application binary has its own software version, given by -`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` (`42020` by default), which can be +`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` (`1` by default), which can be overwritten. For having a correct OTA process, the OTA header version should be -the same as the binary embedded software version. A user can set a custom -software version in the gn build args by setting `chip_software_version` to the -wanted version. +the same as the binary embedded software version. When building the update +image, the build arguments `nxp_software_version=2` and +`nxp_sofware_version_string=\"2.0\"` can be added to the gn gen command in order +to specify the upgraded version. Start the OTA Provider Application: @@ -774,7 +760,7 @@ Start the OTA process: user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-otaprovider 1 0 0 0 2 0 ``` -### Known issues ota +### Known issues OTA - SRP cache on the openthread border router needs to flushed each time a new commissioning process is attempted. For this, factory reset the device, then @@ -827,13 +813,13 @@ Power Measurement Tool can be used inside MCUXpresso for checking the power consumption pattern: Window -> Show View -> Other -> Power Measurement Tool. The configuration for this tool is the next one: -![POWER_CONF](../../../../platform/nxp/k32w/k32w0/doc/images/power_conf.JPG) +![POWER_CONF](../../../platform/nxp/k32w0/doc/images/power_conf.JPG) Also, please make sure that the J14 jumper is set to the _ENABLED_ position and no expansion board is attached to the DK6. A view from this tool is illustrated below: -![POWER_VIEW](../../../../platform/nxp/k32w/k32w0/doc/images/power_view.JPG) +![POWER_VIEW](../../../platform/nxp/k32w0/doc/images/power_view.JPG) Please note that that the Power Measurement Tool is not very accurate and professional tools must be used if exact power consumption needs to be known. @@ -842,34 +828,3 @@ professional tools must be used if exact power consumption needs to be known. - Power Measurement Tool may not work correctly in MCUXpresso versions greater that 11.0.1. - -## Removing SSBL Upgrade Region - -The example also offers the possibility to remove SSBL upgrade region, for -reserving more space for application level. - -A new flag `chip_reduce_ssbl_size` is introduced. In order to remove the SSBL -upgrade region, `chip_reduce_ssbl_size=true` must be provided to the build -system - -The programming method will change: - -- writing image directory 1 should change to - - ``` - DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_1=00200000D9040101 - ``` - - Here is the interpretation of the fields: - - ``` - 00200000 -> start address 0x00002000 - D904 -> 0x4D9 pages of 512-bytes (= 620.5kB) - 01 -> bootable flag - 01 -> image type for the application - ``` - -- Matter application offset address should change to - ``` - DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x2000="chip-k32w0x-contact-example.bin" - ``` diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/args.gni b/examples/contact-sensor-app/nxp/k32w0/args.gni similarity index 97% rename from examples/contact-sensor-app/nxp/k32w/k32w0/args.gni rename to examples/contact-sensor-app/nxp/k32w0/args.gni index e328a6ede9011f..1709f1da735d5d 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/args.gni +++ b/examples/contact-sensor-app/nxp/k32w0/args.gni @@ -24,6 +24,7 @@ chip_with_ota_key = "1234567890ABCDEFA1B2C3D4E5F6F1B4" chip_stack_lock_tracking = "fatal" chip_enable_ble = true +chip_generate_link_map_file = true chip_enable_icd_server = true chip_enable_icd_lit = false diff --git a/examples/contact-sensor-app/nxp/k32w0/build_overrides b/examples/contact-sensor-app/nxp/k32w0/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/contact-sensor-app/nxp/k32w0/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/k32w0/include/CHIPProjectConfig.h similarity index 98% rename from examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h rename to examples/contact-sensor-app/nxp/k32w0/include/CHIPProjectConfig.h index 301d53824a7e55..2b0afde85d56fe 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/contact-sensor-app/nxp/k32w0/include/CHIPProjectConfig.h @@ -145,11 +145,11 @@ * {MAJOR_VERSION}.0d{MINOR_VERSION} */ #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "03-2022-te8" +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING #endif #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 42020 +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION #endif #ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h b/examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h rename to examples/contact-sensor-app/nxp/k32w0/include/FreeRTOSConfig.h diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp similarity index 96% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp rename to examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp index d7d9763e491a62..d350a4527d281c 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp @@ -42,11 +42,12 @@ #include #include #include -#include +#include #endif -#include +#include +#include "DefaultTestEventTriggerDelegate.h" #include "Keyboard.h" #include "LED.h" #include "LEDWidget.h" @@ -94,6 +95,11 @@ static chip::DeviceLayer::CustomFactoryDataProvider sCustomFactoryDataProvider; #endif #endif +// This key is for testing/certification only and should not be used in production devices. +// For production devices this key must be provided from factory data. +uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; + static Identify gIdentify = { chip::EndpointId{ 1 }, AppTask::OnIdentifyStart, AppTask::OnIdentifyStop, Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator }; @@ -107,7 +113,7 @@ static BDXDownloader gDownloader; constexpr uint16_t requestedOtaBlockSize = 1024; #endif -#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR CHIP_ERROR CustomFactoryDataRestoreMechanism(void) { K32W_LOG("This is a custom factory data restore mechanism."); @@ -154,7 +160,7 @@ static void CheckOtaEntry() if (ota_entries.ota_state == otaApplied) { K32W_LOG("OTA successfully applied"); -#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR // If this point is reached, it means OTA_CommitCustomEntries was successfully called. // Delete the factory data backup to stop doing a restore when the factory data provider // is initialized. This ensures that both the factory data and app were updated, otherwise @@ -184,7 +190,7 @@ CHIP_ERROR AppTask::Init() if (ContactSensorMgr().Init() != 0) { K32W_LOG("ContactSensorMgr().Init() failed"); - assert(status == 0); + assert(0); } PlatformMgr().AddEventHandler(MatterEventHandler, 0); @@ -196,9 +202,8 @@ CHIP_ERROR AppTask::Init() CheckOtaEntry(); #endif - // Initialize device attestation config #if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR sFactoryDataProvider.RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); #endif ReturnErrorOnFailure(sFactoryDataProvider.Init()); @@ -299,6 +304,8 @@ void AppTask::InitServer(intptr_t arg) chip::DeviceLayer::SetDeviceInfoProvider(&infoProvider); // Init ZCL Data Model and start server + static DefaultTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; + initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; nativeParams.lockCb = LockOpenThreadTask; nativeParams.unlockCb = UnlockOpenThreadTask; diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ContactSensorManager.cpp b/examples/contact-sensor-app/nxp/k32w0/main/ContactSensorManager.cpp similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/ContactSensorManager.cpp rename to examples/contact-sensor-app/nxp/k32w0/main/ContactSensorManager.cpp diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/contact-sensor-app/nxp/k32w0/main/ZclCallbacks.cpp similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp rename to examples/contact-sensor-app/nxp/k32w0/main/ZclCallbacks.cpp diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h b/examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppEvent.h rename to examples/contact-sensor-app/nxp/k32w0/main/include/AppEvent.h diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h b/examples/contact-sensor-app/nxp/k32w0/main/include/AppTask.h similarity index 95% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h rename to examples/contact-sensor-app/nxp/k32w0/main/include/AppTask.h index c3203d78eb543e..3f81915dca23f9 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/AppTask.h +++ b/examples/contact-sensor-app/nxp/k32w0/main/include/AppTask.h @@ -27,7 +27,7 @@ #include "CHIPProjectConfig.h" #if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA -#include +#include #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER #include "CustomFactoryDataProvider.h" #endif @@ -50,6 +50,9 @@ class AppTask { public: +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl; +#endif CHIP_ERROR StartAppTask(); static void AppTaskMain(void * pvParameter); diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/ContactSensorManager.h b/examples/contact-sensor-app/nxp/k32w0/main/include/ContactSensorManager.h similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/include/ContactSensorManager.h rename to examples/contact-sensor-app/nxp/k32w0/main/include/ContactSensorManager.h diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/include/app_config.h b/examples/contact-sensor-app/nxp/k32w0/main/include/app_config.h similarity index 100% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/include/app_config.h rename to examples/contact-sensor-app/nxp/k32w0/main/include/app_config.h diff --git a/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp b/examples/contact-sensor-app/nxp/k32w0/main/main.cpp similarity index 98% rename from examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp rename to examples/contact-sensor-app/nxp/k32w0/main/main.cpp index 56288842a3f5de..9517d7e2cf4309 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/main.cpp @@ -154,7 +154,7 @@ extern "C" void main_task(void const * argument) */ sched_enable(); - err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice); + err = ConnectivityMgr().SetThreadDeviceType(CONNECTIVITY_MANAGER_THREAD_DEVICE_TYPE); if (err != CHIP_NO_ERROR) { goto exit; diff --git a/examples/contact-sensor-app/nxp/k32w0/third_party/connectedhomeip b/examples/contact-sensor-app/nxp/k32w0/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/contact-sensor-app/nxp/k32w0/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index b48d6984bafd07..4a3e015ddedb5c 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index 6c033b5dfbac0d..d8d2734e60a98b 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 7c27d4cfb63185..661a2e74de4f4e 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index af5c74ef27da4a..e7fba7e08e028f 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/energy-management-app/linux/README.md b/examples/energy-management-app/linux/README.md index ab35600709de47..c9d1dee04af7ca 100644 --- a/examples/energy-management-app/linux/README.md +++ b/examples/energy-management-app/linux/README.md @@ -1,4 +1,4 @@ -# CHIP Linux Energy Management Example +# Matter Linux Energy Management Example An example showing the use of CHIP on the Linux. The document will describe how to build and run CHIP Linux Energy Management Example on Raspberry Pi. This doc @@ -12,7 +12,7 @@ details.
    -- [CHIP Linux Energy Management Example](#chip-linux-energy-management-example) +- [Matter Linux Energy Management Example](#matter-linux-energy-management-example) - [Building](#building) - [Commandline arguments](#commandline-arguments) - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) diff --git a/examples/fabric-admin/commands/common/RemoteDataModelLogger.cpp b/examples/fabric-admin/commands/common/RemoteDataModelLogger.cpp index 6334d42506d53f..0e51a1503ea3e1 100644 --- a/examples/fabric-admin/commands/common/RemoteDataModelLogger.cpp +++ b/examples/fabric-admin/commands/common/RemoteDataModelLogger.cpp @@ -160,8 +160,7 @@ CHIP_ERROR LogErrorAsJSON(const CHIP_ERROR & error) VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR); Json::Value value; - chip::app::StatusIB status; - status.InitFromChipError(error); + chip::app::StatusIB status(error); return LogError(value, status); } diff --git a/examples/fabric-admin/rpc/RpcClient.cpp b/examples/fabric-admin/rpc/RpcClient.cpp index 00ca1204cc1f19..816ea04691d71b 100644 --- a/examples/fabric-admin/rpc/RpcClient.cpp +++ b/examples/fabric-admin/rpc/RpcClient.cpp @@ -117,8 +117,36 @@ CHIP_ERROR AddSynchronizedDevice(chip::NodeId nodeId) { ChipLogProgress(NotSpecified, "AddSynchronizedDevice"); - chip_rpc_SynchronizedDevice device; - device.node_id = nodeId; + chip_rpc_SynchronizedDevice device = chip_rpc_SynchronizedDevice_init_default; + device.node_id = nodeId; + + // TODO: fill this with real data. For now we just add things for testing + strcpy(device.vendor_name, "Test Vendor"); + device.has_vendor_name = true; + + device.vendor_id = 123; + device.has_vendor_id = true; + + strcpy(device.product_name, "Test Product"); + device.has_product_name = true; + + device.product_id = 234; + device.has_product_id = true; + + strcpy(device.node_label, "Device Label"); + device.has_node_label = true; + + device.hardware_version = 11; + device.has_hardware_version = true; + + strcpy(device.hardware_version_string, "Hardware"); + device.has_hardware_version_string = true; + + device.software_version = 22; + device.has_software_version = true; + + strcpy(device.software_version_string, "Test 1.4.22"); + device.has_software_version_string = true; // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. @@ -137,8 +165,8 @@ CHIP_ERROR RemoveSynchronizedDevice(chip::NodeId nodeId) { ChipLogProgress(NotSpecified, "RemoveSynchronizedDevice"); - chip_rpc_SynchronizedDevice device; - device.node_id = nodeId; + chip_rpc_SynchronizedDevice device = chip_rpc_SynchronizedDevice_init_default; + device.node_id = nodeId; // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. diff --git a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn index 3bc4c23b9e0f92..7f2fbcbbfe0556 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn +++ b/examples/fabric-bridge-app/fabric-bridge-common/BUILD.gn @@ -19,21 +19,35 @@ config("config") { include_dirs = [ "include" ] } -chip_data_model("fabric-bridge-common") { +chip_data_model("fabric-bridge-common-zap") { zap_file = "fabric-bridge-app.zap" is_server = true cflags = [ "-DDYNAMIC_ENDPOINT_COUNT=16" ] } +# This includes all the clusters that only exist on the dynamic endpoint. +source_set("fabric-bridge-common") { + public_configs = [ ":config" ] + + sources = [ + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp", + "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h", + ] + + public_deps = [ ":fabric-bridge-common-zap" ] +} + source_set("fabric-bridge-lib") { public_configs = [ ":config" ] sources = [ + "include/BridgedDevice.h", + "include/BridgedDeviceBasicInformationImpl.h", + "include/BridgedDeviceManager.h", "include/CHIPProjectAppConfig.h", - "include/Device.h", - "include/DeviceManager.h", - "src/Device.cpp", - "src/DeviceManager.cpp", + "src/BridgedDevice.cpp", + "src/BridgedDeviceBasicInformationImpl.cpp", + "src/BridgedDeviceManager.cpp", "src/ZCLCallbacks.cpp", ] diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 19cd327c7394ea..3fb7436adbfe5a 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/Device.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h similarity index 56% rename from examples/fabric-bridge-app/fabric-bridge-common/include/Device.h rename to examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h index c709af8cf0695b..5c09cfa04d2521 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/Device.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDevice.h @@ -20,41 +20,50 @@ #include -#include -#include - -#include #include -#include -class Device +class BridgedDevice { public: - static const int kDeviceNameSize = 32; + /// Defines all attributes that we keep track of for a bridged device + struct BridgedAttributes + { + std::string uniqueId; + std::string vendorName; + uint16_t vendorId = 0; + std::string productName; + uint16_t productId = 0; + std::string nodeLabel; + uint16_t hardwareVersion = 0; + std::string hardwareVersionString; + uint32_t softwareVersion = 0; + std::string softwareVersionString; + }; - Device(chip::NodeId nodeId); - virtual ~Device() {} + BridgedDevice(chip::NodeId nodeId); + virtual ~BridgedDevice() = default; bool IsReachable(); void SetReachable(bool reachable); - void SetName(const char * name); - void SetLocation(std::string location) { mLocation = location; }; + inline void SetEndpointId(chip::EndpointId id) { mEndpointId = id; }; inline chip::EndpointId GetEndpointId() { return mEndpointId; }; inline chip::NodeId GetNodeId() { return mNodeId; }; inline void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; }; inline chip::EndpointId GetParentEndpointId() { return mParentEndpointId; }; - inline char * GetName() { return mName; }; - inline std::string GetLocation() { return mLocation; }; - inline std::string GetZone() { return mZone; }; - inline void SetZone(std::string zone) { mZone = zone; }; + + [[nodiscard]] const BridgedAttributes & GetBridgedAttributes() const { return mAttributes; } + void SetBridgedAttributes(const BridgedAttributes & value) { mAttributes = value; } + + /// Convenience method to set just the unique id of a bridged device as it + /// is one of the few attributes that is not always bulk-set + void SetUniqueId(const std::string & value) { mAttributes.uniqueId = value; } protected: bool mReachable; - char mName[kDeviceNameSize]; - std::string mLocation; chip::NodeId mNodeId; chip::EndpointId mEndpointId; chip::EndpointId mParentEndpointId; - std::string mZone; + + BridgedAttributes mAttributes; }; diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceBasicInformationImpl.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceBasicInformationImpl.h new file mode 100644 index 00000000000000..23403438ab2be8 --- /dev/null +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceBasicInformationImpl.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include + +class BridgedDeviceBasicInformationImpl : public chip::app::AttributeAccessInterface +{ +public: + BridgedDeviceBasicInformationImpl() : + chip::app::AttributeAccessInterface(chip::NullOptional /* endpointId */, + chip::app::Clusters::BridgedDeviceBasicInformation::Id) + {} + + // AttributeAccessInterface implementation + CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & path, chip::app::AttributeValueEncoder & encoder) override; + CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & path, chip::app::AttributeValueDecoder & decoder) override; +}; diff --git a/examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h similarity index 64% rename from examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h rename to examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h index b1dd791033511f..ac28d31edf507c 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/include/DeviceManager.h +++ b/examples/fabric-bridge-app/fabric-bridge-common/include/BridgedDeviceManager.h @@ -20,17 +20,19 @@ #include -#include "Device.h" +#include "BridgedDevice.h" -class DeviceManager +#include + +class BridgedDeviceManager { public: - DeviceManager() = default; + BridgedDeviceManager() = default; /** - * @brief Initializes the DeviceManager. + * @brief Initializes the BridgedDeviceManager. * - * This function sets up the initial state of the DeviceManager, clearing + * This function sets up the initial state of the BridgedDeviceManager, clearing * any existing devices and setting the starting dynamic endpoint ID. */ void Init(); @@ -41,13 +43,19 @@ class DeviceManager * This function attempts to add a device to a dynamic endpoint. It tries to find an available * endpoint slot and retries the addition process up to a specified maximum number of times if * the endpoint already exists. If the addition is successful, it returns the index of the - * dynamic endpoint; otherwise, it returns -1. + * dynamic endpoint; + * + * Ensures that the device has a unique id: + * - device MUST set its unique id if any BEFORE calling this method + * - if no unique id (i.e. empty string), a new unique id will be generated + * - Add will fail if the unique id is not unique * * @param dev A pointer to the device to be added. * @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID. - * @return int The index of the dynamic endpoint if successful, -1 otherwise. + * @return int The index of the dynamic endpoint if successful, nullopt otherwise */ - int AddDeviceEndpoint(Device * dev, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); + std::optional AddDeviceEndpoint(std::unique_ptr dev, + chip::EndpointId parentEndpointId = chip::kInvalidEndpointId); /** * @brief Removes a device from a dynamic endpoint. @@ -60,7 +68,7 @@ class DeviceManager * @param dev A pointer to the device to be removed. * @return int The index of the removed dynamic endpoint if successful, -1 otherwise. */ - int RemoveDeviceEndpoint(Device * dev); + int RemoveDeviceEndpoint(BridgedDevice * dev); /** * @brief Gets a device from its endpoint ID. @@ -69,9 +77,9 @@ class DeviceManager * specified endpoint ID. If no device matches the endpoint ID, it returns nullptr. * * @param endpointId The endpoint ID of the device to be retrieved. - * @return Device* A pointer to the device if found, nullptr otherwise. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. */ - Device * GetDevice(chip::EndpointId endpointId) const; + BridgedDevice * GetDevice(chip::EndpointId endpointId) const; /** * @brief Gets a device from its NodeId. @@ -80,9 +88,9 @@ class DeviceManager * specified NodeId. If no device matches the NodeId, it returns nullptr. * * @param nodeId The NodeId of the device to be retrieved. - * @return Device* A pointer to the device if found, nullptr otherwise. + * @return BridgedDevice* A pointer to the device if found, nullptr otherwise. */ - Device * GetDeviceByNodeId(chip::NodeId nodeId) const; + BridgedDevice * GetDeviceByNodeId(chip::NodeId nodeId) const; /** * @brief Removes a device from a dynamic endpoint by its NodeId. @@ -95,25 +103,35 @@ class DeviceManager * @param nodeId The NodeId of the device to be removed. * @return int The index of the removed dynamic endpoint if successful, -1 otherwise. */ - int RemoveDeviceByNodeId(chip::NodeId nodeId); + std::optional RemoveDeviceByNodeId(chip::NodeId nodeId); + + /** + * Finds the device with the given unique id (if any) + */ + BridgedDevice * GetDeviceByUniqueId(const std::string & id); private: - friend DeviceManager & DeviceMgr(); + friend BridgedDeviceManager & BridgeDeviceMgr(); + + /** + * Creates a new unique ID that is not used by any other mDevice + */ + std::string GenerateUniqueId(); - static DeviceManager sInstance; + static BridgedDeviceManager sInstance; chip::EndpointId mCurrentEndpointId; chip::EndpointId mFirstDynamicEndpointId; - Device * mDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1]; + std::unique_ptr mDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1]; }; /** - * Returns the public interface of the DeviceManager singleton object. + * Returns the public interface of the BridgedDeviceManager singleton object. * - * Applications should use this to access features of the DeviceManager + * Applications should use this to access features of the BridgedDeviceManager * object. */ -inline DeviceManager & DeviceMgr() +inline BridgedDeviceManager & BridgeDeviceMgr() { - return DeviceManager::sInstance; + return BridgedDeviceManager::sInstance; } diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp similarity index 69% rename from examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp rename to examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp index e72fd856513b5a..425bb4da32e896 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/Device.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "Device.h" +#include "BridgedDevice.h" #include #include @@ -25,35 +25,28 @@ using namespace chip::app::Clusters::Actions; -Device::Device(chip::NodeId nodeId) +BridgedDevice::BridgedDevice(chip::NodeId nodeId) { mReachable = false; mNodeId = nodeId; mEndpointId = chip::kInvalidEndpointId; } -bool Device::IsReachable() +bool BridgedDevice::IsReachable() { return mReachable; } -void Device::SetReachable(bool reachable) +void BridgedDevice::SetReachable(bool reachable) { mReachable = reachable; if (reachable) { - ChipLogProgress(NotSpecified, "Device[%s]: ONLINE", mName); + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: ONLINE", mAttributes.uniqueId.c_str()); } else { - ChipLogProgress(NotSpecified, "Device[%s]: OFFLINE", mName); + ChipLogProgress(NotSpecified, "BridgedDevice[%s]: OFFLINE", mAttributes.uniqueId.c_str()); } } - -void Device::SetName(const char * name) -{ - ChipLogProgress(NotSpecified, "Device[%s]: New Name=\"%s\"", mName, name); - - chip::Platform::CopyString(mName, name); -} diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceBasicInformationImpl.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceBasicInformationImpl.cpp new file mode 100644 index 00000000000000..c088935df30c59 --- /dev/null +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceBasicInformationImpl.cpp @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include "BridgedDeviceBasicInformationImpl.h" + +#include "BridgedDeviceManager.h" + +#include +#include +#include + +#include + +static constexpr unsigned kBridgedDeviceBasicInformationClusterRevision = 4; +static constexpr unsigned kBridgedDeviceBasicInformationFeatureMap = 0; + +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::app::Clusters; + +CHIP_ERROR BridgedDeviceBasicInformationImpl::Read(const ConcreteReadAttributePath & path, AttributeValueEncoder & encoder) +{ + // Registration is done for the bridged device basic information only + VerifyOrDie(path.mClusterId == app::Clusters::BridgedDeviceBasicInformation::Id); + + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(path.mEndpointId); + VerifyOrReturnError(dev != nullptr, CHIP_ERROR_NOT_FOUND); + + switch (path.mAttributeId) + { + case BasicInformation::Attributes::Reachable::Id: + encoder.Encode(dev->IsReachable()); + break; + case BasicInformation::Attributes::NodeLabel::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().nodeLabel.c_str())); + break; + case BasicInformation::Attributes::ClusterRevision::Id: + encoder.Encode(kBridgedDeviceBasicInformationClusterRevision); + break; + case BasicInformation::Attributes::FeatureMap::Id: + encoder.Encode(kBridgedDeviceBasicInformationFeatureMap); + break; + case BasicInformation::Attributes::UniqueID::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().uniqueId.c_str())); + break; + case BasicInformation::Attributes::VendorName::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().vendorName.c_str())); + break; + case BasicInformation::Attributes::VendorID::Id: + encoder.Encode(dev->GetBridgedAttributes().vendorId); + break; + case BasicInformation::Attributes::ProductName::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().productName.c_str())); + break; + case BasicInformation::Attributes::ProductID::Id: + encoder.Encode(dev->GetBridgedAttributes().productId); + break; + case BasicInformation::Attributes::HardwareVersion::Id: + encoder.Encode(dev->GetBridgedAttributes().hardwareVersion); + break; + case BasicInformation::Attributes::HardwareVersionString::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().hardwareVersionString.c_str())); + break; + case BasicInformation::Attributes::SoftwareVersion::Id: + encoder.Encode(dev->GetBridgedAttributes().softwareVersion); + break; + case BasicInformation::Attributes::SoftwareVersionString::Id: + encoder.Encode(CharSpan::fromCharString(dev->GetBridgedAttributes().softwareVersionString.c_str())); + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR BridgedDeviceBasicInformationImpl::Write(const ConcreteDataAttributePath & path, AttributeValueDecoder & decoder) +{ + VerifyOrDie(path.mClusterId == app::Clusters::BridgedDeviceBasicInformation::Id); + + BridgedDevice * dev = BridgeDeviceMgr().GetDevice(path.mEndpointId); + VerifyOrReturnError(dev != nullptr, CHIP_ERROR_NOT_FOUND); + + if (!dev->IsReachable()) + { + return CHIP_ERROR_NOT_CONNECTED; + } + + ChipLogProgress(NotSpecified, "Bridged device basic information attempt to write attribute: ep=%d", path.mAttributeId); + + // nothing writable right now ... + + return CHIP_ERROR_INVALID_ARGUMENT; +} diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp new file mode 100644 index 00000000000000..33caf9e16fe909 --- /dev/null +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDeviceManager.cpp @@ -0,0 +1,319 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "BridgedDeviceManager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::Credentials; +using namespace chip::Inet; +using namespace chip::Transport; +using namespace chip::DeviceLayer; +using namespace chip::app::Clusters; + +namespace { + +constexpr uint8_t kMaxRetries = 10; +constexpr int kNodeLabelSize = 32; +constexpr int kUniqueIdSize = 32; +constexpr int kVendorNameSize = 32; +constexpr int kProductNameSize = 32; +constexpr int kHardwareVersionSize = 64; +constexpr int kSoftwareVersionSize = 64; + +// Current ZCL implementation of Struct uses a max-size array of 254 bytes +constexpr int kDescriptorAttributeArraySize = 254; + +// ENDPOINT DEFINITIONS: +// ================================================================================= +// +// Endpoint definitions will be reused across multiple endpoints for every instance of the +// endpoint type. +// There will be no intrinsic storage for the endpoint attributes declared here. +// Instead, all attributes will be treated as EXTERNAL, and therefore all reads +// or writes to the attributes must be handled within the emberAfExternalAttributeWriteCallback +// and emberAfExternalAttributeReadCallback functions declared herein. This fits +// the typical model of a bridge, since a bridge typically maintains its own +// state database representing the devices connected to it. + +// (taken from matter-devices.xml) +#define DEVICE_TYPE_BRIDGED_NODE 0x0013 + +// Device Version for dynamic endpoints: +#define DEVICE_VERSION_DEFAULT 1 + +// --------------------------------------------------------------------------- +// +// SYNCED DEVICE ENDPOINT: contains the following clusters: +// - Descriptor +// - Bridged Device Basic Information +// - Administrator Commissioning + +// clang-format off +// Declare Descriptor cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs) + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* device list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* server list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* client list */ + DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* parts list */ +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Bridged Device Basic Information cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) + // The attributes below are MANDATORY in the Bridged Device Information Cluster + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::Reachable::Id, BOOLEAN, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::UniqueID::Id, CHAR_STRING, kUniqueIdSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, BITMAP32, 4, 0), + + // The attributes below are OPTIONAL in the bridged device, however they are MANDATORY in the BasicInformation cluster + // so they can always be provided if desired + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::VendorName::Id, CHAR_STRING, kVendorNameSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::VendorID::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::ProductName::Id, CHAR_STRING, kProductNameSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::ProductID::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, CHAR_STRING, kNodeLabelSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, INT16U, 2, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, CHAR_STRING, + kHardwareVersionSize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, INT32U, 4, 0), + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, CHAR_STRING, + kSoftwareVersionSize, 0), +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Ecosystem Information cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(ecosystemInformationBasicAttrs) +DECLARE_DYNAMIC_ATTRIBUTE(EcosystemInformation::Attributes::RemovedOn::Id, EPOCH_US, kNodeLabelSize, ATTRIBUTE_MASK_NULLABLE), + DECLARE_DYNAMIC_ATTRIBUTE(EcosystemInformation::Attributes::DeviceDirectory::Id, ARRAY, kDescriptorAttributeArraySize, 0), + DECLARE_DYNAMIC_ATTRIBUTE(EcosystemInformation::Attributes::LocationDirectory::Id, ARRAY, kDescriptorAttributeArraySize, 0), + DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); + +// Declare Administrator Commissioning cluster attributes +DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(AdministratorCommissioningAttrs) + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::WindowStatus::Id, ENUM8, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminFabricIndex::Id, FABRIC_IDX, 1, 0), + DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminVendorId::Id, VENDOR_ID, 2, 0), +DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); +// clang-format on + +constexpr CommandId administratorCommissioningCommands[] = { + app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, + app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, + app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id, + kInvalidCommandId, +}; + +// Declare Cluster List for Bridged Node endpoint +DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedNodeClusters) +DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasicInformation::Id, bridgedDeviceBasicAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(EcosystemInformation::Id, ecosystemInformationBasicAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), + DECLARE_DYNAMIC_CLUSTER(AdministratorCommissioning::Id, AdministratorCommissioningAttrs, ZAP_CLUSTER_MASK(SERVER), + administratorCommissioningCommands, nullptr) DECLARE_DYNAMIC_CLUSTER_LIST_END; + +// Declare Bridged Node endpoint +DECLARE_DYNAMIC_ENDPOINT(sBridgedNodeEndpoint, bridgedNodeClusters); +DataVersion sBridgedNodeDataVersions[ArraySize(bridgedNodeClusters)]; + +const EmberAfDeviceType sBridgedDeviceTypes[] = { { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } }; + +} // namespace + +// Define the static member +BridgedDeviceManager BridgedDeviceManager::sInstance; + +void BridgedDeviceManager::Init() +{ + mFirstDynamicEndpointId = static_cast( + static_cast(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1))) + 1); + mCurrentEndpointId = mFirstDynamicEndpointId; +} + +std::optional BridgedDeviceManager::AddDeviceEndpoint(std::unique_ptr dev, + chip::EndpointId parentEndpointId) +{ + EmberAfEndpointType * ep = &sBridgedNodeEndpoint; + const chip::Span & deviceTypeList = Span(sBridgedDeviceTypes); + const chip::Span & dataVersionStorage = Span(sBridgedNodeDataVersions); + + if (dev->GetBridgedAttributes().uniqueId.empty()) + { + dev->SetUniqueId(GenerateUniqueId()); + } + else if (GetDeviceByUniqueId(dev->GetBridgedAttributes().uniqueId) != nullptr) + { + ChipLogProgress(NotSpecified, "A device with unique id '%s' already exists", dev->GetBridgedAttributes().uniqueId.c_str()); + return std::nullopt; + } + + for (unsigned index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; index++) + { + if (mDevices[index]) + { + continue; + } + + for (int retryCount = 0; retryCount < kMaxRetries; retryCount++) + { + DeviceLayer::StackLock lock; + dev->SetEndpointId(mCurrentEndpointId); + dev->SetParentEndpointId(parentEndpointId); + CHIP_ERROR err = + emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId); + if (err == CHIP_NO_ERROR) + { + ChipLogProgress(NotSpecified, "Added device with nodeId=0x" ChipLogFormatX64 " to dynamic endpoint %d (index=%d)", + ChipLogValueX64(dev->GetNodeId()), mCurrentEndpointId, index); + mDevices[index] = std::move(dev); + return index; + } + if (err != CHIP_ERROR_ENDPOINT_EXISTS) + { + return std::nullopt; // Return error as endpoint addition failed due to an error other than endpoint already exists + } + // Increment the endpoint ID and handle wrap condition + if (++mCurrentEndpointId < mFirstDynamicEndpointId) + { + mCurrentEndpointId = mFirstDynamicEndpointId; + } + } + ChipLogError(NotSpecified, "Failed to add dynamic endpoint after %d retries", kMaxRetries); + return std::nullopt; // Return error as all retries are exhausted + } + + ChipLogProgress(NotSpecified, "Failed to add dynamic endpoint: No endpoints available!"); + return std::nullopt; +} + +int BridgedDeviceManager::RemoveDeviceEndpoint(BridgedDevice * dev) +{ + uint8_t index = 0; + while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) + { + if (mDevices[index].get() == dev) + { + DeviceLayer::StackLock lock; + // Silence complaints about unused ep when progress logging + // disabled. + [[maybe_unused]] EndpointId ep = emberAfClearDynamicEndpoint(index); + mDevices[index] = nullptr; + ChipLogProgress(NotSpecified, "Removed device %s from dynamic endpoint %d (index=%d)", + dev->GetBridgedAttributes().uniqueId.c_str(), ep, index); + return index; + } + index++; + } + return -1; +} + +BridgedDevice * BridgedDeviceManager::GetDevice(chip::EndpointId endpointId) const +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetEndpointId() == endpointId) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +std::string BridgedDeviceManager::GenerateUniqueId() +{ + char rand_buffer[kUniqueIdSize + 1]; + memset(rand_buffer, 0, sizeof(rand_buffer)); + + static const char kRandCharChoices[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + while (true) + { + /// for nice viewing, prefix the generated value + memcpy(rand_buffer, "GEN-", 4); + for (unsigned idx = 4; idx < kUniqueIdSize; idx++) + { + rand_buffer[idx] = kRandCharChoices[Crypto::GetRandU8() % (sizeof(kRandCharChoices) - 1)]; + } + + // we know zero-terminated due to the memset + std::string uniqueIdChoice = rand_buffer; + + if (!GetDeviceByUniqueId(uniqueIdChoice)) + { + return uniqueIdChoice; + } + } +} + +BridgedDevice * BridgedDeviceManager::GetDeviceByUniqueId(const std::string & id) +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetBridgedAttributes().uniqueId == id) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +BridgedDevice * BridgedDeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const +{ + for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) + { + return mDevices[index].get(); + } + } + return nullptr; +} + +std::optional BridgedDeviceManager::RemoveDeviceByNodeId(chip::NodeId nodeId) +{ + for (unsigned index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) + { + if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) + { + DeviceLayer::StackLock lock; + EndpointId ep = emberAfClearDynamicEndpoint(index); + mDevices[index] = nullptr; + ChipLogProgress(NotSpecified, "Removed device with NodeId=0x" ChipLogFormatX64 " from dynamic endpoint %d (index=%d)", + ChipLogValueX64(nodeId), ep, index); + return index; + } + } + return std::nullopt; +} diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp deleted file mode 100644 index bc70c0cb0fe609..00000000000000 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/DeviceManager.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* - * - * Copyright (c) 2024 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "DeviceManager.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -using namespace chip; -using namespace chip::app; -using namespace chip::Credentials; -using namespace chip::Inet; -using namespace chip::Transport; -using namespace chip::DeviceLayer; -using namespace chip::app::Clusters; - -namespace { - -constexpr uint8_t kMaxRetries = 10; -constexpr int kNodeLabelSize = 32; - -// Current ZCL implementation of Struct uses a max-size array of 254 bytes -constexpr int kDescriptorAttributeArraySize = 254; - -// ENDPOINT DEFINITIONS: -// ================================================================================= -// -// Endpoint definitions will be reused across multiple endpoints for every instance of the -// endpoint type. -// There will be no intrinsic storage for the endpoint attributes declared here. -// Instead, all attributes will be treated as EXTERNAL, and therefore all reads -// or writes to the attributes must be handled within the emberAfExternalAttributeWriteCallback -// and emberAfExternalAttributeReadCallback functions declared herein. This fits -// the typical model of a bridge, since a bridge typically maintains its own -// state database representing the devices connected to it. - -// (taken from matter-devices.xml) -#define DEVICE_TYPE_BRIDGED_NODE 0x0013 - -// Device Version for dynamic endpoints: -#define DEVICE_VERSION_DEFAULT 1 - -// --------------------------------------------------------------------------- -// -// SYNCED DEVICE ENDPOINT: contains the following clusters: -// - Descriptor -// - Bridged Device Basic Information -// - Administrator Commissioning - -// Declare Descriptor cluster attributes -DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* device list */ - DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* server list */ - DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* client list */ - DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize, 0), /* parts list */ - DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); - -// Declare Bridged Device Basic Information cluster attributes -DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ - DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::Reachable::Id, BOOLEAN, 1, 0), /* Reachable */ - DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, BITMAP32, 4, 0), /* feature map */ - DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); - -// Declare Administrator Commissioning cluster attributes -DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(AdministratorCommissioningAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::WindowStatus::Id, ENUM8, 1, 0), /* NodeLabel */ - DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminFabricIndex::Id, FABRIC_IDX, 1, 0), /* Reachable */ - DECLARE_DYNAMIC_ATTRIBUTE(AdministratorCommissioning::Attributes::AdminVendorId::Id, VENDOR_ID, 2, 0), /* Reachable */ - DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); - -constexpr CommandId administratorCommissioningCommands[] = { - app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, - app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, - app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id, - kInvalidCommandId, -}; - -// Declare Cluster List for Bridged Node endpoint -DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(bridgedNodeClusters) -DECLARE_DYNAMIC_CLUSTER(Descriptor::Id, descriptorAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(BridgedDeviceBasicInformation::Id, bridgedDeviceBasicAttrs, ZAP_CLUSTER_MASK(SERVER), nullptr, nullptr), - DECLARE_DYNAMIC_CLUSTER(AdministratorCommissioning::Id, AdministratorCommissioningAttrs, ZAP_CLUSTER_MASK(SERVER), - administratorCommissioningCommands, nullptr) DECLARE_DYNAMIC_CLUSTER_LIST_END; - -// Declare Bridged Node endpoint -DECLARE_DYNAMIC_ENDPOINT(sBridgedNodeEndpoint, bridgedNodeClusters); -DataVersion sBridgedNodeDataVersions[ArraySize(bridgedNodeClusters)]; - -const EmberAfDeviceType sBridgedDeviceTypes[] = { { DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT } }; - -} // namespace - -// Define the static member -DeviceManager DeviceManager::sInstance; - -void DeviceManager::Init() -{ - memset(mDevices, 0, sizeof(mDevices)); - mFirstDynamicEndpointId = static_cast( - static_cast(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1))) + 1); - mCurrentEndpointId = mFirstDynamicEndpointId; -} - -int DeviceManager::AddDeviceEndpoint(Device * dev, chip::EndpointId parentEndpointId) -{ - uint8_t index = 0; - EmberAfEndpointType * ep = &sBridgedNodeEndpoint; - const chip::Span & deviceTypeList = Span(sBridgedDeviceTypes); - const chip::Span & dataVersionStorage = Span(sBridgedNodeDataVersions); - - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (nullptr == mDevices[index]) - { - mDevices[index] = dev; - CHIP_ERROR err; - int retryCount = 0; - while (retryCount < kMaxRetries) - { - DeviceLayer::StackLock lock; - dev->SetEndpointId(mCurrentEndpointId); - dev->SetParentEndpointId(parentEndpointId); - err = - emberAfSetDynamicEndpoint(index, mCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId); - if (err == CHIP_NO_ERROR) - { - ChipLogProgress(NotSpecified, - "Added device with nodeId=0x" ChipLogFormatX64 " to dynamic endpoint %d (index=%d)", - ChipLogValueX64(dev->GetNodeId()), mCurrentEndpointId, index); - return index; - } - if (err != CHIP_ERROR_ENDPOINT_EXISTS) - { - mDevices[index] = nullptr; - return -1; // Return error as endpoint addition failed due to an error other than endpoint already exists - } - // Increment the endpoint ID and handle wrap condition - if (++mCurrentEndpointId < mFirstDynamicEndpointId) - { - mCurrentEndpointId = mFirstDynamicEndpointId; - } - retryCount++; - } - ChipLogError(NotSpecified, "Failed to add dynamic endpoint after %d retries", kMaxRetries); - mDevices[index] = nullptr; - return -1; // Return error as all retries are exhausted - } - index++; - } - ChipLogProgress(NotSpecified, "Failed to add dynamic endpoint: No endpoints available!"); - return -1; -} - -int DeviceManager::RemoveDeviceEndpoint(Device * dev) -{ - uint8_t index = 0; - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (mDevices[index] == dev) - { - DeviceLayer::StackLock lock; - // Silence complaints about unused ep when progress logging - // disabled. - [[maybe_unused]] EndpointId ep = emberAfClearDynamicEndpoint(index); - mDevices[index] = nullptr; - ChipLogProgress(NotSpecified, "Removed device %s from dynamic endpoint %d (index=%d)", dev->GetName(), ep, index); - return index; - } - index++; - } - return -1; -} - -Device * DeviceManager::GetDevice(chip::EndpointId endpointId) const -{ - for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) - { - if (mDevices[index] && mDevices[index]->GetEndpointId() == endpointId) - { - return mDevices[index]; - } - } - return nullptr; -} - -Device * DeviceManager::GetDeviceByNodeId(chip::NodeId nodeId) const -{ - for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) - { - if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) - { - return mDevices[index]; - } - } - return nullptr; -} - -int DeviceManager::RemoveDeviceByNodeId(chip::NodeId nodeId) -{ - for (uint8_t index = 0; index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT; ++index) - { - if (mDevices[index] && mDevices[index]->GetNodeId() == nodeId) - { - DeviceLayer::StackLock lock; - EndpointId ep = emberAfClearDynamicEndpoint(index); - mDevices[index] = nullptr; - ChipLogProgress(NotSpecified, "Removed device with NodeId=0x" ChipLogFormatX64 " from dynamic endpoint %d (index=%d)", - ChipLogValueX64(nodeId), ep, index); - return index; - } - } - return -1; -} diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp index 7a9521fa7820a7..d4da982cfa45a5 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/ZCLCallbacks.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "DeviceManager.h" +#include "BridgedDeviceManager.h" #include #include @@ -25,68 +25,26 @@ using namespace ::chip; using namespace ::chip::app::Clusters; -#define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) -#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION (2u) -#define ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_FEATURE_MAP (0u) +#define ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_REVISION (1u) // External attribute read callback function Protocols::InteractionModel::Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) { - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - AttributeId attributeId = attributeMetadata->attributeId; - - Device * dev = DeviceMgr().GetDevice(endpointIndex); - if (dev != nullptr && clusterId == app::Clusters::BridgedDeviceBasicInformation::Id) + if (clusterId == AdministratorCommissioning::Id) { - using namespace app::Clusters::BridgedDeviceBasicInformation::Attributes; - ChipLogProgress(NotSpecified, "HandleReadBridgedDeviceBasicAttribute: attrId=%d, maxReadLength=%d", attributeId, - maxReadLength); - - if ((attributeId == Reachable::Id) && (maxReadLength == 1)) + // TODO(#34791) This is a workaround to prevent crash. CADMIN is still reading incorrect + // Attribute values on dynamic endpoint as it only reads the root node and not the actual bridge + // device we are representing here, when addressing the issue over there we can more easily + // resolve this workaround. + if ((attributeMetadata->attributeId == AdministratorCommissioning::Attributes::ClusterRevision::Id) && (maxReadLength == 2)) { - *buffer = dev->IsReachable() ? 1 : 0; - } - else if ((attributeId == NodeLabel::Id) && (maxReadLength == 32)) - { - MutableByteSpan zclNameSpan(buffer, maxReadLength); - MakeZclCharString(zclNameSpan, dev->GetName()); - } - else if ((attributeId == ClusterRevision::Id) && (maxReadLength == 2)) - { - uint16_t rev = ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION; + uint16_t rev = ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_REVISION; memcpy(buffer, &rev, sizeof(rev)); + return Protocols::InteractionModel::Status::Success; } - else if ((attributeId == FeatureMap::Id) && (maxReadLength == 4)) - { - uint32_t featureMap = ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_FEATURE_MAP; - memcpy(buffer, &featureMap, sizeof(featureMap)); - } - else - { - return Protocols::InteractionModel::Status::Failure; - } - return Protocols::InteractionModel::Status::Success; } return Protocols::InteractionModel::Status::Failure; } - -// External attribute write callback function -Protocols::InteractionModel::Status emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, - uint8_t * buffer) -{ - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - Protocols::InteractionModel::Status ret = Protocols::InteractionModel::Status::Failure; - - Device * dev = DeviceMgr().GetDevice(endpointIndex); - if (dev != nullptr && dev->IsReachable()) - { - ChipLogProgress(NotSpecified, "emberAfExternalAttributeWriteCallback: ep=%d, clusterId=%d", endpoint, clusterId); - ret = Protocols::InteractionModel::Status::Success; - } - - return ret; -} diff --git a/examples/fabric-bridge-app/linux/RpcServer.cpp b/examples/fabric-bridge-app/linux/RpcServer.cpp index d4044f043468d3..65bb365b8de19d 100644 --- a/examples/fabric-bridge-app/linux/RpcServer.cpp +++ b/examples/fabric-bridge-app/linux/RpcServer.cpp @@ -20,6 +20,7 @@ #include "pw_rpc_system_server/rpc_server.h" #include "pw_rpc_system_server/socket.h" +#include #include #include @@ -29,8 +30,8 @@ #include "pigweed/rpc_services/FabricBridge.h" #endif -#include "Device.h" -#include "DeviceManager.h" +#include "BridgedDevice.h" +#include "BridgedDeviceManager.h" using namespace chip; using namespace chip::app; @@ -51,17 +52,74 @@ pw::Status FabricBridge::AddSynchronizedDevice(const chip_rpc_SynchronizedDevice NodeId nodeId = request.node_id; ChipLogProgress(NotSpecified, "Received AddSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); - Device * device = new Device(nodeId); + auto device = std::make_unique(nodeId); device->SetReachable(true); - int result = DeviceMgr().AddDeviceEndpoint(device, 1); - if (result == -1) + BridgedDevice::BridgedAttributes attributes; + + if (request.has_unique_id) + { + attributes.uniqueId = request.unique_id; + } + + if (request.has_vendor_name) + { + attributes.vendorName = request.vendor_name; + } + + if (request.has_vendor_id) + { + attributes.vendorId = request.vendor_id; + } + + if (request.has_product_name) + { + attributes.productName = request.product_name; + } + + if (request.has_product_id) + { + attributes.productId = request.product_id; + } + + if (request.has_node_label) + { + attributes.nodeLabel = request.node_label; + } + + if (request.has_hardware_version) + { + attributes.hardwareVersion = request.hardware_version; + } + + if (request.has_hardware_version_string) + { + attributes.hardwareVersionString = request.hardware_version_string; + } + + if (request.has_software_version) + { + attributes.softwareVersion = request.software_version; + } + + if (request.has_software_version_string) + { + attributes.softwareVersionString = request.software_version_string; + } + + device->SetBridgedAttributes(attributes); + + auto result = BridgeDeviceMgr().AddDeviceEndpoint(std::move(device), 1 /* parentEndpointId */); + if (!result.has_value()) { - delete device; ChipLogError(NotSpecified, "Failed to add device with nodeId=0x" ChipLogFormatX64, ChipLogValueX64(nodeId)); return pw::Status::Unknown(); } + CHIP_ERROR err = EcosystemInformation::EcosystemInformationServer::Instance().AddEcosystemInformationClusterToEndpoint( + device->GetEndpointId()); + VerifyOrDie(err == CHIP_NO_ERROR); + return pw::OkStatus(); } @@ -70,8 +128,8 @@ pw::Status FabricBridge::RemoveSynchronizedDevice(const chip_rpc_SynchronizedDev NodeId nodeId = request.node_id; ChipLogProgress(NotSpecified, "Received RemoveSynchronizedDevice: " ChipLogFormatX64, ChipLogValueX64(nodeId)); - int removed_idx = DeviceMgr().RemoveDeviceByNodeId(nodeId); - if (removed_idx < 0) + auto removed_idx = BridgeDeviceMgr().RemoveDeviceByNodeId(nodeId); + if (!removed_idx.has_value()) { ChipLogError(NotSpecified, "Failed to remove device with nodeId=0x" ChipLogFormatX64, ChipLogValueX64(nodeId)); return pw::Status::NotFound(); diff --git a/examples/fabric-bridge-app/linux/main.cpp b/examples/fabric-bridge-app/linux/main.cpp index d8fb45dea08a02..46e1e35005ff70 100644 --- a/examples/fabric-bridge-app/linux/main.cpp +++ b/examples/fabric-bridge-app/linux/main.cpp @@ -18,24 +18,32 @@ #include +#include "BridgedDevice.h" +#include "BridgedDeviceBasicInformationImpl.h" +#include "BridgedDeviceManager.h" #include "CommissionableInit.h" -#include "Device.h" -#include "DeviceManager.h" #include #include +#include #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE #include "RpcClient.h" #include "RpcServer.h" #endif -#include #include #include -using namespace chip; +// This is declared here and not in a header because zap/embr assumes all clusters +// are defined in a static endpoint in the .zap file. From there, the codegen will +// automatically use PluginApplicationCallbacksHeader.jinja to declare and call +// the respective Init callbacks. However, because EcosystemInformation cluster is only +// ever on a dynamic endpoint, this doesn't get declared and called for us, so we +// need to declare and call it ourselves where the application is initialized. +void MatterEcosystemInformationPluginServerInitCallback(); +using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::AdministratorCommissioning; @@ -48,6 +56,8 @@ constexpr uint16_t kPollIntervalMs = 100; constexpr uint16_t kRetryIntervalS = 3; #endif +BridgedDeviceBasicInformationImpl gBridgedDeviceBasicInformationAttributes; + bool KeyboardHit() { int bytesWaiting; @@ -140,7 +150,7 @@ void AdministratorCommissioningCommandHandler::InvokeCommand(HandlerContext & ha Status status = Status::Failure; #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE - Device * device = DeviceMgr().GetDevice(endpointId); + BridgedDevice * device = BridgeDeviceMgr().GetDevice(endpointId); // TODO: issues:#33784, need to make OpenCommissioningWindow synchronous if (device != nullptr && @@ -174,7 +184,9 @@ void ApplicationInit() { ChipLogDetail(NotSpecified, "Fabric-Bridge: ApplicationInit()"); - CommandHandlerInterfaceRegistry::RegisterCommandHandler(&gAdministratorCommissioningCommandHandler); + MatterEcosystemInformationPluginServerInitCallback(); + CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler(&gAdministratorCommissioningCommandHandler); + AttributeAccessInterfaceRegistry::Instance().Register(&gBridgedDeviceBasicInformationAttributes); #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE InitRpcServer(kFabricBridgeServerPort); @@ -185,7 +197,7 @@ void ApplicationInit() std::thread pollingThread(BridgePollingThread); pollingThread.detach(); - DeviceMgr().Init(); + BridgeDeviceMgr().Init(); } void ApplicationShutdown() diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index f0bffe95080d01..7ecbd20a6e9d0f 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp index 795c433436330e..8fb0dabd95dec7 100644 --- a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp @@ -35,7 +35,7 @@ using namespace chip::System; using namespace chip::app::Clusters; void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, - uint8_t mask, uint8_t type, uint16_t size, uint8_t * value) + uint8_t type, uint16_t size, uint8_t * value) { ESP_LOGI(TAG, "PostAttributeChangeCallback - Cluster ID: '0x%" PRIx32 "', EndPoint ID: '0x%x', Attribute ID: '0x%" PRIx32 "'", clusterId, endpointId, attributeId); diff --git a/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h b/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h index 93c53cbfd37e97..7d9c0b00b32861 100644 --- a/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h +++ b/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h @@ -33,7 +33,7 @@ class AppDeviceCallbacks : public CommonDeviceCallbacks { public: virtual void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, - uint8_t mask, uint8_t type, uint16_t size, uint8_t * value); + uint8_t type, uint16_t size, uint8_t * value) override; private: void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); 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 ea78ebf1d2fa5b..8cd9c653a75bb5 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index 95d6ae8194cc56..6924e96503d0c6 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 55f7f290e1f474..331f7e79cadfe9 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 1b12b77e99a9fb..f6bb26ec689619 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 91d870bf308d5a..9dee0bdcdb040d 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/lighting-app/cc13x4_26x4/README.md b/examples/lighting-app/cc13x4_26x4/README.md index 73718a0bf76a86..5a6f6efb6a53ae 100644 --- a/examples/lighting-app/cc13x4_26x4/README.md +++ b/examples/lighting-app/cc13x4_26x4/README.md @@ -108,7 +108,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming diff --git a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp index aa9bdbccefa3c3..6c4ffacdda2565 100644 --- a/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lighting-app/cc13x4_26x4/src/AppTask.cpp @@ -126,9 +126,9 @@ void InitializeOTARequestor(void) sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); } -#endif TimerHandle_t sOTAInitTimer = 0; +#endif // The OTA Init Timer is only started upon the first Thread State Change // detected if the device is already on a Thread Network, or during the AppTask @@ -215,10 +215,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void OTAInitTimerEventHandler(TimerHandle_t xTimer) { InitializeOTARequestor(); } +#endif int AppTask::Init() { @@ -239,6 +241,7 @@ int AppTask::Init() ; } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Create FreeRTOS sw timer for OTA timer. sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) @@ -255,6 +258,7 @@ int AppTask::Init() { PLAT_LOG("sOTAInitTimer timer created successfully "); } +#endif ret = ThreadStackMgr().InitThreadStack(); if (ret != CHIP_NO_ERROR) @@ -371,6 +375,7 @@ void AppTask::AppTaskMain(void * pvParameter) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs) { PLAT_LOG("Start OTA Init Timer") @@ -396,6 +401,7 @@ void CancelTimer(void) PLAT_LOG("sOTAInitTimer stop() failed"); } } +#endif void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) { diff --git a/examples/lighting-app/infineon/psoc6/README.md b/examples/lighting-app/infineon/psoc6/README.md index e5b5854fc275e5..773a05af1f3899 100644 --- a/examples/lighting-app/infineon/psoc6/README.md +++ b/examples/lighting-app/infineon/psoc6/README.md @@ -31,10 +31,11 @@ will then join the network. ## Building -- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) +- Download and install + [Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox) - Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile` + or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and related tools. - Install some additional tools (likely already present for Matter @@ -43,7 +44,7 @@ will then join the network. python3-pip - Supported hardware: - [CY8CKIT-062S2-43012](https://www.cypress.com/CY8CKIT-062S2-43012) + [CY8CKIT-062S2-43012](https://www.infineon.com/CY8CKIT-062S2-43012) * Build the example application: @@ -59,11 +60,12 @@ will then join the network. - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the `MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in - proper mode. + proper mode. (Modustoolbox Software needs to be installed) - On the command line: $ cd ~/connectedhomeip + $ export CY_TOOLS_PATHS=/tools_3.2 $ python3 out/infineon-psoc6-light/chip-psoc6-lighting-example.flash.py ## Commissioning and cluster control diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 923357f63d2d12..5ddd7071470692 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -2412,7 +2628,7 @@ cluster ColorControl = 768 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -2977,8 +3193,8 @@ endpoint 1 { ram attribute occupancy; ram attribute occupancySensorType; ram attribute occupancySensorTypeBitmap; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; + callback attribute featureMap; + ram attribute clusterRevision default = 5; } } diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 04abf7714a1a9c..6592c66dfea564 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -5903,7 +5903,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/nxp/k32w/k32w0/build_overrides b/examples/lighting-app/nxp/k32w/k32w0/build_overrides deleted file mode 120000 index ad07557834803a..00000000000000 --- a/examples/lighting-app/nxp/k32w/k32w0/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../../../build_overrides/ \ No newline at end of file diff --git a/examples/lighting-app/nxp/k32w/k32w0/third_party/connectedhomeip b/examples/lighting-app/nxp/k32w/k32w0/third_party/connectedhomeip deleted file mode 120000 index 305f2077ffe860..00000000000000 --- a/examples/lighting-app/nxp/k32w/k32w0/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../../.. \ No newline at end of file diff --git a/examples/lighting-app/nxp/k32w/k32w0/.gn b/examples/lighting-app/nxp/k32w0/.gn similarity index 94% rename from examples/lighting-app/nxp/k32w/k32w0/.gn rename to examples/lighting-app/nxp/k32w0/.gn index cfa8fcb8c07dc4..e0a89b885879e6 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/.gn +++ b/examples/lighting-app/nxp/k32w0/.gn @@ -31,5 +31,5 @@ default_args = { [ "${chip_root}/scripts/setup/requirements.build.txt" ] # Import default platform configs - import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") + import("${chip_root}/src/platform/nxp/k32w0/args.gni") } diff --git a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn b/examples/lighting-app/nxp/k32w0/BUILD.gn similarity index 87% rename from examples/lighting-app/nxp/k32w/k32w0/BUILD.gn rename to examples/lighting-app/nxp/k32w0/BUILD.gn index 82afd7ad22864d..a63a5967c3948b 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/BUILD.gn +++ b/examples/lighting-app/nxp/k32w0/BUILD.gn @@ -40,7 +40,7 @@ if (chip_pw_tokenizer_logging) { assert(current_os == "freertos") -k32w0_platform_dir = "${chip_root}/examples/platform/nxp/k32w/k32w0" +k32w0_platform_dir = "${nxp_sdk_matter_support_root}/examples/platform/k32w0" k32w0_sdk("sdk") { sources = [ @@ -84,7 +84,10 @@ k32w0_sdk("sdk") { k32w0_executable("light_app") { output_name = "chip-k32w0x-light-example" + defines = [] + sources = [ + "${k32w0_platform_dir}/util/DefaultTestEventTriggerDelegate.cpp", "${k32w0_platform_dir}/util/LEDWidget.cpp", "${k32w0_platform_dir}/util/include/LEDWidget.h", "main/AppTask.cpp", @@ -96,15 +99,13 @@ k32w0_executable("light_app") { "main/main.cpp", ] - public = [ "${chip_root}/src/platform/nxp/k32w/k32w0/DefaultTestEventTriggerDelegate.h" ] - if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) { sources += [ "${k32w0_platform_dir}/common/CustomFactoryDataProvider.cpp", "${k32w0_platform_dir}/common/CustomFactoryDataProvider.h", ] - defines = [ "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1" ] + defines += [ "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1" ] } deps = [ @@ -112,7 +113,6 @@ k32w0_executable("light_app") { "${chip_root}/examples/common/QRCode", "${chip_root}/examples/lighting-app/nxp/zap/", "${chip_root}/examples/providers:device_info_provider", - "${chip_root}/src/app:test-event-trigger", "${chip_root}/src/lib", "${chip_root}/src/platform:syscalls_stub", "${chip_root}/src/platform/logging:default", @@ -120,17 +120,12 @@ k32w0_executable("light_app") { "${k32w0_platform_dir}/app/support:freertos_mbedtls_utils", ] - if (chip_openthread_ftd) { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", - "${chip_root}/third_party/openthread/repo:libopenthread-ftd", - ] - } else { - deps += [ - "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", - "${chip_root}/third_party/openthread/repo:libopenthread-mtd", - ] - } + defines += [ "CONNECTIVITY_MANAGER_THREAD_DEVICE_TYPE=ConnectivityManager::kThreadDeviceType_MinimalEndDevice" ] + + deps += [ + "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", + "${chip_root}/third_party/openthread/repo:libopenthread-mtd", + ] cflags = [ "-Wconversion" ] @@ -169,6 +164,11 @@ group("k32w0") { ":binsign", ":light_app", ] + + if (chip_enable_ota_requestor) { + deps += [ "${k32w0_platform_dir}/ssbl:ssbl" ] + } + if (chip_pw_tokenizer_logging) { deps += [ ":light_app.database" ] } @@ -183,6 +183,10 @@ action("binsign") { if (chip_simple_hash_verification == 1) { args = [ "--simple-hash" ] } + + if (chip_enable_ota_requestor) { + args = [ "--ota-enabled" ] + } } group("default") { diff --git a/examples/lighting-app/nxp/k32w/k32w0/README.md b/examples/lighting-app/nxp/k32w0/README.md similarity index 73% rename from examples/lighting-app/nxp/k32w/k32w0/README.md rename to examples/lighting-app/nxp/k32w0/README.md index a0f560e2e884c4..518e0232a4f6cb 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/README.md +++ b/examples/lighting-app/nxp/k32w0/README.md @@ -27,10 +27,12 @@ network. - [Identify cluster LED state](#identify-cluster-led-state) - [Building](#building) - [Overwrite board config files](#overwrite-board-config-files) - - [Known issues building](#known-issues-building) + - [Known issues building](#known-issues-building) - [Rotating device id](#rotating-device-id) - [Manufacturing data](#manufacturing-data) - [Flashing and debugging](#flashing-and-debugging) + - [Using DK6programmer](#using-dk6programmer) + - [Using MCUXpresso](#using-mcuxpresso) - [Pigweed tokenizer](#pigweed-tokenizer) - [Detokenizer script](#detokenizer-script) - [Notes](#notes) @@ -40,18 +42,12 @@ network. - [Tinycrypt ECC library](#tinycrypt-ecc-library) - [Building steps](#building-steps-1) - [OTA](#ota) - - [Writing the SSBL](#writing-the-ssbl) - - [Features](#features) - - [Multi image](#multi-image) - - [Simple hash verification](#simple-hash-verification) - - [Writing the PSECT](#writing-the-psect) - - [Writing the application](#writing-the-application) - [OTA Testing](#ota-testing) - - [Known issues ota](#known-issues-ota) + - [Known issues OTA](#known-issues-ota) ## Introduction -![K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg) +![K32W061 DK6](../../../platform/nxp/k32w0/doc/images/k32w-dk6.jpg) The K32W061 lighting example application provides a working demonstration of a light bulb device, built using the Project CHIP codebase and the NXP K32W061 @@ -81,7 +77,7 @@ Deployment of this firmware configuration requires the K32W061 board setups using the K32W061 module board, SE051 Expansion board and Generic Expansion board as shown below: -![SE051H + K32W061 DK6](../../../../platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg) +![SE051H + K32W061 DK6](../../../platform/nxp/k32w0/doc/images/k32w-se.jpg) The SE051H Secure Element extension may be used for best in class security and offloading some of the Project CHIP cryptographic operations. Depending on your @@ -198,10 +194,10 @@ effects: In order to build the Project CHIP example, we recommend using a Linux distribution (supported Operating Systems are listed in -[BUILDING.md](../../../../../docs/guides/BUILDING.md#tested-operating systems)). +[BUILDING.md](../../../../docs/guides/BUILDING.md#tested-operating-systems)). - Make sure that below prerequisites are correctly installed (as described in - [BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites))) + [BUILDING.md](../../../../docs/guides/BUILDING.md#prerequisites)) ``` sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ @@ -231,18 +227,18 @@ user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh - Step 3: Init NXP SDK(s) ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/setup/nxp/update_nxp_sdk.py --platform k32w0 +user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform k32w0 ``` -Note: By default setup/nxp/update_nxp_sdk.py will try to initialize all NXP -SDKs. Arg "-- help" could be used to view all available options. +Note: By default update_nxp_sdk.py will try to initialize all NXP SDKs. Arg "-- +help" could be used to view all available options. - Start building the application: ```bash -user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w/k32w0 -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ gn gen out/debug -user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w/k32w0$ ninja -C out/debug +user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lighting-app/nxp/k32w0 +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w0$ gn gen out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lighting-app/nxp/k32w0$ ninja -C out/debug ``` To build with Secure Element, follow the same steps as above but set @@ -279,7 +275,7 @@ used to control an antenna switch. In order to use this feature, user must set In case signing errors are encountered when running the "sign_images.sh" script (run automatically) install the recommanded packages (python version > 3, pip3, -pycrypto, pycryptodome): +pycryptodome): ``` user@ubuntu:~$ python3 --version @@ -287,7 +283,6 @@ Python 3.8.2 user@ubuntu:~$ pip3 --version pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) user@ubuntu:~$ pip3 list | grep -i pycrypto -pycrypto 2.6.1 pycryptodome 3.9.8 ``` @@ -310,7 +305,7 @@ k32w0_sdk("sdk") { This variable will be used by `k32w0_sdk.gni` to overwrite `chip_with_DK6` option, thus the reference board configuration files will no longer be used. -## Known issues building +### Known issues building - When using Secure element and cross-compiling on Linux, log messages from the Plug&Trust middleware stack may not echo to the console. @@ -333,20 +328,20 @@ Please use the following build args: ## Manufacturing data See -[Guide for writing manufacturing data on NXP devices](../../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). There are factory data generated binaries available in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data folder. -These are based on the DAC, PAI and PAA certificates found in +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data` +folder. These are based on the DAC, PAI and PAA certificates found in scripts/tools/nxp/demo_generated_certs folder. The demo_factory_data_dut1.bin uses the DAC certificate and private key found in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/dac/dut1 +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data/dac/dut1` folder. The demo_factory_data_dut2.bin uses the DAC certificate and private key found in -examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/dac/dut2 +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/demo_generated_factory_data/dac/dut2` folder. These two factory data binaries can be used for testing topologies with 2 DUTS. They contain the corresponding DACs/PAIs generated using -generate_nxp_chip_factory_bin.py script. The discriminator is 14014 and the +`generate_nxp_chip_factory_bin.py` script. The discriminator is 14014 and the passcode is 1000. These demo certificates are working with the CDs installed in CHIPProjectConfig.h. @@ -355,18 +350,140 @@ Regarding factory data provider, there are two options: - use the default factory data provider: `FactoryDataProviderImpl` by setting `chip_with_factory_data=1` in the gn build command. - use a custom factory data provider: please see - [Guide for implementing a custom factory data provider](../../../../platform/nxp/k32w/k32w0/common/README.md). + [Guide for implementing a custom factory data provider](../../../platform/nxp/k32w0/doc/CustomFactoryDataProvider.md). This can be enabled when `chip_with_factory_data=1` by setting `use_custom_factory_provider=1` in the gn build command. ## Flashing and debugging -Program the firmware using the official +Instructions to program the firmware can be found also at [OpenThread Flash Instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#flash-binaries). -All you have to do is to replace the Openthread binaries from the above -documentation with _out/debug/chip-k32w0x-light-example.bin_ if DK6Programmer is -used or with _out/debug/chip-k32w0x-light-example_ if MCUXpresso is used. +### Using DK6programmer + +The application binary's path is _out/debug/chip-k32w0x-light-example.bin_. + +DK6Programmer can be used for flashing the application. There are two available +versions of the DK6Programmer tool. + +The legacy version consists of a Windows executable found inside the +[SDK](https://mcuxpresso.nxp.com/en/welcome) at path +`tools/JN-SW-4407-DK6-Flash-Programmer`. This is a Windows application that can +be installed using the .exe file. Once the application is installed, the COM +port for K32W061 must be identified: + +``` +C:\nxp\DK6ProductionFlashProgrammer>DK6Programmer.exe --list +Available connections: + +``` + +Once the COM port is identified, the required binary can be flashed: + +``` +DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w0x-light-example.bin" +``` + +> **_Note:_** The above example takes into account that the binary uses the +> `chip_enable_ota_requestor=true` option. The address offset corresponds to the +> space left for the SSBL binary and the OTA space for the SSBL. If +> `chip_enable_ota_requestor` is set to `false`, then `0x4000` needs to be +> replaced with `0x0`. + +DK6 Flash Programmer tool has also been integrated part of +[NXP Secure Provisioning SDK (SPSDK)](https://github.com/nxp-mcuxpresso/spsdk). +This tool is supported by environments like Windows, Linux or Mac. + +`SPSDK` can be installed and run from a Python environment using +[these instructions](https://spsdk.readthedocs.io/en/latest/usage/installation.html). +This enables the user to have transparent access to the dk6 programming tool +through `SPSDK`. + +``` +# after specific environment installation steps +$ spsdk --help +... + +-- dk6prog Tool for reading and programming flash memory of DK6 target devices. + � +-- erase Erase the memory. + � +-- info Prints the information about the connected device. + � +-- isp Issues ISP sequence as defined in Driver interface. + � +-- listdev Prints the information about the connected devices. + � +-- read Reads the memory and writes it to the file or stdout. + � +-- write Write the memory. +... +``` + +Dependencies for the `dk6prog` module can be installed using the following +command, more details +[here](https://spsdk.readthedocs.io/en/latest/usage/installation.html#dk6-tools): + +``` +$ pip install spsdk[dk6] +``` + +The `SPSDK` installation adds `dk6prog` as executable to system path, so user +can use directly `dk6prog` from terminal. The following commands are to be used +to write the chip-k32w0x-light-example binary to the board. + +``` +$ dk6prog listdev +This is an experimental utility. Use with caution! + +List of available devices: +DEVICE ID: DN038ZH3, VID: 0x403, PID: 0x6015, Serial number: DN038ZH3, Description: DK6 Carrier Board, Address: 9, Backend: Backend.PYFTDI +$ dk6prog -d DN038ZH3 write 0x4000 ~/path/to/bin/chip-k32w0x-light-example.bin + +This is an experimental utility. Use with caution! + +Writing memory [####################################] 100% +Written 596450 bytes to memory ID 0 at address 0x4000 +``` + +> **_Note:_** Running `dk6prog` from Windows OS command line requires an integer +> value for DEVICE ID. + +``` +C:\nxp\spsdk>dk6prog listdev + +This is an experimental utility. Use with caution! + +List of available devices: +DEVICE ID: 0, VID: 0x0, PID: 0x0, Serial number: b'DN038ZH3', Description: b'DK6 Carrier Board', Address: 67330069, Backend: Backend.FTD2xx + +C:\nxp\spsdk>dk6prog -d 0 info + +This is an experimental utility. Use with caution! + +Chip ID: 0x88888888 +ROM Version: 0x140000cc +MAC Address: A8:2B:1F:03:00:8D:15:00 + +Detected DEVICE: UNKNOWN + + Memory Memory ID Base Address Length Sector Size Memory Type Access +---------------------------------------------------------------------------------------------- + FLASH 0 0x0 0x9de00 0x200 FLASH All is available + PSECT 1 0x0 0x1e0 0x10 FLASH All is available + pFLASH 2 0x0 0x1e0 0x10 FLASH All is available + Config 3 0x9fc00 0x200 0x200 FLASH All is available + EFUSE 4 0x0 0x80 0x2 EFUSE (OTP) Write Enabled + ROM 5 0x3000000 0x20000 0x1 ROM Write Enabled + RAM0 6 0x4000000 0x16000 0x1 RAM Write Enabled + RAM1 7 0x4020000 0x10000 0x1 RAM Write Enabled +``` + +> **_Note:_** The above example takes into account that the binary uses the +> `chip_enable_ota_requestor=true` option. The address offset corresponds to the +> space left for the SSBL binary and the OTA space for the SSBL. If +> `chip_enable_ota_requestor` is set to `false`, then `0x4000` needs to be +> replaced with `0x0`. + +### Using MCUXpresso + +If flashing and debugging is required, MCUXpresso can be used as instructed in +[MCUXpresso flashing and debugging instructions](https://github.com/openthread/ot-nxp/tree/main/src/k32w0/k32w061#using-mcuxpresso-ide). +The file needed to be used in MCUXpresso is +_out/debug/chip-k32w0x-light-example_. ## Pigweed tokenizer @@ -379,7 +496,7 @@ needed for parsing the hashed scripts. The python3 script detokenizer.py is a script that decodes the tokenized logs either from a file or from a serial port. It is located in the following path -`examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py`. +`third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/detokenizer.py`. The script can be used in the following ways: @@ -414,7 +531,7 @@ by the script is loaded by the environment. An example of running the detokenizer script to see logs of a lighting app: ``` -python3 ../../../../../examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-light-example-database.bin -o device.txt +python3 ../../../../third_party/nxp/nxp_matter_support/examples/platform/k32w0/scripts/detokenizer.py serial -i /dev/ttyACM0 -d out/debug/chip-k32w0x-light-example-database.bin -o device.txt ``` ### Known issues tokenizer @@ -459,172 +576,37 @@ In order to use the Tinycrypt ECC library, use the following build arguments: ## OTA -The internal flash needs to be prepared for the OTA process. First 16K of the -internal flash needs to be populated with a Secondary Stage Bootloader (SSBL) -related data while the last 8.5K of flash space is holding image directory -related data (PSECT). The space between these two zones will be filled by the +Over the air updates (OTA) require several software components running on the +K32W0x1. Firstly, a Secondary Stage Bootloader (SSBL) is required written in the +first part of the internal flash memory, usually starting at address 0x0. This +enables the board to boot and check if a new OTA binary has been received. If +this is true, the bootloader writes the OTA binary to the appropriate storage, +internal and/or external flash, after which it reboots the board. If no new OTA +binaries have been found, then the bootloader gives execution control to the application. -### Writing the SSBL - -The SDK already provides an SSBL binary compiled with external flash support: -`boards/k32w061dk6/wireless_examples/framework/ssbl/binary/ssbl_ext_flash_pdm_support.bin`, -but it does not offer multi-image OTA support. - -Alternatively, the SSBL can ge generated from one of the SDK demo examples. The -SSBL demo application can be imported from the `Quickstart panel`: -`Import SDK example(s) -> select wireless -> framework -> ssbl` application. - -![SSBL Application Select](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_select.JPG) - -### Features - -#### Multi image - -To support multi-image OTA feature, the SSBL project must be compiled using the -following defines: - -- `PDM_EXT_FLASH=1` - support PDM in external flash. -- `gOTAUseCustomOtaEntry=1` - support custom OTA entry for multi-image. -- `gOTACustomOtaEntryMemory=OTACustomStorage_ExtFlash` - K32W0 uses - `OTACustomStorage_ExtFlash` (1) by default. -- `SPIFI_DUAL_MODE_SUPPORT=1` - only for configurations that use dual `SPIFI` - flash (e.g. K32W041AM variant). - -Optionally, add the following defines: - -- `SPIFI_OPTIM_SIZE=1` - to optimize SSBL size. -- `EXTERNAL_FLASH_DATA_OTA=1` - to support external read only data. - -![SSBL_MULTI_IMAGE](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_multi_image.JPG) - -#### Simple hash verification - -When secure boot is not used, a simple hash can be appended at the end of the -image for integrity check. Applications should be built with -`chip_simple_hash_verification=1`. - -To support simple hash verification feature, the SSBL project must be compiled -with: - -- `gSimpleHashVerification=1` - -and update the post-build command to use simple hash verification instead of the -default options. Go to -`Project -> Properties -> C/C++ Build -> Settings -> Build steps` and press -`Edit` under `Post-build steps` subsection. The command should look similar to: - -![SSBL_SIMPLE_HASH_VERIFICATION](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_simple_hash.JPG) - -Once compiled, the required SSBL file is called `k32w061dk6_ssbl.bin`. - -![SSBL_BIN](../../../../platform/nxp/k32w/k32w0/doc/images/ssbl_bin.JPG) - -Before writing the SSBL, it it recommanded to fully erase the internal flash: - -``` -DK6Programmer.exe -V 5 -P 1000000 -s -e Flash -``` - -`k32w061dk6_ssbl.bin` must be written at address 0 in the internal flash: - -``` -DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x00="k32w061dk6_ssbl.bin" -``` - -### Writing the PSECT - -This is the list of all supported partitions: - -``` -0000000010000000 : SSBL partition - - 00000000 -----------> Start Address - 1000 ---------------> 0x0010 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - 00 -----------------> 0x00 Image type (0x00 = SSBL) - -00400000c9040101: Application partition - - 00400000 -----------> 0x00004000 Start Address - c904 ---------------> 0x04c9 Number of 512-bytes pages - 01 -----------------> 0x01 Bootable flag - 01 -----------------> 0x01 Image type (0x01 = Application) - -00000010800000fe: Ext Flash text partition - - 00000010 -----------> 0x10000000 Start Address (external flash) - 8000 ---------------> 0x0080 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fe -----------------> 0xFE Image type (0xFE = Ext Flash text) - -00000110300200fc : OTA Image partition - - 00000110 -----------> 0x10010000 Start Address - 3002----------------> 0x0230 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fc -----------------> 0xFC Image type (0xFC = OTA partition) - -00000510100000fd: NVM partition - - 00000510 -----------> 0x10050000 Start Address - 1000 ---------------> 0x0010 Number of 512-bytes pages - 00 -----------------> 0x00 Bootable flag - fd -----------------> 0xFD Image type (0xFD = NVM partition) -``` - -First, image directory 0 (SSBL partition) must be written: - -``` -DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_0=0000000010000000 -``` - -Here is the interpretation of the fields: - -``` -00000000 -> start address 0x00000000 -1000 -> size = 0x0010 pages of 512-bytes (= 8kB) -00 -> not bootable (only used by the SSBL to support SSBL update) -00 -> SSBL Image Type -``` - -Second, image directory 1 (application partition) must be written: - -``` -DK6Programmer.exe -V5 -s -P 1000000 -w image_dir_1=00400000C9040101 -``` - -Here is the interpretation of the fields: - -``` -00400000 -> start address 0x00004000 -C904 -> 0x4C9 pages of 512-bytes (= 612.5kB) -01 -> bootable flag -01 -> image type for the application -``` - -Please note the user can write additional partitions by writing -`image_dir_2/3/4` with the wanted configuration. - -### Writing the application - -DK6Programmer can be used for flashing the application: - -``` -DK6Programmer.exe -V2 -s -P 1000000 -Y -p FLASH@0x4000="chip-k32w0x-light-example.bin" -``` +The internal flash needs to be prepared for the OTA process. First 16K of the +internal flash needs to be populated with SSBL related data while the last 8.5K +of flash space is holding flash configuration related data. The space between +these two zones will be filled by the application. More details regarding the +internal flash space can be found in the +[linker file](../../../../third_party/nxp/nxp_matter_support/examples/platform/k32w0/app/ldscripts/chip-k32w0x-linker.ld). -If debugging is needed, MCUXpresso can be used then for flashing the -application. Please make sure that the application is written at address 0x4000: +The steps for building the SSBL binary with appropriate configuration and +writing to the board the binary and other OTA related configurations are +described in the +[K32W0x1 OTA guide](../../../../docs/guides/nxp/nxp_k32w0_ota_guide.md). -![FLASH_LOCATION](../../../../platform/nxp/k32w/k32w0/doc/images/flash_location.JPG) +Note that the application needs to be built using the +`chip_enable_ota_requestor=true` option. This is enabled in the configuration by +default if no `chip_enable_ota_requestor` explicit setting is done. ### OTA Testing The OTA topology used for OTA testing is illustrated in the figure below. Topology is similar with the one used for Matter Test Events. -![OTA_TOPOLOGY](../../../../platform/nxp/k32w/k32w0/doc/images/ota_topology.JPG) +![OTA_TOPOLOGY](../../../platform/nxp/k32w0/doc/images/ota_topology.JPG) The concept for OTA is the next one: @@ -701,21 +683,22 @@ The address for storing the custom OTA entry can also be specified: address that does not overlap with anything else. Please see more in the -[OTA image tool guide](../../../../../scripts/tools/nxp/ota/README.md). +[OTA image tool guide](../../../../scripts/tools/nxp/ota/README.md). Here is an example that generates an OTA image with application update TLV: ``` -./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 42021 -vs "1.0" -da sha256 --app-input-file chip-k32w0x-light-example.bin chip-k32w0x-light-example.ota +./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 2 -vs "2.0" -da sha256 --app-input-file chip-k32w0x-light-example.bin chip-k32w0x-light-example.ota ``` A note regarding OTA image header version (`-vn` option). An application binary has its own software version, given by -`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` (`42020` by default), which can be +`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` (`1` by default), which can be overwritten. For having a correct OTA process, the OTA header version should be -the same as the binary embedded software version. A user can set a custom -software version in the gn build args by setting `chip_software_version` to the -wanted version. +the same as the binary embedded software version. When building the update +image, the build arguments `nxp_software_version=2` and +`nxp_sofware_version_string=\"2.0\"` can be added to the gn gen command in order +to specify the upgraded version. Start the OTA Provider Application: @@ -745,7 +728,7 @@ Start the OTA process: user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-otaprovider 1 0 0 0 2 0 ``` -## Known issues ota +### Known issues OTA - SRP cache on the openthread border router needs to flushed each time a new commissioning process is attempted. For this, factory reset the device, then diff --git a/examples/lighting-app/nxp/k32w/k32w0/args.gni b/examples/lighting-app/nxp/k32w0/args.gni similarity index 96% rename from examples/lighting-app/nxp/k32w/k32w0/args.gni rename to examples/lighting-app/nxp/k32w0/args.gni index f5fd7a83cd9005..7126cf38ad5f3b 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/args.gni +++ b/examples/lighting-app/nxp/k32w0/args.gni @@ -20,6 +20,7 @@ k32w0_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_ota_requestor = true chip_stack_lock_tracking = "fatal" chip_enable_ble = true +chip_generate_link_map_file = true is_debug = false diff --git a/examples/lighting-app/nxp/k32w0/build_overrides b/examples/lighting-app/nxp/k32w0/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lighting-app/nxp/k32w0/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h b/examples/lighting-app/nxp/k32w0/include/CHIPProjectConfig.h similarity index 97% rename from examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h rename to examples/lighting-app/nxp/k32w0/include/CHIPProjectConfig.h index e32575e55ff5c4..62b2b0273f1da4 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/include/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/k32w0/include/CHIPProjectConfig.h @@ -86,7 +86,7 @@ 0xe4, 0x76, 0x1b, 0xfd, 0x05, \ } -// All remaining data will be pulled from provisioning region of flash. +// All remaining data will be pulled from the provisioning region of flash. #endif #else @@ -146,11 +146,11 @@ * {MAJOR_VERSION}.0d{MINOR_VERSION} */ #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "03-2022-te8" +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING #endif #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION -#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 42020 +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION #endif #ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME diff --git a/examples/lighting-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h b/examples/lighting-app/nxp/k32w0/include/FreeRTOSConfig.h similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/include/FreeRTOSConfig.h rename to examples/lighting-app/nxp/k32w0/include/FreeRTOSConfig.h diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp similarity index 98% rename from examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp rename to examples/lighting-app/nxp/k32w0/main/AppTask.cpp index 22535a1c974c92..7db25b0a7c0451 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -44,9 +43,10 @@ #include #include #include -#include +#include #endif +#include "DefaultTestEventTriggerDelegate.h" #include "Keyboard.h" #include "LED.h" #include "LEDWidget.h" @@ -116,7 +116,7 @@ static BDXDownloader gDownloader; constexpr uint16_t requestedOtaBlockSize = 1024; #endif -#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR CHIP_ERROR CustomFactoryDataRestoreMechanism(void) { K32W_LOG("This is a custom factory data restore mechanism."); @@ -151,7 +151,7 @@ static void CheckOtaEntry() if (ota_entries.ota_state == otaApplied) { K32W_LOG("OTA successfully applied"); -#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA && CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR // If this point is reached, it means OTA_CommitCustomEntries was successfully called. // Delete the factory data backup to stop doing a restore when the factory data provider // is initialized. This ensures that both the factory data and app were updated, otherwise @@ -187,9 +187,8 @@ CHIP_ERROR AppTask::Init() CheckOtaEntry(); #endif - // Initialize device attestation config #if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA -#if CONFIG_CHIP_K32W0_OTA_FACTORY_DATA_PROCESSOR +#if CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR sFactoryDataProvider.RegisterRestoreMechanism(CustomFactoryDataRestoreMechanism); #endif ReturnErrorOnFailure(sFactoryDataProvider.Init()); diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/LightingManager.cpp b/examples/lighting-app/nxp/k32w0/main/LightingManager.cpp similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/main/LightingManager.cpp rename to examples/lighting-app/nxp/k32w0/main/LightingManager.cpp diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp b/examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/main/ZclCallbacks.cpp rename to examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/include/AppEvent.h b/examples/lighting-app/nxp/k32w0/main/include/AppEvent.h similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/main/include/AppEvent.h rename to examples/lighting-app/nxp/k32w0/main/include/AppEvent.h diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h b/examples/lighting-app/nxp/k32w0/main/include/AppTask.h similarity index 95% rename from examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h rename to examples/lighting-app/nxp/k32w0/main/include/AppTask.h index 0c455f431a8cf4..7dca1f700f6b89 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/include/AppTask.h +++ b/examples/lighting-app/nxp/k32w0/main/include/AppTask.h @@ -27,7 +27,7 @@ #include "CHIPProjectConfig.h" #if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA -#include +#include #if CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER #include "CustomFactoryDataProvider.h" #endif @@ -50,6 +50,9 @@ class AppTask { public: +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + using FactoryDataProvider = chip::DeviceLayer::FactoryDataProviderImpl; +#endif CHIP_ERROR StartAppTask(); static void AppTaskMain(void * pvParameter); diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/include/LightingManager.h b/examples/lighting-app/nxp/k32w0/main/include/LightingManager.h similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/main/include/LightingManager.h rename to examples/lighting-app/nxp/k32w0/main/include/LightingManager.h diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/include/app_config.h b/examples/lighting-app/nxp/k32w0/main/include/app_config.h similarity index 100% rename from examples/lighting-app/nxp/k32w/k32w0/main/include/app_config.h rename to examples/lighting-app/nxp/k32w0/main/include/app_config.h diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp b/examples/lighting-app/nxp/k32w0/main/main.cpp similarity index 97% rename from examples/lighting-app/nxp/k32w/k32w0/main/main.cpp rename to examples/lighting-app/nxp/k32w0/main/main.cpp index a8963a17c09096..6d95f10fe1168b 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/main.cpp +++ b/examples/lighting-app/nxp/k32w0/main/main.cpp @@ -139,7 +139,7 @@ extern "C" void main_task(void const * argument) */ sched_enable(); - err = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice); + err = ConnectivityMgr().SetThreadDeviceType(CONNECTIVITY_MANAGER_THREAD_DEVICE_TYPE); if (err != CHIP_NO_ERROR) { goto exit; diff --git a/examples/lighting-app/nxp/k32w0/third_party/connectedhomeip b/examples/lighting-app/nxp/k32w0/third_party/connectedhomeip new file mode 120000 index 00000000000000..3efed95be5dbe9 --- /dev/null +++ b/examples/lighting-app/nxp/k32w0/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../../ \ No newline at end of file diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index f3f3aa85fa80a7..1f88cfb7687610 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index fbc6127e636ab5..6add567a134707 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 246770a4b57bd2..d0e06e94f94dac 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 179a3832a5e732..a9d48f8ae85b3c 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; 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 f8db39db377c91..e76ccb9372798d 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/lock-app/cc13x4_26x4/README.md b/examples/lock-app/cc13x4_26x4/README.md index 7ff622a8e14f90..c7d15dcc8533fe 100644 --- a/examples/lock-app/cc13x4_26x4/README.md +++ b/examples/lock-app/cc13x4_26x4/README.md @@ -109,7 +109,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming diff --git a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp index b26bd6ae43f8c1..f210aaf1a6e1de 100644 --- a/examples/lock-app/cc13x4_26x4/src/AppTask.cpp +++ b/examples/lock-app/cc13x4_26x4/src/AppTask.cpp @@ -94,8 +94,10 @@ void uiLocked(void); void uiUnlocking(void); void uiUnlocked(void); +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs); void CancelTimer(void); +#endif uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; @@ -118,10 +120,11 @@ void InitializeOTARequestor(void) sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); } -#endif TimerHandle_t sOTAInitTimer = 0; +#endif + // The OTA Init Timer is only started upon the first Thread State Change // detected if the device is already on a Thread Network, or during the AppTask // Init sequence if the device is not yet on a Thread Network. Once the timer @@ -207,10 +210,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void OTAInitTimerEventHandler(TimerHandle_t xTimer) { InitializeOTARequestor(); } +#endif int AppTask::Init() { @@ -230,6 +235,7 @@ int AppTask::Init() ; } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Create FreeRTOS sw timer for OTA timer. sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) @@ -246,6 +252,7 @@ int AppTask::Init() { PLAT_LOG("sOTAInitTimer timer created successfully "); } +#endif ret = ThreadStackMgr().InitThreadStack(); if (ret != CHIP_NO_ERROR) @@ -418,6 +425,7 @@ void AppTask::AppTaskMain(void * pvParameter) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs) { PLAT_LOG("Start OTA Init Timer") @@ -443,6 +451,7 @@ void CancelTimer(void) PLAT_LOG("sOTAInitTimer stop() failed"); } } +#endif void AppTask::ActionInitiated(LockManager::Action_t aAction) { diff --git a/examples/lock-app/infineon/psoc6/README.md b/examples/lock-app/infineon/psoc6/README.md index b1e1e1a0e9ac6b..0c8e8eb1e8c781 100644 --- a/examples/lock-app/infineon/psoc6/README.md +++ b/examples/lock-app/infineon/psoc6/README.md @@ -33,10 +33,11 @@ will then join the network. ## Building -- [Modustoolbox Software](https://www.cypress.com/products/modustoolbox) +- Download and install + [Modustoolbox Software v3.2](https://www.infineon.com/modustoolbox) - Refer to `integrations/docker/images/chip-build-infineon/Dockerfile` or - `scripts/examples/gn_psoc6_example.sh` for downloading the Software and + Refer to `integrations/docker/images/stage-2/chip-build-infineon/Dockerfile` + or `scripts/examples/gn_psoc6_example.sh` for downloading the Software and related tools. - Install some additional tools (likely already present for Matter @@ -45,7 +46,7 @@ will then join the network. python3-pip - Supported hardware: - [CY8CKIT-062S2-43012](https://www.cypress.com/CY8CKIT-062S2-43012) + [CY8CKIT-062S2-43012](https://www.infineon.com/CY8CKIT-062S2-43012) * Build the example application: @@ -66,11 +67,12 @@ more instructions_ - Put CY8CKIT-062S2-43012 board on KitProg3 CMSIS-DAP Mode by pressing the `MODE SELECT` button. `KITPROG3 STATUS` LED is ON confirms board is in - proper mode. + proper mode. (Modustoolbox Software needs to be installed) - On the command line: $ cd ~/connectedhomeip + $ export CY_TOOLS_PATHS=/tools_3.2 $ python3 out/infineon-psoc6-lock/chip-psoc6-lock-example.flash.py ## Commissioning and cluster control @@ -116,12 +118,12 @@ commands. These power cycle the BlueTooth hardware and disable BR/EDR mode. ### Cluster control -- After successful commissioning, use the OnOff cluster command to toggle - device between On or Off states. +- After successful commissioning, use the doorlock cluster command to toggle + device between lock or Unlock states. - `$ ./out/debug/chip-tool onoff on 1234 1` + `$ ./out/debug/chip-tool doorlock lock-door 1234 1 --timedInteractionTimeoutMs 100` - `$ ./out/debug/chip-tool onoff off 1234 1` + `$ ./out/debug/chip-tool doorlock unlock-door 1234 1 --timedInteractionTimeoutMs 100` - Cluster OnOff can also be done using the `USER_BTN1` button on the board. This button is configured with `APP_LOCK_BUTTON` in `include/AppConfig.h`. diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 5ee4744f901fde..a925bf75f55255 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -3079,11 +3295,20 @@ endpoint 1 { ram attribute wrongCodeEntryLimit default = 3; ram attribute userCodeTemporaryDisableTime default = 10; ram attribute requirePINforRemoteOperation default = 0; + callback attribute aliroReaderVerificationKey; + callback attribute aliroReaderGroupIdentifier; + callback attribute aliroReaderGroupSubIdentifier; + callback attribute aliroExpeditedTransactionSupportedProtocolVersions; + callback attribute aliroGroupResolvingKey; + callback attribute aliroSupportedBLEUWBProtocolVersions; + callback attribute aliroBLEAdvertisingVersion; + callback attribute numberOfAliroCredentialIssuerKeysSupported; + callback attribute numberOfAliroEndpointKeysSupported; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x1DB3; + ram attribute featureMap default = 0x7DB3; ram attribute clusterRevision default = 7; handle command LockDoor; @@ -3111,6 +3336,8 @@ endpoint 1 { handle command GetCredentialStatusResponse; handle command ClearCredential; handle command UnboltDoor; + handle command SetAliroReaderConfig; + handle command ClearAliroReaderConfig; } } diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 8e25d9248c1429..30fe0db47c2fa8 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -5851,6 +5851,22 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "SetAliroReaderConfig", + "code": 40, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ClearAliroReaderConfig", + "code": 41, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 } ], "attributes": [ @@ -6270,6 +6286,150 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "AliroReaderVerificationKey", + "code": 128, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroReaderGroupIdentifier", + "code": 129, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroReaderGroupSubIdentifier", + "code": 130, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroExpeditedTransactionSupportedProtocolVersions", + "code": 131, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroGroupResolvingKey", + "code": 132, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroSupportedBLEUWBProtocolVersions", + "code": 133, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AliroBLEAdvertisingVersion", + "code": 134, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfAliroCredentialIssuerKeysSupported", + "code": 135, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfAliroEndpointKeysSupported", + "code": 136, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -6344,7 +6504,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1DB3", + "defaultValue": "0x7DB3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index f44c1531169ae0..cb2cbcc52f3263 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index 18ef74944ebc63..ee7a955db20f4b 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/log-source-app/linux/main.cpp b/examples/log-source-app/linux/main.cpp index 20ed1c54b5b215..d39e4431e86525 100644 --- a/examples/log-source-app/linux/main.cpp +++ b/examples/log-source-app/linux/main.cpp @@ -110,7 +110,7 @@ int main(int argc, char * argv[]) // Initialize device attestation config SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); - CommandHandlerInterfaceRegistry::RegisterCommandHandler(&GetLogProvider()); + CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler(&GetLogProvider()); chip::DeviceLayer::PlatformMgr().RunEventLoop(); 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 829e40f870c1a3..e9baa7757f53eb 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** The Access Control Cluster exposes a data model view of a Node's Access Control List (ACL), which codifies the rules used to manage and enforce Access Control for the Node's endpoints and their associated diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index bdfe6910c5cffd..cea8d411735738 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/network-manager-app/linux/BUILD.gn b/examples/network-manager-app/linux/BUILD.gn index ea973edfbfd15c..0d260d6c5d560c 100644 --- a/examples/network-manager-app/linux/BUILD.gn +++ b/examples/network-manager-app/linux/BUILD.gn @@ -19,6 +19,7 @@ executable("matter-network-manager-app") { sources = [ "include/CHIPProjectAppConfig.h", "main.cpp", + "tbrm.cpp", ] deps = [ diff --git a/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h index 6fa4c82568eb70..1ef9862a272938 100644 --- a/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h +++ b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h @@ -18,7 +18,7 @@ #pragma once -#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0xFFF10010 // TODO: ID-TBD +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 144 // 0x0090 Network Infrastructure Manager #define CHIP_DEVICE_CONFIG_DEVICE_NAME "Network Infrastructure Manager" // Inherit defaults from config/standalone/CHIPProjectConfig.h diff --git a/examples/network-manager-app/linux/tbrm.cpp b/examples/network-manager-app/linux/tbrm.cpp new file mode 100644 index 00000000000000..908666ee61d8a0 --- /dev/null +++ b/examples/network-manager-app/linux/tbrm.cpp @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace chip; +using namespace chip::literals; +using namespace chip::app; +using namespace chip::app::Clusters; + +namespace { +class FakeBorderRouterDelegate final : public ThreadBorderRouterManagement::Delegate +{ + CHIP_ERROR Init(AttributeChangeCallback * attributeChangeCallback) override + { + mAttributeChangeCallback = attributeChangeCallback; + return CHIP_NO_ERROR; + } + + bool GetPanChangeSupported() override { return true; } + + void GetBorderRouterName(MutableCharSpan & borderRouterName) override + { + CopyCharSpanToMutableCharSpan("netman-br"_span, borderRouterName); + } + + CHIP_ERROR GetBorderAgentId(MutableByteSpan & borderAgentId) override + { + static constexpr uint8_t kBorderAgentId[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; + VerifyOrReturnError(borderAgentId.size() == 16, CHIP_ERROR_INVALID_ARGUMENT); + return CopySpanToMutableSpan(ByteSpan(kBorderAgentId), borderAgentId); + } + + uint16_t GetThreadVersion() override { return /* Thread 1.3.1 */ 5; } + + bool GetInterfaceEnabled() override { return !mActiveDataset.IsEmpty(); } + + CHIP_ERROR GetDataset(Thread::OperationalDataset & dataset, DatasetType type) override + { + Thread::OperationalDataset * source; + switch (type) + { + case DatasetType::kActive: + source = &mActiveDataset; + break; + case DatasetType::kPending: + source = &mPendingDataset; + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + VerifyOrReturnError(!source->IsEmpty(), CHIP_ERROR_NOT_FOUND); + return dataset.Init(source->AsByteSpan()); + } + + void SetActiveDataset(const Thread::OperationalDataset & activeDataset, uint32_t sequenceNum, + ActivateDatasetCallback * callback) override + { + if (mActivateDatasetCallback != nullptr) + { + callback->OnActivateDatasetComplete(sequenceNum, CHIP_ERROR_INCORRECT_STATE); + return; + } + + CHIP_ERROR err = mActiveDataset.Init(activeDataset.AsByteSpan()); + if (err != CHIP_NO_ERROR) + { + callback->OnActivateDatasetComplete(sequenceNum, err); + return; + } + + mActivateDatasetCallback = callback; + mActivateDatasetSequence = sequenceNum; + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(3000), CompleteDatasetActivation, this); + } + + CHIP_ERROR CommitActiveDataset() override { return CHIP_NO_ERROR; } + CHIP_ERROR RevertActiveDataset() override { return CHIP_ERROR_NOT_IMPLEMENTED; } + CHIP_ERROR SetPendingDataset(const Thread::OperationalDataset & pendingDataset) override { return CHIP_ERROR_NOT_IMPLEMENTED; } + +private: + static void CompleteDatasetActivation(System::Layer *, void * context) + { + auto * self = static_cast(context); + auto * callback = self->mActivateDatasetCallback; + auto sequenceNum = self->mActivateDatasetSequence; + self->mActivateDatasetCallback = nullptr; + callback->OnActivateDatasetComplete(sequenceNum, CHIP_NO_ERROR); + } + + AttributeChangeCallback * mAttributeChangeCallback; + Thread::OperationalDataset mActiveDataset; + Thread::OperationalDataset mPendingDataset; + + ActivateDatasetCallback * mActivateDatasetCallback = nullptr; + uint32_t mActivateDatasetSequence; +}; + +FakeBorderRouterDelegate gBorderRouterDelegate{}; +} // namespace + +std::optional gThreadBorderRouterManagementServer; +void emberAfThreadBorderRouterManagementClusterInitCallback(EndpointId endpoint) +{ + VerifyOrDie(!gThreadBorderRouterManagementServer); + gThreadBorderRouterManagementServer.emplace(endpoint, &gBorderRouterDelegate, Server::GetInstance().GetFailSafeContext()) + .Init(); +} diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index f8600afd71dc8c..3f24e4be5744c6 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1289,6 +1505,50 @@ provisional cluster WiFiNetworkManagement = 1105 { command access(invoke: manage) NetworkPassphraseRequest(): NetworkPassphraseResponse = 0; } +/** Manage the Thread network of Thread Border Router */ +provisional cluster ThreadBorderRouterManagement = 1106 { + revision 1; + + bitmap Feature : bitmap32 { + kPANChange = 0x1; + } + + provisional readonly attribute char_string<63> borderRouterName = 0; + provisional readonly attribute octet_string<254> borderAgentID = 1; + provisional readonly attribute int16u threadVersion = 2; + provisional readonly attribute boolean interfaceEnabled = 3; + provisional readonly attribute nullable int64u activeDatasetTimestamp = 4; + provisional readonly attribute nullable int64u pendingDatasetTimestamp = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct DatasetResponse = 2 { + octet_string<254> dataset = 0; + } + + request struct SetActiveDatasetRequestRequest { + octet_string<254> activeDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct SetPendingDatasetRequestRequest { + octet_string<254> pendingDataset = 0; + } + + /** Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */ + command access(invoke: manage) GetActiveDatasetRequest(): DatasetResponse = 0; + /** Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */ + command access(invoke: manage) GetPendingDatasetRequest(): DatasetResponse = 1; + /** Command to set or update the active Dataset of the Thread network to which the Border Router is connected. */ + command access(invoke: manage) SetActiveDatasetRequest(SetActiveDatasetRequestRequest): DefaultSuccess = 3; + /** Command set or update the pending Dataset of the Thread network to which the Border Router is connected. */ + command access(invoke: manage) SetPendingDatasetRequest(SetPendingDatasetRequestRequest): DefaultSuccess = 4; +} + /** Manages the names and credentials of Thread networks visible to the user. */ provisional cluster ThreadNetworkDirectory = 1107 { revision 1; @@ -1614,6 +1874,26 @@ endpoint 1 { handle command NetworkPassphraseResponse; } + server cluster ThreadBorderRouterManagement { + callback attribute borderRouterName; + callback attribute borderAgentID; + callback attribute threadVersion; + callback attribute interfaceEnabled; + callback attribute activeDatasetTimestamp; + callback attribute pendingDatasetTimestamp; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command GetActiveDatasetRequest; + handle command GetPendingDatasetRequest; + handle command DatasetResponse; + handle command SetActiveDatasetRequest; + } + server cluster ThreadNetworkDirectory { callback attribute preferredExtendedPanID; callback attribute threadNetworks; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap index 64113c969dd774..7c1445ac46c190 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.zap +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -3217,6 +3217,7 @@ "define": "WIFI_NETWORK_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { "name": "NetworkPassphraseRequest", @@ -3366,6 +3367,243 @@ } ] }, + { + "name": "Thread Border Router Management", + "code": 1106, + "mfgCode": null, + "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "GetActiveDatasetRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetPendingDatasetRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "DatasetResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetActiveDatasetRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BorderRouterName", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BorderAgentID", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveDatasetTimestamp", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingDatasetTimestamp", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Thread Network Directory", "code": 1107, @@ -3373,6 +3611,7 @@ "define": "THREAD_NETWORK_DIRECTORY_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { "name": "AddNetwork", 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 4385f8b6d252df..a066629c9f4ae1 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; 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 4afe132a484702..3412f30a29b1f9 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 665714e076ed91..b72a4b280351b9 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -2465,6 +2681,7 @@ cluster BridgedDeviceBasicInformation = 57 { readonly attribute optional char_string<32> vendorName = 1; readonly attribute optional vendor_id vendorID = 2; readonly attribute optional char_string<32> productName = 3; + readonly attribute optional int16u productID = 4; attribute optional char_string<32> nodeLabel = 5; readonly attribute optional int16u hardwareVersion = 7; readonly attribute optional char_string<64> hardwareVersionString = 8; @@ -4875,7 +5092,7 @@ cluster PumpConfigurationAndControl = 512 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -4921,7 +5138,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -4994,7 +5210,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5004,6 +5219,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -5069,7 +5288,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -5101,23 +5320,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5158,8 +5377,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5199,33 +5417,37 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -5271,7 +5493,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -5344,7 +5565,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5354,6 +5574,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -5419,7 +5643,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -5451,23 +5675,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5508,8 +5732,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5549,28 +5772,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -6410,7 +6637,7 @@ cluster RelativeHumidityMeasurement = 1029 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -8009,6 +8236,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { @@ -8068,6 +8298,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { @@ -9362,8 +9595,8 @@ endpoint 1 { ram attribute physicalContactOccupiedToUnoccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 4; + callback attribute featureMap; + callback attribute clusterRevision default = 5; } } diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index e16b695e63f9e4..1a21bd9533419b 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -15100,7 +15100,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index d1fd025cef5bff..41421c7e917d0e 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -2422,6 +2638,7 @@ cluster BridgedDeviceBasicInformation = 57 { readonly attribute optional char_string<32> vendorName = 1; readonly attribute optional vendor_id vendorID = 2; readonly attribute optional char_string<32> productName = 3; + readonly attribute optional int16u productID = 4; attribute optional char_string<32> nodeLabel = 5; readonly attribute optional int16u hardwareVersion = 7; readonly attribute optional char_string<64> hardwareVersionString = 8; @@ -4832,7 +5049,7 @@ cluster PumpConfigurationAndControl = 512 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -4878,7 +5095,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -4951,7 +5167,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4961,6 +5176,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -5026,7 +5245,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -5058,23 +5277,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5115,8 +5334,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5156,33 +5374,37 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -5228,7 +5450,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -5301,7 +5522,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5311,6 +5531,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -5376,7 +5600,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -5408,23 +5632,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5465,8 +5689,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5506,28 +5729,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -6367,7 +6594,7 @@ cluster RelativeHumidityMeasurement = 1029 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; @@ -7966,6 +8193,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { @@ -8025,6 +8255,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { @@ -9301,8 +9534,8 @@ endpoint 1 { ram attribute physicalContactOccupiedToUnoccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedDelay default = 0x00; ram attribute physicalContactUnoccupiedToOccupiedThreshold default = 1; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 4; + callback attribute featureMap; + callback attribute clusterRevision default = 5; } } diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 56e97fa89a0ab1..9bc81ae46fea4c 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -14860,7 +14860,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "4", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/placeholder/linux/src/bridged-actions-stub.cpp b/examples/placeholder/linux/src/bridged-actions-stub.cpp index ea6e824738a857..d7abf17cd9106e 100644 --- a/examples/placeholder/linux/src/bridged-actions-stub.cpp +++ b/examples/placeholder/linux/src/bridged-actions-stub.cpp @@ -98,5 +98,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr void MatterActionsPluginServerInitCallback(void) { - registerAttributeAccessOverride(&gAttrAccess); + chip::app::AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess); } diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp index 7203a0cd6a92cf..2dfcffef3dece8 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.cpp +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.cpp @@ -84,6 +84,14 @@ void CommonDeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, i // newly selected address. chip::app::DnssdServer::Instance().StartServer(); } + if (event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned) + { + appDelegate = DeviceCallbacksDelegate::Instance().GetAppDelegate(); + if (appDelegate != nullptr) + { + appDelegate->OnIPv6ConnectivityEstablished(); + } + } break; } diff --git a/examples/platform/esp32/common/CommonDeviceCallbacks.h b/examples/platform/esp32/common/CommonDeviceCallbacks.h index f76cdc405aa80e..de6770f1ee311d 100644 --- a/examples/platform/esp32/common/CommonDeviceCallbacks.h +++ b/examples/platform/esp32/common/CommonDeviceCallbacks.h @@ -41,6 +41,7 @@ class DeviceCallbacksDelegate virtual void OnIPv4ConnectivityEstablished() {} virtual void OnIPv4ConnectivityLost() {} virtual void OnDnssdInitialized() {} + virtual void OnIPv6ConnectivityEstablished() {} DeviceCallbacksDelegate * mDelegate = nullptr; void SetAppDelegate(DeviceCallbacksDelegate * delegate) { mDelegate = delegate; } DeviceCallbacksDelegate * GetAppDelegate() { return mDelegate; } diff --git a/examples/platform/esp32/common/Esp32AppServer.cpp b/examples/platform/esp32/common/Esp32AppServer.cpp index 8ee5d4d7a05a27..f0e75cfef62e24 100644 --- a/examples/platform/esp32/common/Esp32AppServer.cpp +++ b/examples/platform/esp32/common/Esp32AppServer.cpp @@ -51,7 +51,6 @@ using namespace chip::DeviceLayer; static constexpr char TAG[] = "ESP32Appserver"; namespace { - #if CONFIG_TEST_EVENT_TRIGGER_ENABLED static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, @@ -103,8 +102,10 @@ static size_t hex_string_to_binary(const char * hex_string, uint8_t * buf, size_ void Esp32AppServer::DeInitBLEIfCommissioned(void) { #ifdef CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING - if (chip::Server::GetInstance().GetFabricTable().FabricCount() > 0) + static bool bleAlreadyShutdown = false; + if (chip::Server::GetInstance().GetFabricTable().FabricCount() > 0 && (!bleAlreadyShutdown)) { + bleAlreadyShutdown = true; chip::DeviceLayer::Internal::BLEMgr().Shutdown(); } #endif /* CONFIG_USE_BLE_ONLY_FOR_COMMISSIONING */ diff --git a/examples/platform/esp32/common/Esp32ThreadInit.cpp b/examples/platform/esp32/common/Esp32ThreadInit.cpp index 6964598649e519..f02f91c06d5538 100644 --- a/examples/platform/esp32/common/Esp32ThreadInit.cpp +++ b/examples/platform/esp32/common/Esp32ThreadInit.cpp @@ -21,6 +21,9 @@ #include #include #endif // CONFIG_OPENTHREAD_ENABLED +#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#include +#endif #include #if CONFIG_PM_ENABLE @@ -39,6 +42,18 @@ void ESPOpenThreadInit() .host_config = ESP_OPENTHREAD_DEFAULT_HOST_CONFIG(), .port_config = ESP_OPENTHREAD_DEFAULT_PORT_CONFIG(), }; +#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER + esp_vfs_spiffs_conf_t rcp_fw_conf = { + .base_path = "/rcp_fw", .partition_label = "rcp_fw", .max_files = 10, .format_if_mount_failed = false + }; + if (ESP_OK != esp_vfs_spiffs_register(&rcp_fw_conf)) + { + ESP_LOGE(TAG, "Failed to mount rcp firmware storage"); + return; + } + esp_rcp_update_config_t rcp_update_config = ESP_OPENTHREAD_RCP_UPDATE_CONFIG(); + openthread_init_br_rcp(&rcp_update_config); +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER set_openthread_platform_config(&config); if (ThreadStackMgr().InitThreadStack() != CHIP_NO_ERROR) diff --git a/examples/platform/esp32/common/Esp32ThreadInit.h b/examples/platform/esp32/common/Esp32ThreadInit.h index f6edba24b2b82f..affca51392f65a 100644 --- a/examples/platform/esp32/common/Esp32ThreadInit.h +++ b/examples/platform/esp32/common/Esp32ThreadInit.h @@ -22,10 +22,57 @@ #if CONFIG_OPENTHREAD_ENABLED #include "esp_openthread_types.h" +#if CONFIG_OPENTHREAD_RADIO_NATIVE #define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ { \ .radio_mode = RADIO_MODE_NATIVE, \ } +#elif CONFIG_OPENTHREAD_RADIO_SPINEL_UART +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_UART_RCP, \ + .radio_uart_config = { \ + .port = UART_NUM_1, \ + .uart_config = \ + { \ + .baud_rate = 460800, \ + .data_bits = UART_DATA_8_BITS, \ + .parity = UART_PARITY_DISABLE, \ + .stop_bits = UART_STOP_BITS_1, \ + .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \ + .rx_flow_ctrl_thresh = 0, \ + .source_clk = UART_SCLK_DEFAULT, \ + }, \ + .rx_pin = GPIO_NUM_17, \ + .tx_pin = GPIO_NUM_18, \ + }, \ + } +#else +#define ESP_OPENTHREAD_DEFAULT_RADIO_CONFIG() \ + { \ + .radio_mode = RADIO_MODE_SPI_RCP, \ + .radio_spi_config = { \ + .host_device = SPI2_HOST, \ + .dma_channel = 2, \ + .spi_interface = \ + { \ + .mosi_io_num = 11, \ + .sclk_io_num = 12, \ + .miso_io_num = 13, \ + }, \ + .spi_device = \ + { \ + .cs_ena_pretrans = 2, \ + .input_delay_ns = 100, \ + .mode = 0, \ + .clock_speed_hz = 2500 * 1000, \ + .spics_io_num = 10, \ + .queue_size = 5, \ + }, \ + .intr_pin = 8, \ + }, \ + } +#endif // CONFIG_OPENTHREAD_RADIO_SPINEL_UART OR CONFIG_OPENTHREAD_RADIO_SPINEL_SPI #define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \ { \ @@ -36,6 +83,18 @@ { \ .storage_partition_name = "nvs", .netif_queue_size = 10, .task_queue_size = 10, \ } + +#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#include +#define RCP_FIRMWARE_DIR "/spiffs/ot_rcp" + +#define ESP_OPENTHREAD_RCP_UPDATE_CONFIG() \ + { \ + .rcp_type = RCP_TYPE_ESP32H2_UART, .uart_rx_pin = 17, .uart_tx_pin = 18, .uart_port = 1, .uart_baudrate = 115200, \ + .reset_pin = 7, .boot_pin = 8, .update_baudrate = 460800, .firmware_dir = "/rcp_fw/ot_rcp", .target_chip = ESP32H2_CHIP, \ + } +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER + #endif // CONFIG_OPENTHREAD_ENABLED void ESPOpenThreadInit(); diff --git a/examples/platform/esp32/external_platform/ESP32_custom/BUILD.gn b/examples/platform/esp32/external_platform/ESP32_custom/BUILD.gn index 93b00ef8f81617..d8d2f92b542ac7 100644 --- a/examples/platform/esp32/external_platform/ESP32_custom/BUILD.gn +++ b/examples/platform/esp32/external_platform/ESP32_custom/BUILD.gn @@ -29,7 +29,6 @@ declare_args() { chip_bt_bluedroid_enabled = true chip_max_discovered_ip_addresses = 5 chip_enable_route_hook = false - chip_enable_thread_border_router = false } buildconfig_header("custom_buildconfig") { diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 410b1a189245d2..1fcee183f131b3 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -93,7 +93,7 @@ source_set("app-main") { "${chip_root}/src/controller:controller", "${chip_root}/src/controller:gen_check_chip_controller_headers", "${chip_root}/src/lib", - "${chip_root}/src/platform/logging:stdio", + "${chip_root}/src/platform/logging:default", ] deps = [ ":ota-test-event-trigger", diff --git a/examples/platform/nxp/k32w/k32w0/BUILD.gn b/examples/platform/nxp/k32w/k32w0/BUILD.gn deleted file mode 100644 index eb0c79742f3b99..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/BUILD.gn +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") -import("//build_overrides/nxp_sdk.gni") - -import("${nxp_sdk_build_root}/nxp_sdk.gni") - -import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") - -config("chip_examples_project_config") { - include_dirs = [ - "app/project_include", - "${chip_root}", - ] -} - -source_set("openthread_core_config_k32w0_chip_examples") { - sources = [ "app/project_include/OpenThreadConfig.h" ] - - public_deps = [ "${chip_root}/third_party/openthread/platforms/nxp/k32w/k32w0:openthread_core_config_k32w0" ] - - public_configs = [ ":chip_examples_project_config" ] -} diff --git a/examples/platform/nxp/k32w/k32w0/app/BUILD.gn b/examples/platform/nxp/k32w/k32w0/app/BUILD.gn deleted file mode 100644 index 8651bd56be4ecd..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/BUILD.gn +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -config("chip_examples_project_config") { - include_dirs = [ "app/project_include" ] -} - -source_set("openthread_core_config_k32w0_chip_examples") { - sources = [ "app/project_include/OpenThreadConfig.h" ] - - public_deps = [ "${chip_root}/third_party/openthread/platforms/nxp/k32w/k32w0:openthread_core_config_k32w0" ] - - public_configs = [ ":chip_examples_project_config" ] -} diff --git a/examples/platform/nxp/k32w/k32w0/app/args.gni b/examples/platform/nxp/k32w/k32w0/app/args.gni deleted file mode 100644 index 44a96b88a65b1b..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/args.gni +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") - -openthread_project_core_config_file = "OpenThreadConfig.h" - -chip_ble_project_config_include = "" -chip_device_project_config_include = "" -chip_project_config_include = "" -chip_inet_project_config_include = "" -chip_system_project_config_include = "" - -chip_system_config_provide_statistics = false -chip_with_nlfaultinjection = true diff --git a/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld b/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld deleted file mode 100644 index c51182b104ec53..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/ldscripts/chip-k32w0x-linker.ld +++ /dev/null @@ -1,448 +0,0 @@ -/* - * Copyright (c) 2019, The OpenThread Authors. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the copyright holder nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * @file - * GCC linker script for K32W061/K32W041. - */ - -/******************* Map of K32W0 internal flash *********************************** - - 0x000A_0000 - - - - +---------------+ - - - - - - - - - | | - 8.5K | Flash config | - | RESERVED | 0x0009_DE00 - - - - +---------------+ - - - - - - - - - | | - 2K | Factory data | - | | 0x0009_D600 - - - - +---------------+ - - - - - - - - - | | - 1K | App metadata | - | | 0x0009_D200 - - - - +---------------+ - - - - - - - - - | | - 612.5K | Application | - | | 0x0000_4000 - - - - +---------------+ - - - - - - - - - | | - 8K | SSBL update | - | | 0x0000_2000 - - - - +---------------+ - - - - - - - - - | | - 8K | SSBL | - | | 0x0000_0000 - - - - +---------------+ - - - - - - - - - 0x0000_0000 - -* - If OTA is disabled, SSBL and SSBL updated region are not present. - - The only address range that changes is the application, which will span from - 0x0000_0000 to 0x0009_D200, having 628.5K max size. - *****************************************************************************/ - -/******************* Map of DK6 external flash *********************************** - - 0x0010_0000 - - - - +---------------+ - - - - - - - - - | | - 252K | PDM area | - | | 0x000C_1000 - - - - +---------------+ - - - - - - - - - | | - 4K | OTA entry | - | | 0x000C_0000 - - - - +---------------+ - - - - - - - - - | | - 768K | OTA area | - | | - - - - +---------------+ - - - - - - - - - 0x0000_0000 - - *****************************************************************************/ - -OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") - -/* - * stack size for the boot rom during warm boot and application - * 256 is sufficient (pwrm_test) but keep it large to 1024 - */ -BOOT_RESUME_STACK_SIZE = 1024; - -STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x01000; - -MEM_RAM0_BASE = 0x4000400; -MEM_RAM0_SIZE = 0x0015c00; - -MEM_RAM1_BASE = 0x4020000; -MEM_RAM1_SIZE = 0x10000; - -/* internal flash size: 640K */ -m_int_flash_size = 0xA0000; -m_int_sector_size = 512; - -/* first 8K: SSBL, next 8K: SSBL update region */ -m_app_start = DEFINED(__app_load_address__) ? __app_load_address__ : 0x0; - -/* flash_config: 8.5K */ -m_flash_config_size = 0x2200; - -/* sizeof(BOOT_BLOCK_T) + sizeof(IMAGE_CERT_T) + SIGNATURE_LEN + alignment = 1024 bytes */ -m_app_meta_data = 0x400; - -/* manufacturing data: 2K */ -m_factory_data_size = 0x800; - -/* 16K: SSBL + SSBL update region */ -m_ssbl_size = 0x4000; - -/* default app size, without OTA */ -m_app_default_size = m_int_flash_size - m_flash_config_size - m_app_meta_data - m_factory_data_size; - -m_app_size = DEFINED(__app_stated_size__) ? __app_stated_size__ : m_app_default_size; - -MEMORY -{ - Flash640 (rx) : ORIGIN = m_app_start, LENGTH = m_app_size - - SCRATCH_RAM(rwx) : ORIGIN = 0x4000000, LENGTH = 0x400 /* 1K bytes (alias SCRATCH_RAM) */ - RAM0 (rwx) : ORIGIN = 0x4000400, LENGTH = 0x0015BE0 /* [87K - 32] bytes (alias RAM) */ - reserved (rwx) : ORIGIN = 0x4015FE0, LENGTH = 0x20 /* 32 bytes (reserved for ROM code) */ - RAM1 (rwx) : ORIGIN = 0x4020000, LENGTH = 0x10000 /* 64K bytes (alias RAM2) */ -} - -/* Define a symbol for the top of each memory region */ -__top_RAM1 = MEM_RAM1_BASE + MEM_RAM1_SIZE; /* 64K bytes */ - -/* The second RAM bank is dedicated entirely to heap + stack. */ -HEAP_SIZE = MEM_RAM1_SIZE - STACK_SIZE; -ASSERT(((HEAP_SIZE + STACK_SIZE) == MEM_RAM1_SIZE), "Heap size + stack size should total RAM1 size."); - -/* set external flash properties - external flash is present on the DK6 board */ -m_ext_flash_size = 0x00100000; -m_ext_flash_base = 0x00000000; -m_ext_flash_sector_size = 4096; - -NVMSectorCountLink = 63; - -NV_STORAGE_SIZE = NVMSectorCountLink * m_ext_flash_sector_size; -NV_STORAGE_MAX_SECTORS = NVMSectorCountLink; -NV_STORAGE_SECTOR_SIZE = m_ext_flash_sector_size; -NV_STORAGE_START_ADDRESS = m_ext_flash_size - 1; -NV_STORAGE_END_ADDRESS = NV_STORAGE_START_ADDRESS - NV_STORAGE_SIZE + 1; - -INT_STORAGE_START = m_int_flash_size - 1; -INT_STORAGE_SIZE = m_int_flash_size; -INT_STORAGE_END = 0x00000000; -INT_STORAGE_SECTOR_SIZE = m_int_sector_size; - -FACTORY_DATA_START_ADDRESS = m_int_flash_size - m_flash_config_size - m_factory_data_size; -FACTORY_DATA_END_ADDRESS = FACTORY_DATA_START_ADDRESS + m_factory_data_size - 1; - -__ram_vector_table__ = 1; -vector_table_size = 0x120; -M_VECTOR_RAM_SIZE = DEFINED(__ram_vector_table__) ? vector_table_size : 0x0; - -__base_RAM0 = 0x4000400; - -ENTRY(ResetISR) - -SECTIONS -{ - /* MAIN TEXT SECTION */ - .header : ALIGN(4) - { - _flash_start = ABSOLUTE(.); - _flash_beg = ABSOLUTE(.); - - FILL(0xff) - __vectors_start__ = ABSOLUTE(.) ; - __VECTOR_TABLE = .; - __Vectors = .; - KEEP(*(.isr_vector)) - /* Global Section Table */ - . = ALIGN(4) ; - __section_table_start = .; - __data_section_table = .; - LONG(LOADADDR(.data)); - LONG( ADDR(.data)); - LONG( SIZEOF(.data)); - __data_section_table_end = .; - __bss_section_table = .; - LONG( ADDR(.bss)); - LONG( SIZEOF(.bss)); - __bss_section_table_end = .; - __section_table_end = . ; - /* End of Global Section Table */ - - FILL(0xff) - . = ALIGN (0x10); - } >Flash640 - - .ro_nonce : ALIGN(0x10) - { - _FlsNonceStart = ABSOLUTE(.); - *(.ro_nonce) /* nonce value is 16 bytes.*/ - FILL(0xff) - . = ALIGN (0x10); - } > Flash640 - - .ro_ota_header : ALIGN(0x10) - { - _enc_start = ABSOLUTE(.); - _enc_offset = (_enc_start & 0x0000000F); - _FlsOtaHeader = ABSOLUTE(.); - *(.ro_ota_header) /* Ota Header 69 bytes*/ - FILL(0xff) - . = ALIGN (0x10); - } > Flash640 - - .ro_se_lnkKey (ALIGN((. - _enc_offset), 16) + _enc_offset): - { - _FlsLinkKey = ABSOLUTE(.); - *(.ro_se_lnkKey) /* Link Key 16 bytes*/ - FILL(0xff) - . = ALIGN (0x10); - } > Flash640 - - .filler : - { - BYTE(0xff); - FILL(0xff); - . = ALIGN(0x40); - } > Flash640 - - .text : ALIGN(0x40) - { - FILL(0xff) - - *(.after_vectors*) - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata .rodata.* .constdata .constdata.*) - - . = ALIGN(4); - } > Flash640 - /* - * for exception handling/unwind - some Newlib functions (in common - * with C++ and STDC++) use this. - */ - .ARM.extab : ALIGN(4) - { - FILL(0xff) - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > Flash640 - __exidx_start = .; - - .ARM.exidx : ALIGN(4) - { - FILL(0xff) - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > Flash640 - __exidx_end = .; - - _etext = .; - - .heap (COPY): - { - __HeapBase = .; - _heap = .; - KEEP(*(.heap*)) - PROVIDE(end = .); - . = ALIGN(4); - __end__ = .; - _end_heap = .; - __HeapLimit = .; - } > RAM1 - - .interrupts_ram : ALIGN(0x200) - { - . = ALIGN(4); - __VECTOR_RAM__ = .; - __interrupts_ram_start__ = .; /* Create a global symbol at data start */ - *(.m_interrupts_ram) /* This is a user defined section */ - . += M_VECTOR_RAM_SIZE; - . = ALIGN(4); - __interrupts_ram_end__ = .; /* Define a global symbol at data end */ - } > RAM0 - .scratch_area (NOLOAD): ALIGN(4) - { - __scratch_area_start__ = .; - . = ALIGN(4) ; - . += 0x400; - __scratch_area_top__ = .; - } > SCRATCH_RAM - - /* MAIN DATA SECTION */ - .uninit_RESERVED : ALIGN(4) - { - KEEP(*(.bss.$RESERVED*)) - . = ALIGN(4) ; - _end_uninit_RESERVED = .; - } > RAM0 - - /* Main DATA section (RAM0) */ - .data : ALIGN(4) - { - FILL(0xff) - _data = . ; - *(vtable) - *(.ramfunc*) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - __init_array_start = . ; - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - __init_array_end = . ; - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - KEEP(*(.jcr*)) - - . = ALIGN(4) ; - _edata = . ; - } > RAM0 AT>Flash640 - - __VECTOR_RAM = __VECTOR_RAM__; - __RAM_VECTOR_TABLE_SIZE_BYTES = DEFINED(__ram_vector_table__) ? (__interrupts_ram_end__ - __interrupts_ram_start__) : 0x0; - - /* MAIN BSS SECTION */ - .bss (NOLOAD) : ALIGN(4) - { - _bss = .; - *(.bss*) - *(COMMON) - *(g_u32NwkFrameCounter) - . = ALIGN(4) ; - _ebss = .; - - PROVIDE(end = .); - } > RAM0 - - /* BSS section for MAC buffers */ - .bss_MAC (NOLOAD) : ALIGN(4) - { - /* MAC buffer section: must be within 128kB block. __mac_buffer_base is - defined further down to be on 128kB alignment */ - __mac_buffer_start = .; - *(.mac_buffer) - - . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */ - } > RAM0 - - /* BSS section for unretained contents */ - .bss_discard (NOLOAD) : ALIGN(4) - { - *(.discard.bss.pdm) - - . = ALIGN (. != 0 ? 4 : 1) ; /* avoid empty segment */ - } > RAM0 - - /* DEFAULT NOINIT SECTION */ - .noinit (NOLOAD): ALIGN(4) - { - _noinit = .; - *(.noinit*) - . = ALIGN(4) ; - _end_noinit = .; - } > RAM0 - - /* end of firmware RAM to be retained in power down mode */ - _end_fw_retention = .; - - /* non retained RAM section */ - /* stack for rom boot during warm resume */ - .boot_resume_stack (NOLOAD): ALIGN(4) - { - _boot_resume_stack = .; - *(.boot_resume_stack*) - . += BOOT_RESUME_STACK_SIZE; - . = ALIGN(4) ; - _end_boot_resume_stack = .; - } > RAM0 - - __nv_storage_end_address = NV_STORAGE_END_ADDRESS; - __nv_storage_start_address = NV_STORAGE_START_ADDRESS; - - PROVIDE(_vStackTop = __top_RAM1); - PROVIDE(__mac_buffer_base = (__mac_buffer_start & 0xfffe0000)); - PROVIDE(BOOT_GetStartPowerMode = 0x03000e9d); - PROVIDE(ROM_GetFlash = 0x03000e0d); - PROVIDE(pmc_reset_get_cause = 0x030046e9); - PROVIDE(psector_ReadIeee802_15_4_MacId1 = 0x030053b1); - PROVIDE(Chip_LOWPOWER_ChipSoftwareReset = 0x03003fa1); - PROVIDE(_pvHeapStart = _heap); - PROVIDE(_pvHeapLimit = _pvHeapStart + (HEAP_SIZE)); - PROVIDE(_scratch_buf_start = __scratch_area_start__); - PROVIDE(_scratch_buf_end = __scratch_area_top__); - - __StackLimit = _vStackTop - STACK_SIZE; - ASSERT(__StackLimit >= _end_heap, "Stack and heap spaces are overlapping!") - - __MATTER_FACTORY_DATA_START = FACTORY_DATA_START_ADDRESS; - __MATTER_FACTORY_DATA_SIZE = m_factory_data_size; - - /* The .ro_version section inside SSBL is set after the .m_interrupts sections, - * which is assumed to never change, so the offset remains the same across different - * SSBL versions. This symbol is used in Matter Application to retrieve the SSBL version. */ - __MATTER_SSBL_VERSION_START = 0x00000120; - - ASSERT(((m_app_start + m_app_size + m_app_meta_data + m_factory_data_size + m_flash_config_size) <= m_int_flash_size), - "Internal flash capacity exceeded") - -} diff --git a/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h b/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h deleted file mode 100644 index d76a51a6fbb55b..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/project_include/OpenThreadConfig.h +++ /dev/null @@ -1,116 +0,0 @@ -/* - * - * Copyright (c) 2020 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * Overrides to default OpenThread configuration. - * - */ - -#include "openthread-core-k32w061-config.h" - -#pragma once - -// Disable the Nxp-supplied OpenThread logging facilities -// and use the facilities provided by the Device Layer -// (see src/platform/K32W/Logging.cpp). -#undef OPENTHREAD_CONFIG_LOG_OUTPUT -#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP - -// When operating in a less than ideal RF environment, having a more forgiving configuration -// of OpenThread makes thread a great deal more reliable. -#undef OPENTHREAD_CONFIG_TMF_ADDRESS_QUERY_MAX_RETRY_DELAY -#define OPENTHREAD_CONFIG_TMF_ADDRESS_QUERY_MAX_RETRY_DELAY 120 // default is 28800 - -#undef OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_DIRECT 15 // default is 3 - -#undef OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT -#define OPENTHREAD_CONFIG_MAC_DEFAULT_MAX_FRAME_RETRIES_INDIRECT 1 // default is 0 - -#undef OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS -#define OPENTHREAD_CONFIG_MAC_MAX_TX_ATTEMPTS_INDIRECT_POLLS 16 // default is 4 - -// Enable periodic parent search to speed up finding a better parent. -#undef OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE -#define OPENTHREAD_CONFIG_PARENT_SEARCH_ENABLE 1 // default is 0 - -#undef OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD -#define OPENTHREAD_CONFIG_PARENT_SEARCH_RSS_THRESHOLD -45 // default is -65 - -#undef OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH -#define OPENTHREAD_CONFIG_MLE_INFORM_PREVIOUS_PARENT_ON_REATTACH 1 // default is 0 - -// Use smaller maximum interval to speed up reattaching. -#undef OPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_MAXIMUM_INTERVAL -#define OPENTHREAD_CONFIG_MLE_ATTACH_BACKOFF_MAXIMUM_INTERVAL (60 * 10 * 1000) // default 1200000 ms - -// disable unused features -#undef OPENTHREAD_CONFIG_COAP_API_ENABLE -#define OPENTHREAD_CONFIG_COAP_API_ENABLE 0 - -#undef OPENTHREAD_CONFIG_JOINER_ENABLE -#define OPENTHREAD_CONFIG_JOINER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_COMMISSIONER_ENABLE -#define OPENTHREAD_CONFIG_COMMISSIONER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE -#define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 - -#undef OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE -#define OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE 0 - -#undef OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_TCP_ENABLE -#define OPENTHREAD_CONFIG_TCP_ENABLE 0 - -#undef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 0 - -#undef OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE -#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 0 - -#undef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS -#define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44 - -#undef OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE -#define OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_SRP_SERVER_ENABLE -#define OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 0 - -#undef OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE -#define OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE 0 - -#define UART_USE_SERIAL_MGR 1 -#define UART_USE_SERIAL_MGR_LOG 1 - -// #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG - -// Use the NXP-supplied default platform configuration for remainder -// of OpenThread config options. -// -// NB: This file gets included during the build of OpenThread. Hence -// it cannot use "openthread" in the path to the included file. -// diff --git a/examples/platform/nxp/k32w/k32w0/app/support/BUILD.gn b/examples/platform/nxp/k32w/k32w0/app/support/BUILD.gn deleted file mode 100644 index 7b10c468a02fe6..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/support/BUILD.gn +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") -import("//build_overrides/nxp_sdk.gni") - -config("support_config") { - include_dirs = [ "../../../../.." ] - - # Link options that provides replace dynamic memory operations in standard - # library with the FreeRTOS malloc in platform code. - ldflags = [ - # memory allocation -- these must be re-entrant and do locking - "-Wl,--wrap=malloc", - "-Wl,--wrap=free", - "-Wl,--wrap=realloc", - "-Wl,--wrap=calloc", - "-Wl,--wrap=MemoryAlloc", - - # Wrap these in case internal newlib call them (e.g. strdup will) - # directly call _malloc_r) - "-Wl,--wrap=_malloc_r", - "-Wl,--wrap=_realloc_r", - "-Wl,--wrap=_free_r", - "-Wl,--wrap=_calloc_r", - ] -} - -source_set("freertos_mbedtls_utils") { - sources = [ - "FreeRtosHooks.c", - "FreeRtosHooks.h", - "Memconfig.cpp", - ] - - deps = [ "${chip_root}/src/lib/support" ] - - cflags = [ "-Wconversion" ] - - public_configs = [ ":support_config" ] -} diff --git a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c deleted file mode 100644 index 59cae3f6d14cf9..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.c +++ /dev/null @@ -1,274 +0,0 @@ -/* - * - * Copyright (c) 2020 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "FreeRtosHooks.h" - -#include "FreeRTOS.h" -#include "semphr.h" - -#include - -#include -#include - -#include "PDM.h" -#include "PWR_Interface.h" -#include "TimersManager.h" -#include "board.h" -#include "pdm_ram_storage_glue.h" - -/* Bluetooth Low Energy */ -#include "ble_config.h" -#include "l2ca_cb_interface.h" - -#include "controller_interface.h" - -#if defined gLoggingActive_d && (gLoggingActive_d > 0) -#include "dbg_logging.h" -#ifndef DBG_APP -#define DBG_APP 0 -#endif -#define APP_DBG_LOG(fmt, ...) \ - if (DBG_APP) \ - do \ - { \ - DbgLogAdd(__FUNCTION__, fmt, VA_NUM_ARGS(__VA_ARGS__), ##__VA_ARGS__); \ - } while (0); -#else -#define APP_DBG_LOG(...) -#endif - -#if (configUSE_TICKLESS_IDLE != 0) -#define DBG_PostStepTickAssess 0 -#if DBG_PostStepTickAssess && !gTimestampUseWtimer_c -#error "gTimestampUseWtimer_c required for DBG_PostStepTickAssess" -#endif -#if defined(gPWR_FreqScalingWFI) && (gPWR_FreqScalingWFI != 0) -/* this MACRO is required when gPWR_FreqScalingWFI is not equal to zero (system clock frequency - reduced in WFI) */ -#define App_SuppressTickInStopMode 1 -#else -#define App_SuppressTickInStopMode 0 -#endif -#if gPWR_CpuClk_48MHz -/* for systick accuracy, this is recommended to enable FRO calibration */ -#define gApp_SystemClockCalibration 1 -#endif -#endif - -#define PDM_MAX_WRITES_INFINITE 0xFF - -static inline void mutex_init(mbedtls_threading_mutex_t * p_mutex) -{ - assert(p_mutex != NULL); - *p_mutex = xSemaphoreCreateMutex(); - assert(*p_mutex != NULL); -} - -static inline void mutex_free(mbedtls_threading_mutex_t * p_mutex) -{ - assert(p_mutex != NULL); - assert(*p_mutex != NULL); - vSemaphoreDelete(*p_mutex); -} - -static inline int mutex_lock(mbedtls_threading_mutex_t * p_mutex) -{ - assert(p_mutex != NULL); - assert(*p_mutex != NULL); - return xSemaphoreTake(*p_mutex, portMAX_DELAY) != pdTRUE; -} - -static inline int mutex_unlock(mbedtls_threading_mutex_t * p_mutex) -{ - assert(p_mutex != NULL); - assert(*p_mutex != NULL); - return xSemaphoreGive(*p_mutex) != pdTRUE; -} - -void freertos_mbedtls_mutex_init(void) -{ - mbedtls_threading_set_alt(mutex_init, mutex_free, mutex_lock, mutex_unlock); -} - -void freertos_mbedtls_mutex_free(void) -{ - mbedtls_threading_free_alt(); -} - -#if (configUSE_TICKLESS_IDLE != 0) - -/* - * Setup the systick timer to generate the tick interrupts at the required - * frequency. - */ -void vPortSetupTimerInterrupt(void) -{ - /* Stop and clear the SysTick. */ - SysTick->CTRL = 0UL; - SysTick->VAL = 0UL; - -#if DBG_PostStepTickAssess - tickless_SystickCheckDriftInit(); -#endif - - /* configure module for tickless mode */ - tickless_init(); - -#if gApp_SystemClockCalibration - /* calibration on the internal FRO48MHz clock - this clock is inaccurate (2%), - * so it needs calibration if we want the systick to be accurate to less - * than 500pp. */ - tickless_StartFroCalibration(); -#endif - - /* Configure SysTick to interrupt at the requested rate. */ - SysTick_Config(CLOCK_GetFreq(kCLOCK_CoreSysClk) / configTICK_RATE_HZ); -} - -void vPortSuppressTicksAndSleep(TickType_t xExpectedIdleTime) -{ - tmrlp_tickless_systick_t lp_ctx; - APP_DBG_LOG("xExpectedIdleTime = %d ticks %d ms", xExpectedIdleTime, xExpectedIdleTime * portTICK_PERIOD_MS); - OSA_InterruptDisable(); - - /* Do not go to sleep, lowpower or WFI if there is a pending task to schedule - * Scheduler is suspended when calling vPortSuppressTicksAndSleep, - * as interrupt are disabled if one is pending, eTaskConfirmSleepModeStatus - * will prevent sleep. - */ - if (eTaskConfirmSleepModeStatus() == eAbortSleep) - { - APP_DBG_LOG("task to schedule"); - /* Do nothing */ - } -#if gApp_SystemClockCalibration - /* Prevent lowpower / tickless mode if cal ongoing - get estimated core freq */ - else if (tickless_EstimateCoreClockFreq()) - { - /* can eventually enter sleep or re evaluate on next idle loop, the calibration shall take 4 ms average */ - // PWR_EnterSleep(); - } -#endif - - /* Do not go to power down if: - * - the RTOS is expecting a wake-up too close to the current date - * To worth a power down the xExpectedIdleTime should be - * > to 2 rtos tick (which includes residual_count worst margin + carry after wake-up worst margin) - * + enter/exist power down duration converted in RTOS tick - * - power down is not allowed - */ - else if ((xExpectedIdleTime > - (2 + ((PWR_SYSTEM_EXIT_LOW_POWER_DURATION_MS + PWR_SYSTEM_ENTER_LOW_POWER_DURATION_MS) / portTICK_PERIOD_MS) + 1))) - { - int result = PWR_CheckIfDeviceCanGoToSleepExt(); - if (result >= kPmPowerDown0) - { - PWR_WakeupReason_t wakeupReason; - lp_ctx.exitTicklessDuration32kTick = MILLISECONDS_TO_TICKS32K(PWR_SYSTEM_EXIT_LOW_POWER_DURATION_MS); - /* Tickless pre processing */ - tickless_PreProcessing(&lp_ctx, xExpectedIdleTime); - - /* Enter power down */ - wakeupReason = PWR_EnterPowerDown(); - - APP_DBG_LOG("wakeReason=%x", (uint16_t) wakeupReason.AllBits); - (void) wakeupReason; - - /* Tickless post processing */ - tickless_PostProcessing(&lp_ctx); - -#if DBG_PostStepTickAssess - if (wakeupReason.Bits.FromTMR == 1) - configASSERT(lp_ctx.idle_tick_jump == xExpectedIdleTime); - if (wakeupReason.Bits.DidPowerDown == 1) - configASSERT((wakeupReason.AllBits & ~0x8000U) != 0); -#endif - } - else if ((result == kPmSleep) || (result < 0)) - { -#if App_SuppressTickInStopMode - lp_ctx.exitTicklessDuration32kTick = 0; - /* Tickless pre processing */ - tickless_PreProcessing(&lp_ctx, xExpectedIdleTime); -#endif - - PWR_EnterSleep(); - -#if App_SuppressTickInStopMode - /* Tickless post processing */ - tickless_PostProcessing(&lp_ctx); -#endif - } - } - else - { -#if App_SuppressTickInStopMode - lp_ctx.exitTicklessDuration32kTick = 0; - /* Tickless pre processing */ - tickless_PreProcessing(&lp_ctx, xExpectedIdleTime); -#endif - - PWR_EnterSleep(); - -#if App_SuppressTickInStopMode - /* Tickless post processing */ - tickless_PostProcessing(&lp_ctx); -#endif - } - -#if DBG_PostStepTickAssess - tickless_SystickCheckDrift(); -#endif - - OSA_InterruptEnable(); -} -#endif /* (configUSE_TICKLESS_IDLE != 0) */ - -static void BOARD_ActionOnIdle(void) -{ -#if ((defined gTcxo32k_ModeEn_c) && (gTcxo32k_ModeEn_c != 0)) - BOARD_tcxo32k_compensation_run(2, 0); -#endif -#if ((defined gTcxo32M_ModeEn_c) && (gTcxo32M_ModeEn_c != 0)) - BOARD_tcxo32M_compensation_run(2, 10); /* 2 degrees - wait for 10us */ -#endif -} - -extern void OTAIdleActivities(void); -extern bool AppHaveBLEConnections(void); - -void vApplicationIdleHook(void) -{ -#if PDM_SAVE_IDLE - /* While in BLE connection during commissioning, PDM saves should be paused */ - if (!AppHaveBLEConnections()) - { - FS_vIdleTask(PDM_MAX_WRITES_INFINITE); - } -#endif - - OTAIdleActivities(); - -#if gAdcUsed_d - BOARD_ADCMeasure(); -#endif - - BOARD_ActionOnIdle(); -} diff --git a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.h b/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.h deleted file mode 100644 index a27f72d498f81d..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/support/FreeRtosHooks.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2020 Nest Labs, Inc. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -typedef void * mbedtls_threading_mutex_t; - -extern void mbedtls_threading_set_alt(void (*mutex_init)(mbedtls_threading_mutex_t *), - void (*mutex_free)(mbedtls_threading_mutex_t *), - int (*mutex_lock)(mbedtls_threading_mutex_t *), - int (*mutex_unlock)(mbedtls_threading_mutex_t *)); - -extern void mbedtls_threading_free_alt(void); - -#ifdef __cplusplus -extern "C" { -#endif - -/**@brief Function for initializing alternative MbedTLS mutexes to enable the usage of the FreeRTOS implementation. */ -void freertos_mbedtls_mutex_init(void); - -/**@brief Function for releasing MbedTLS alternative mutexes. */ -void freertos_mbedtls_mutex_free(void); - -#ifdef __cplusplus -} -#endif diff --git a/examples/platform/nxp/k32w/k32w0/app/support/Memconfig.cpp b/examples/platform/nxp/k32w/k32w0/app/support/Memconfig.cpp deleted file mode 100644 index e5acf5ea3ceecb..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/app/support/Memconfig.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * - * Copyright (c) 2020-2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file contains platform specific implementations for stdlib malloc/calloc/realloc/free - * functions, so that CHIPPlatformMemory* works as intended with the platform's heap. - */ - -#include "FreeRTOS.h" -#include "task.h" -#include -#include -#include - -#ifndef NDEBUG -#include -#include -#endif - -#include - -#if CHIP_CONFIG_MEMORY_DEBUG_DMALLOC -#include -#include -#endif // CHIP_CONFIG_MEMORY_DEBUG_DMALLOC - -/* Assumes 8bit bytes! */ -#define heapBITS_PER_BYTE ((size_t) 8) - -/* Define the linked list structure. This is used to link free blocks in order -of their memory address. */ -typedef struct A_BLOCK_LINK -{ - struct A_BLOCK_LINK * pxNextFreeBlock; /*<< The next free block in the list. */ - size_t xBlockSize; /*<< The size of the free block. */ -} BlockLink_t; - -/* The size of the structure placed at the beginning of each allocated memory -block must by correctly byte aligned. */ -static const size_t xHeapStructSize = - (sizeof(BlockLink_t) + ((size_t) (portBYTE_ALIGNMENT - 1))) & ~((size_t) portBYTE_ALIGNMENT_MASK); - -/* Gets set to the top bit of an size_t type. When this bit in the xBlockSize -member of an BlockLink_t structure is set then the block belongs to the -application. When the bit is free the block is still part of the free heap -space. */ -static size_t xBlockAllocatedBit = ((size_t) 1) << ((sizeof(size_t) * heapBITS_PER_BYTE) - 1); - -extern "C" { - -/* xPortMallocUsableSize relies on heap4 implementation. -It returns the size of an allocated block and it is -called by __wrap_realloc. -Thus it is validated in __wrap_realloc function that the allocated size -of the old_ptr is smaller than the allocated size of new_ptr */ -size_t xPortMallocUsableSize(void * pv) -{ - uint8_t * puc = (uint8_t *) pv; - BlockLink_t * pxLink; - void * voidp; - size_t sz = 0; - - if (pv != NULL) - { - vTaskSuspendAll(); - { - /* The memory being checked will have an BlockLink_t structure immediately - before it. */ - puc -= xHeapStructSize; - - /* This casting is to keep the compiler from issuing warnings. */ - voidp = (void *) puc; - pxLink = (BlockLink_t *) voidp; - - /* Check if the block is actually allocated. */ - configASSERT((pxLink->xBlockSize & xBlockAllocatedBit) != 0); - configASSERT(pxLink->pxNextFreeBlock == NULL); - - sz = (pxLink->xBlockSize & ~xBlockAllocatedBit) - xHeapStructSize; - } - (void) xTaskResumeAll(); - } - - return sz; -} - -void * __wrap_malloc(size_t size) -{ - return pvPortMalloc(size); -} - -void __wrap_free(void * ptr) -{ - vPortFree(ptr); -} - -void * __wrap_calloc(size_t num, size_t size) -{ - size_t total_size = num * size; - - // Handle overflow from (num * size) - if ((size != 0) && ((total_size / size) != num)) - { - return nullptr; - } - - void * ptr = pvPortMalloc(total_size); - if (ptr) - { - memset(ptr, 0, total_size); - } - else - { - ChipLogError(DeviceLayer, "__wrap_calloc: Could not allocate memory!"); - } - - return ptr; -} - -void * __wrap_realloc(void * ptr, size_t new_size) -{ - - void * new_ptr = NULL; - - if (new_size) - { - size_t old_ptr_size = xPortMallocUsableSize(ptr); - if (new_size <= old_ptr_size) - { - /* Return old pointer if the newly allocated size is smaller - or equal to the allocated size for old_ptr */ - return ptr; - } - - /* if old_ptr is NULL, then old_ptr_size is zero and new_ptr will be returned */ - new_ptr = pvPortMalloc(new_size); - - if (!new_ptr) - { - ChipLogError(DeviceLayer, "__wrap_realloc: Could not allocate memory!"); - return NULL; - } - - memset(reinterpret_cast(new_ptr) + old_ptr_size, 0, (new_size - old_ptr_size)); - memcpy(new_ptr, ptr, old_ptr_size); - } - - vPortFree(ptr); - - return new_ptr; -} - -void * __wrap__malloc_r(void * REENT, size_t size) -{ - return __wrap_malloc(size); -} - -void __wrap__free_r(void * REENT, void * ptr) -{ - __wrap_free(ptr); -} - -void * __wrap__realloc_r(void * REENT, void * ptr, size_t new_size) -{ - return __wrap_realloc(ptr, new_size); -} - -} // extern "C" diff --git a/examples/platform/nxp/k32w/k32w0/args.gni b/examples/platform/nxp/k32w/k32w0/args.gni deleted file mode 100644 index 5af5e1d18b3123..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/args.gni +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -import("${chip_root}/src/platform/nxp/k32w/k32w0/args.gni") - -openthread_core_config_deps = [] -openthread_core_config_deps = [ "${chip_root}/examples/platform/nxp/k32w/k32w0:openthread_core_config_k32w0_chip_examples" ] - -chip_ble_project_config_include = "" -chip_device_project_config_include = "" -chip_project_config_include = "" -chip_inet_project_config_include = "" -chip_system_project_config_include = "" - -chip_system_config_provide_statistics = false -chip_with_nlfaultinjection = true - -chip_system_config_use_open_thread_inet_endpoints = true -chip_with_lwip = false diff --git a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp deleted file mode 100644 index 7f2f6d9bc0cad0..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.cpp +++ /dev/null @@ -1,51 +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. - */ - -#include "CustomFactoryDataProvider.h" - -namespace chip { -namespace DeviceLayer { - -static constexpr size_t kMaxLengthCustomId1 = 10; -static constexpr size_t kMaxLengthCustomId2 = 50; -static constexpr size_t kMaxLengthCustomId3 = 100; - -CustomFactoryDataProvider::CustomFactoryDataProvider() -{ - // Custom ids should be from a range that does not overlap with the standard factory data range. - static_assert((uint16_t) CustomFactoryIds::kCustomId1 >= (uint16_t) FactoryDataProvider::FactoryDataId::kMaxId); -} - -CHIP_ERROR CustomFactoryDataProvider::ParseFunctionExample() -{ - uint8_t data_buf[kMaxLengthCustomId1]; - MutableByteSpan buffer(data_buf); - memset(buffer.data(), 0, buffer.size()); - uint16_t userDataSize = 0; - // A user can use FactoryDataProvider::SearchForId to read an id from internal - // flash factory data section. - auto * provider = static_cast(DeviceLayer::GetDeviceInstanceInfoProvider()); - ReturnErrorOnFailure((provider != nullptr) ? CHIP_NO_ERROR : CHIP_ERROR_INVALID_ADDRESS); - ReturnErrorOnFailure(provider->SearchForId(CustomFactoryIds::kCustomId1, buffer.data(), buffer.size(), userDataSize)); - - // Data should now be ready for custom parsing. - - return CHIP_NO_ERROR; -} - -} // namespace DeviceLayer -} // namespace chip diff --git a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h b/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h deleted file mode 100644 index dfb722d67fdc11..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/common/CustomFactoryDataProvider.h +++ /dev/null @@ -1,51 +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. - */ -#pragma once - -#include - -namespace chip { -namespace DeviceLayer { - -/** - * @brief This is an example class that extends the platform factory data provider - * to support custom functionality. Users should implement their own custom - * provider based on this example. - */ - -class CustomFactoryDataProvider -{ -public: - /* Custom IDs should start from at least FactoryDataId::kMaxId, which is - * the next available valid ID. Last default ID is kMaxId - 1. - */ - enum CustomFactoryIds - { - kCustomId1 = 200, // Random id that is greater than FactoryDataId::kMaxId. - kCustomId2, - kCustomId3, - kCustomMaxId - }; - - CustomFactoryDataProvider(); - - /* Declare here custom functions to be implemented. */ - CHIP_ERROR ParseFunctionExample(); -}; - -} // namespace DeviceLayer -} // namespace chip diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_bin.JPG b/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_bin.JPG deleted file mode 100644 index fb871d45aeb5f9..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_bin.JPG and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_multi_image.JPG b/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_multi_image.JPG deleted file mode 100644 index 31449b25cf269e..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_multi_image.JPG and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_select.JPG b/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_select.JPG deleted file mode 100644 index 79ea51b62698e8..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_select.JPG and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_simple_hash.JPG b/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_simple_hash.JPG deleted file mode 100755 index 9ec701b0bb1d86..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/doc/images/ssbl_simple_hash.JPG and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut1.bin b/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut1.bin deleted file mode 100644 index 44370e1deb3a2f..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut1.bin and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut2.bin b/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut2.bin deleted file mode 100644 index f47a8b4c53a908..00000000000000 Binary files a/examples/platform/nxp/k32w/k32w0/scripts/demo_generated_factory_data/demo_factory_data_dut2.bin and /dev/null differ diff --git a/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py b/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py deleted file mode 100644 index 6f76903e97f8a5..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py +++ /dev/null @@ -1,148 +0,0 @@ -import argparse -import os -import sys - -import pw_tokenizer -import serial - - -def parse_args(): - """Parse input arguments - - Return: - parsed arguments struncture - """ - - parser = argparse.ArgumentParser() - subparsers = parser.add_subparsers(dest='type') - subparsers.required = True - - parser_file = subparsers.add_parser('file') - parser_file.add_argument( - "-i", "--input", help="Input file name.", required=True) - parser_file.add_argument( - "-d", "--database", help="Token database.", required=True) - parser_file.add_argument( - "-o", "--output", help="Output file name.", required=True) - - parser_file = subparsers.add_parser('serial') - parser_file.add_argument( - "-i", "--input", help="Input serial port name.", required=True) - parser_file.add_argument( - "-d", "--database", help="Token database.", required=True) - parser_file.add_argument( - "-o", "--output", help="Output file name. Write to stdout and to file.") - - return parser.parse_args() - - -def decode_string(tstr, detok): - """Decodes a single token. - - Args: - tstr - encoded input string - detok - detokenizer - - Return: - decoded string or None - """ - try: - t = bytes.fromhex(tstr) - s = str(detok.detokenize(t)) - - if s.find('$') == 0: - return None - return s - except ValueError: - return None - - -def decode_serial(serialport, outfile, database): - """Decodes logs from serial port. - - Args: - infile - path to input file - outfile - path to output file - database - path to token database - """ - - detokenizer = pw_tokenizer.Detokenizer(database) - input = serial.Serial(serialport, 115200, timeout=None) - - output = None - if outfile: - output = open(outfile, 'w') - - if input: - - try: - while (True): - # read line from serial port and ascii decode - line = input.readline().decode('ascii').strip() - # find token start and detokenize - idx = line.rfind(']') - dstr = decode_string(line[idx + 1:], detokenizer) - if dstr: - line = line[:idx+1] + dstr - print(line, file=sys.stdout) - if output: - print(line, file=output) - except Exception: - print("Serial error or program closed", file=sys.stderr) - - if output: - input.close() - output.close() - - else: - print("Invalid or closed serial port.", file=sys.stderr) - - -def decode_file(infile, outfile, database): - """Decodes logs from input file. - - Args: - infile - path to input file - outfile - path to output file - database - path to token database - """ - - if os.path.isfile(infile): - - detokenizer = pw_tokenizer.Detokenizer(database) - - output = open(outfile, 'w') - - with open(infile, 'rb') as file: - for line in file: - try: - # ascii decode line - # serial terminals may include non ascii characters - line = line.decode('ascii').strip() - except Exception: - continue - # find token start and detokenize - idx = line.rfind(']') - dstr = decode_string(line[idx + 1:], detokenizer) - if dstr: - line = line[:idx+1] + dstr - print(line, file=output) - output.close() - - else: - print("File does not exist or is not a file.", file=sys.stderr) - - -def detokenize_input(): - - args = parse_args() - - if args.type == 'file': - decode_file(args.input, args.output, args.database) - if args.type == 'serial': - decode_serial(args.input, args.output, args.database) - - -if __name__ == '__main__': - detokenize_input() - sys.exit(0) diff --git a/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py b/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py deleted file mode 100644 index 8660b4bc5f4b06..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/scripts/sign-outdir.py +++ /dev/null @@ -1,37 +0,0 @@ -import argparse -import os -import subprocess - - -def main(args): - if "NXP_K32W0_SDK_ROOT" in os.environ and os.environ["NXP_K32W0_SDK_ROOT"] != "": - sign_images_path = os.environ["NXP_K32W0_SDK_ROOT"] + "/tools/imagetool/sign_images.sh" - else: - sign_images_path = os.path.abspath( - __file__ + "/../../../../../../../third_party/nxp/k32w0_sdk/repo/core/tools/imagetool/sign_images.sh") - - # Give execute permission if needed - if os.access(sign_images_path, os.X_OK) is False: - os.chmod(sign_images_path, 0o766) - - # Convert script to unix format if needed - subprocess.call("(file " + sign_images_path + " | grep CRLF > /dev/null) && (dos2unix " + sign_images_path + ")", shell=True) - - # Call sign_images.sh script with the output directory - cmd = sign_images_path + " " + os.getcwd() - if args.simple_hash: - cmd = cmd + " -SimpleHashVerification" - - subprocess.call(cmd, shell=True) - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument( - "--simple-hash", - help="When enabled, adds a hash of the whole image at the end of the binary.", - action="store_true" - ) - args = parser.parse_args() - - main(args) diff --git a/examples/platform/nxp/k32w/k32w0/util/LEDWidget.cpp b/examples/platform/nxp/k32w/k32w0/util/LEDWidget.cpp deleted file mode 100644 index fec3a5b0afca70..00000000000000 --- a/examples/platform/nxp/k32w/k32w0/util/LEDWidget.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "LEDWidget.h" - -#include - -void LEDWidget::Init(LED_t led) -{ - mLastChangeTimeMS = 0; - mBlinkOnTimeMS = 0; - mBlinkOffTimeMS = 0; - mGPIONum = led; - mState = false; - - Set(false); -} - -void LEDWidget::Invert(void) -{ - Set(!mState); -} - -void LEDWidget::Set(bool state) -{ - mLastChangeTimeMS = mBlinkOnTimeMS = mBlinkOffTimeMS = 0; - DoSet(state); -} - -void LEDWidget::Blink(uint32_t changeRateMS) -{ - Blink(changeRateMS, changeRateMS); -} - -void LEDWidget::Blink(uint32_t onTimeMS, uint32_t offTimeMS) -{ - mBlinkOnTimeMS = onTimeMS; - mBlinkOffTimeMS = offTimeMS; - Animate(); -} - -void LEDWidget::Animate() -{ - if (mBlinkOnTimeMS != 0 && mBlinkOffTimeMS != 0) - { - uint64_t nowMS = chip::System::SystemClock().GetMonotonicMilliseconds64().count(); - uint64_t stateDurMS = mState ? mBlinkOnTimeMS : mBlinkOffTimeMS; - uint64_t nextChangeTimeMS = mLastChangeTimeMS + stateDurMS; - - if (nextChangeTimeMS < nowMS) - { - DoSet(!mState); - mLastChangeTimeMS = nowMS; - } - } -} - -void LEDWidget::DoSet(bool state) -{ - mState = state; - - if (state) - { - LED_TurnOnLed(mGPIONum); - } - else - { - LED_TurnOffLed(mGPIONum); - } -} diff --git a/examples/platform/nxp/k32w/k32w0/common/README.md b/examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md similarity index 100% rename from examples/platform/nxp/k32w/k32w0/common/README.md rename to examples/platform/nxp/k32w0/doc/CustomFactoryDataProvider.md diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/chiptool_main_screen.png b/examples/platform/nxp/k32w0/doc/images/chiptool_main_screen.png similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/chiptool_main_screen.png rename to examples/platform/nxp/k32w0/doc/images/chiptool_main_screen.png diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/flash_location.JPG b/examples/platform/nxp/k32w0/doc/images/flash_location.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/flash_location.JPG rename to examples/platform/nxp/k32w0/doc/images/flash_location.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/form_web.JPG b/examples/platform/nxp/k32w0/doc/images/form_web.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/form_web.JPG rename to examples/platform/nxp/k32w0/doc/images/form_web.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6-connectors.jpg b/examples/platform/nxp/k32w0/doc/images/k32w-dk6-connectors.jpg similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6-connectors.jpg rename to examples/platform/nxp/k32w0/doc/images/k32w-dk6-connectors.jpg diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg b/examples/platform/nxp/k32w0/doc/images/k32w-dk6.jpg similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/k32w-dk6.jpg rename to examples/platform/nxp/k32w0/doc/images/k32w-dk6.jpg diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg b/examples/platform/nxp/k32w0/doc/images/k32w-se.jpg similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/k32w-se.jpg rename to examples/platform/nxp/k32w0/doc/images/k32w-se.jpg diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/mcux-sdk-download.JPG b/examples/platform/nxp/k32w0/doc/images/mcux-sdk-download.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/mcux-sdk-download.JPG rename to examples/platform/nxp/k32w0/doc/images/mcux-sdk-download.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/nxp_hw_connectivity.JPG b/examples/platform/nxp/k32w0/doc/images/nxp_hw_connectivity.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/nxp_hw_connectivity.JPG rename to examples/platform/nxp/k32w0/doc/images/nxp_hw_connectivity.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/on_off_cluster.png b/examples/platform/nxp/k32w0/doc/images/on_off_cluster.png similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/on_off_cluster.png rename to examples/platform/nxp/k32w0/doc/images/on_off_cluster.png diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/ota_topology.JPG b/examples/platform/nxp/k32w0/doc/images/ota_topology.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/ota_topology.JPG rename to examples/platform/nxp/k32w0/doc/images/ota_topology.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/pdm_ext_flash.JPG b/examples/platform/nxp/k32w0/doc/images/pdm_ext_flash.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/pdm_ext_flash.JPG rename to examples/platform/nxp/k32w0/doc/images/pdm_ext_flash.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/power_conf.JPG b/examples/platform/nxp/k32w0/doc/images/power_conf.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/power_conf.JPG rename to examples/platform/nxp/k32w0/doc/images/power_conf.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/power_view.JPG b/examples/platform/nxp/k32w0/doc/images/power_view.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/power_view.JPG rename to examples/platform/nxp/k32w0/doc/images/power_view.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/select-sdk.JPG b/examples/platform/nxp/k32w0/doc/images/select-sdk.JPG similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/select-sdk.JPG rename to examples/platform/nxp/k32w0/doc/images/select-sdk.JPG diff --git a/examples/platform/nxp/k32w/k32w0/doc/images/thread_credentials.png b/examples/platform/nxp/k32w0/doc/images/thread_credentials.png similarity index 100% rename from examples/platform/nxp/k32w/k32w0/doc/images/thread_credentials.png rename to examples/platform/nxp/k32w0/doc/images/thread_credentials.png diff --git a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp index 09f103592d2470..1162323cda3d51 100644 --- a/examples/platform/silabs/provision/ProvisionStorageDefault.cpp +++ b/examples/platform/silabs/provision/ProvisionStorageDefault.cpp @@ -28,6 +28,9 @@ #include #include #include +#ifdef OTA_ENCRYPTION_ENABLE +#include +#endif // OTA_ENCRYPTION_ENABLE #ifdef SLI_SI91X_MCU_INTERFACE #include #else @@ -659,7 +662,7 @@ CHIP_ERROR Storage::SetOtaTlvEncryptionKey(const ByteSpan & value) ReturnErrorOnFailure(key.Import(value.data(), value.size())); return SilabsConfig::WriteConfigValue(SilabsConfig::kOtaTlvEncryption_KeyId, key.GetId()); } -#endif +#endif // OTA_ENCRYPTION_ENABLE /** * @brief Reads the test event trigger key from NVM. If the key isn't present, returns default value if defined. diff --git a/examples/platform/silabs/provision/ProvisionStorageFlash.cpp b/examples/platform/silabs/provision/ProvisionStorageFlash.cpp index 5bd11108bd9cc6..35a32d6af8f5ec 100644 --- a/examples/platform/silabs/provision/ProvisionStorageFlash.cpp +++ b/examples/platform/silabs/provision/ProvisionStorageFlash.cpp @@ -25,6 +25,9 @@ #include #include #include +#ifdef OTA_ENCRYPTION_ENABLE +#include +#endif // OTA_ENCRYPTION_ENABLE using namespace chip::Credentials; @@ -708,7 +711,7 @@ CHIP_ERROR Storage::SetOtaTlvEncryptionKey(const ByteSpan & value) { return CHIP_ERROR_NOT_IMPLEMENTED; } -#endif +#endif // OTA_ENCRYPTION_ENABLE CHIP_ERROR Storage::GetTestEventTriggerKey(MutableByteSpan & keySpan) { diff --git a/examples/pump-app/cc13x4_26x4/README.md b/examples/pump-app/cc13x4_26x4/README.md index 1e7e0c33b2136a..5cd2e3c367be79 100644 --- a/examples/pump-app/cc13x4_26x4/README.md +++ b/examples/pump-app/cc13x4_26x4/README.md @@ -108,7 +108,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming diff --git a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp index 9ec109313d3ad1..9c409b09256d8b 100644 --- a/examples/pump-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-app/cc13x4_26x4/main/AppTask.cpp @@ -96,8 +96,10 @@ AppTask AppTask::sAppTask; static DeviceCallbacks sDeviceCallbacks; +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs); void CancelTimer(void); +#endif uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; @@ -120,9 +122,9 @@ void InitializeOTARequestor(void) sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); } -#endif TimerHandle_t sOTAInitTimer = 0; +#endif // The OTA Init Timer is only started upon the first Thread State Change // detected if the device is already on a Thread Network, or during the AppTask @@ -171,10 +173,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void OTAInitTimerEventHandler(TimerHandle_t xTimer) { InitializeOTARequestor(); } +#endif int AppTask::StartAppTask() { @@ -217,6 +221,7 @@ int AppTask::Init() ; } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Create FreeRTOS sw timer for OTA timer. sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) @@ -233,6 +238,7 @@ int AppTask::Init() { PLAT_LOG("sOTAInitTimer timer created successfully "); } +#endif ret = ThreadStackMgr().InitThreadStack(); if (ret != CHIP_NO_ERROR) @@ -353,6 +359,7 @@ void AppTask::PostEvent(const AppEvent * aEvent) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs) { PLAT_LOG("Start OTA Init Timer") @@ -378,6 +385,7 @@ void CancelTimer(void) PLAT_LOG("sOTAInitTimer stop() failed"); } } +#endif void AppTask::ActionInitiated(PumpManager::Action_t aAction, int32_t aActor) { diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index d766b7d9c61ff1..c99a5c2f2c7782 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1704,7 +1920,7 @@ cluster FlowMeasurement = 1028 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; 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 cbc0ea3c2d65fc..4327438f220783 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1704,7 +1920,7 @@ cluster FlowMeasurement = 1028 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; 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 cbc0ea3c2d65fc..4327438f220783 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1704,7 +1920,7 @@ cluster FlowMeasurement = 1028 { /** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ cluster OccupancySensing = 1030 { - revision 4; + revision 5; enum OccupancySensorTypeEnum : enum8 { kPIR = 0; diff --git a/examples/pump-controller-app/cc13x4_26x4/README.md b/examples/pump-controller-app/cc13x4_26x4/README.md index bd357fb25f2961..9b5eb0e693426d 100644 --- a/examples/pump-controller-app/cc13x4_26x4/README.md +++ b/examples/pump-controller-app/cc13x4_26x4/README.md @@ -110,7 +110,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming diff --git a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp index a8d1e1d88f5cd3..d437da1c06d304 100644 --- a/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x4_26x4/main/AppTask.cpp @@ -83,8 +83,10 @@ static Button_Handle sAppRightHandle; AppTask AppTask::sAppTask; +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs); void CancelTimer(void); +#endif uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; @@ -107,10 +109,11 @@ void InitializeOTARequestor(void) sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); } -#endif TimerHandle_t sOTAInitTimer = 0; +#endif + // The OTA Init Timer is only started upon the first Thread State Change // detected if the device is already on a Thread Network, or during the AppTask // Init sequence if the device is not yet on a Thread Network. Once the timer @@ -199,10 +202,12 @@ void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void OTAInitTimerEventHandler(TimerHandle_t xTimer) { InitializeOTARequestor(); } +#endif int AppTask::Init() { @@ -222,6 +227,7 @@ int AppTask::Init() ; } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR // Create FreeRTOS sw timer for OTA timer. sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) @@ -238,6 +244,7 @@ int AppTask::Init() { PLAT_LOG("sOTAInitTimer timer created successfully "); } +#endif ret = ThreadStackMgr().InitThreadStack(); if (ret != CHIP_NO_ERROR) @@ -352,6 +359,7 @@ void AppTask::PostEvent(const AppEvent * aEvent) } } +#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR void StartTimer(uint32_t aTimeoutMs) { PLAT_LOG("Start OTA Init Timer") @@ -377,6 +385,7 @@ void CancelTimer(void) PLAT_LOG("sOTAInitTimer stop() failed"); } } +#endif void AppTask::ActionInitiated(PumpManager::Action_t aAction, int32_t aActor) { 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 be131b84c3a933..7365654ce9c65b 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index eea5506b1c60db..f028a3b31557c5 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h index 092ded91f76272..da03422ffbb34a 100644 --- a/examples/rvc-app/rvc-common/include/rvc-device.h +++ b/examples/rvc-app/rvc-common/include/rvc-device.h @@ -44,7 +44,8 @@ class RvcDevice mRunModeDelegate(), mRunModeInstance(&mRunModeDelegate, aRvcClustersEndpoint, RvcRunMode::Id, 0), mCleanModeDelegate(), mCleanModeInstance(&mCleanModeDelegate, aRvcClustersEndpoint, RvcCleanMode::Id, 0), mOperationalStateDelegate(), mOperationalStateInstance(&mOperationalStateDelegate, aRvcClustersEndpoint), mServiceAreaDelegate(), - mServiceAreaInstance(&mServiceAreaDelegate, aRvcClustersEndpoint, BitMask(0)) + mServiceAreaInstance(&mServiceAreaDelegate, aRvcClustersEndpoint, + BitMask(ServiceArea::Feature::kMaps, ServiceArea::Feature::kProgressReporting)) { // set the current-mode at start-up mRunModeInstance.UpdateCurrentMode(RvcRunMode::ModeIdle); diff --git a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h index e170d2ffeb35ce..759c22a4e609cb 100644 --- a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h @@ -35,39 +35,39 @@ class RvcServiceAreaDelegate : public Delegate { private: // containers for array attributes. - std::vector mSupportedLocations; + std::vector mSupportedAreas; std::vector mSupportedMaps; - std::vector mSelectedLocations; + std::vector mSelectedAreas; std::vector mProgressList; public: CHIP_ERROR Init() override; // command support - bool IsSetSelectedLocationsAllowed(MutableCharSpan statusText) override; + bool IsSetSelectedAreasAllowed(MutableCharSpan statusText) override; - bool IsValidSelectLocationsSet(const ServiceArea::Commands::SelectLocations::DecodableType & req, - ServiceArea::SelectLocationsStatus & locationStatus, MutableCharSpan statusText) override; + bool IsValidSelectAreasSet(const ServiceArea::Commands::SelectAreas::DecodableType & req, + ServiceArea::SelectAreasStatus & locationStatus, MutableCharSpan statusText) override; - bool HandleSkipCurrentLocation(MutableCharSpan skipStatusText) override; + bool HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan skipStatusText) override; //************************************************************************* // Supported Locations accessors - bool IsSupportedLocationsChangeAllowed() override; + bool IsSupportedAreasChangeAllowed() override; - uint32_t GetNumberOfSupportedLocations() override; + uint32_t GetNumberOfSupportedAreas() override; - bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::LocationStructureWrapper & supportedLocation) override; + bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::AreaStructureWrapper & supportedLocation) override; - bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, - ServiceArea::LocationStructureWrapper & supportedLocation) override; + bool GetSupportedLocationById(uint32_t aAreaId, uint32_t & listIndex, + ServiceArea::AreaStructureWrapper & supportedLocation) override; - bool AddSupportedLocation(const ServiceArea::LocationStructureWrapper & newLocation, uint32_t & listIndex) override; + bool AddSupportedLocation(const ServiceArea::AreaStructureWrapper & newArea, uint32_t & listIndex) override; - bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::LocationStructureWrapper & modifiedLocation) override; + bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::AreaStructureWrapper & modifiedLocation) override; - bool ClearSupportedLocations() override; + bool ClearSupportedAreas() override; //************************************************************************* // Supported Maps accessors @@ -78,7 +78,7 @@ class RvcServiceAreaDelegate : public Delegate bool GetSupportedMapByIndex(uint32_t listIndex, ServiceArea::MapStructureWrapper & supportedMap) override; - bool GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, ServiceArea::MapStructureWrapper & supportedMap) override; + bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, ServiceArea::MapStructureWrapper & supportedMap) override; bool AddSupportedMap(const ServiceArea::MapStructureWrapper & newMap, uint32_t & listIndex) override; @@ -89,15 +89,15 @@ class RvcServiceAreaDelegate : public Delegate //************************************************************************* // Selected Locations accessors - uint32_t GetNumberOfSelectedLocations() override; + uint32_t GetNumberOfSelectedAreas() override; bool GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & selectedLocation) override; // IsSelectedLocation() no override - bool AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) override; + bool AddSelectedLocation(uint32_t aAreaId, uint32_t & listIndex) override; - bool ClearSelectedLocations() override; + bool ClearSelectedAreas() override; //************************************************************************* // Progress accessors @@ -106,7 +106,7 @@ class RvcServiceAreaDelegate : public Delegate bool GetProgressElementByIndex(uint32_t listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override; - bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, + bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override; bool AddProgressElement(const ServiceArea::Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) override; diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 53f280721d84de..4467c170acc6eb 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1208,188 +1424,9 @@ cluster RvcOperationalState = 97 { command GoHome(): OperationalCommandResponse = 128; } -/** The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location. */ +/** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */ provisional cluster ServiceArea = 336 { - revision 1; // NOTE: Default/not specifically set - - enum AreaTypeTag : enum8 { - kAisle = 0; - kAttic = 1; - kBackDoor = 2; - kBackYard = 3; - kBalcony = 4; - kBallroom = 5; - kBathroom = 6; - kBedroom = 7; - kBorder = 8; - kBoxroom = 9; - kBreakfastRoom = 10; - kCarport = 11; - kCellar = 12; - kCloakroom = 13; - kCloset = 14; - kConservatory = 15; - kCorridor = 16; - kCraftRoom = 17; - kCupboard = 18; - kDeck = 19; - kDen = 20; - kDining = 21; - kDrawingRoom = 22; - kDressingRoom = 23; - kDriveway = 24; - kElevator = 25; - kEnsuite = 26; - kEntrance = 27; - kEntryway = 28; - kFamilyRoom = 29; - kFoyer = 30; - kFrontDoor = 31; - kFrontYard = 32; - kGameRoom = 33; - kGarage = 34; - kGarageDoor = 35; - kGarden = 36; - kGardenDoor = 37; - kGuestBathroom = 38; - kGuestBedroom = 39; - kGuestRestroom = 40; - kGuestRoom = 41; - kGym = 42; - kHallway = 43; - kHearthRoom = 44; - kKidsRoom = 45; - kKidsBedroom = 46; - kKitchen = 47; - kLarder = 48; - kLaundryRoom = 49; - kLawn = 50; - kLibrary = 51; - kLivingRoom = 52; - kLounge = 53; - kMediaTVRoom = 54; - kMudRoom = 55; - kMusicRoom = 56; - kNursery = 57; - kOffice = 58; - kOutdoorKitchen = 59; - kOutside = 60; - kPantry = 61; - kParkingLot = 62; - kParlor = 63; - kPatio = 64; - kPlayRoom = 65; - kPoolRoom = 66; - kPorch = 67; - kPrimaryBathroom = 68; - kPrimaryBedroom = 69; - kRamp = 70; - kReceptionRoom = 71; - kRecreationRoom = 72; - kRestroom = 73; - kRoof = 74; - kSauna = 75; - kScullery = 76; - kSewingRoom = 77; - kShed = 78; - kSideDoor = 79; - kSideYard = 80; - kSittingRoom = 81; - kSnug = 82; - kSpa = 83; - kStaircase = 84; - kSteamRoom = 85; - kStorageRoom = 86; - kStudio = 87; - kStudy = 88; - kSunRoom = 89; - kSwimmingPool = 90; - kTerrace = 91; - kUtilityRoom = 92; - kWard = 93; - kWorkshop = 94; - } - - enum FloorSurfaceTag : enum8 { - kCarpet = 0; - kCeramic = 1; - kConcrete = 2; - kCork = 3; - kDeepCarpet = 4; - kDirt = 5; - kEngineeredWood = 6; - kGlass = 7; - kGrass = 8; - kHardwood = 9; - kLaminate = 10; - kLinoleum = 11; - kMat = 12; - kMetal = 13; - kPlastic = 14; - kPolishedConcrete = 15; - kRubber = 16; - kRug = 17; - kSand = 18; - kStone = 19; - kTatami = 20; - kTerrazzo = 21; - kTile = 22; - kVinyl = 23; - } - - enum LandmarkTag : enum8 { - kAirConditioner = 0; - kAirPurifier = 1; - kBackDoor = 2; - kBarStool = 3; - kBathMat = 4; - kBathtub = 5; - kBed = 6; - kBookshelf = 7; - kChair = 8; - kChristmasTree = 9; - kCoatRack = 10; - kCoffeeTable = 11; - kCookingRange = 12; - kCouch = 13; - kCountertop = 14; - kCradle = 15; - kCrib = 16; - kDesk = 17; - kDiningTable = 18; - kDishwasher = 19; - kDoor = 20; - kDresser = 21; - kLaundryDryer = 22; - kFan = 23; - kFireplace = 24; - kFreezer = 25; - kFrontDoor = 26; - kHighChair = 27; - kKitchenIsland = 28; - kLamp = 29; - kLitterBox = 30; - kMirror = 31; - kNightstand = 32; - kOven = 33; - kPetBed = 34; - kPetBowl = 35; - kPetCrate = 36; - kRefrigerator = 37; - kScratchingPost = 38; - kShoeRack = 39; - kShower = 40; - kSideDoor = 41; - kSink = 42; - kSofa = 43; - kStove = 44; - kTable = 45; - kToilet = 46; - kTrashCan = 47; - kLaundryWasher = 48; - kWindow = 49; - kWineCooler = 50; - } + revision 1; enum OperationalStatusEnum : enum8 { kPending = 0; @@ -1398,79 +1435,61 @@ provisional cluster ServiceArea = 336 { kCompleted = 3; } - enum PositionTag : enum8 { - kLeft = 0; - kRight = 1; - kTop = 2; - kBottom = 3; - kMiddle = 4; - kRow = 5; - kColumn = 6; - kUnder = 7; - kNextTo = 8; - kAround = 9; - kOn = 10; - kAbove = 11; - kFrontOf = 12; - kBehind = 13; - } - - enum SelectLocationsStatus : enum8 { + enum SelectAreasStatus : enum8 { kSuccess = 0; - kUnsupportedLocation = 1; - kDuplicatedLocations = 2; + kUnsupportedArea = 1; + kDuplicatedAreas = 2; kInvalidInMode = 3; kInvalidSet = 4; } - enum SkipCurrentLocationStatus : enum8 { + enum SkipAreaStatus : enum8 { kSuccess = 0; - kInvalidLocationList = 1; + kInvalidAreaList = 1; kInvalidInMode = 2; + kInvalidSkippedArea = 3; } bitmap Feature : bitmap32 { - kListOrder = 0x1; - kSelectWhileRunning = 0x2; + kSelectWhileRunning = 0x1; + kProgressReporting = 0x2; + kMaps = 0x4; } - struct LocationDescriptorStruct { - char_string<128> locationName = 0; - nullable int16s floorNumber = 1; - nullable AreaTypeTag areaType = 2; + struct LandmarkInfoStruct { + LandmarkTag landmarkTag = 0; + nullable RelativePositionTag positionTag = 1; } - struct LocationInfoStruct { + struct AreaInfoStruct { nullable LocationDescriptorStruct locationInfo = 0; - nullable LandmarkTag landmarkTag = 1; - nullable PositionTag positionTag = 2; - nullable FloorSurfaceTag surfaceTag = 3; + nullable LandmarkInfoStruct landmarkInfo = 1; } - struct LocationStruct { - int32u locationID = 0; - nullable int8u mapID = 1; - LocationInfoStruct locationInfo = 2; + struct AreaStruct { + int32u areaID = 0; + nullable int32u mapID = 1; + AreaInfoStruct areaDesc = 2; } struct MapStruct { - int8u mapID = 0; + int32u mapID = 0; char_string<64> name = 1; } struct ProgressStruct { - int32u locationID = 0; + int32u areaID = 0; OperationalStatusEnum status = 1; optional nullable elapsed_s totalOperationalTime = 2; optional nullable elapsed_s estimatedTime = 3; } - readonly attribute LocationStruct supportedLocations[] = 0; - readonly attribute nullable MapStruct supportedMaps[] = 1; - readonly attribute nullable int32u selectedLocations[] = 2; - readonly attribute optional nullable int32u currentLocation = 3; + readonly attribute AreaStruct supportedAreas[] = 0; + readonly attribute optional MapStruct supportedMaps[] = 1; + readonly attribute int32u selectedAreas[] = 2; + readonly attribute optional nullable int32u currentArea = 3; readonly attribute optional nullable epoch_s estimatedEndTime = 4; - readonly attribute optional nullable ProgressStruct progress[] = 5; + readonly attribute optional ProgressStruct progress[] = 5; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1478,24 +1497,28 @@ provisional cluster ServiceArea = 336 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct SelectLocationsRequest { - nullable int32u newLocations[] = 0; + request struct SelectAreasRequest { + int32u newAreas[] = 0; + } + + response struct SelectAreasResponse = 1 { + SelectAreasStatus status = 0; + char_string<256> statusText = 1; } - response struct SelectLocationsResponse = 1 { - SelectLocationsStatus status = 0; - optional char_string<256> statusText = 1; + request struct SkipAreaRequest { + int32u skippedArea = 0; } - response struct SkipCurrentLocationResponse = 3 { - SkipCurrentLocationStatus status = 0; - optional char_string<256> statusText = 1; + response struct SkipAreaResponse = 3 { + SkipAreaStatus status = 0; + char_string<256> statusText = 1; } - /** Command used to select a set of device locations, where the device is to operate */ - command SelectLocations(SelectLocationsRequest): SelectLocationsResponse = 0; - /** This command is used to skip the current location where the device operates. */ - command SkipCurrentLocation(): SkipCurrentLocationResponse = 2; + /** Command used to select a set of device areas, where the device is to operate. */ + command SelectAreas(SelectAreasRequest): SelectAreasResponse = 0; + /** This command is used to skip an area where the device operates. */ + command SkipArea(SkipAreaRequest): SkipAreaResponse = 2; } endpoint 0 { @@ -1755,10 +1778,10 @@ endpoint 1 { } server cluster ServiceArea { - callback attribute supportedLocations; + callback attribute supportedAreas; callback attribute supportedMaps; - callback attribute selectedLocations; - callback attribute currentLocation; + callback attribute selectedAreas; + callback attribute currentArea; callback attribute estimatedEndTime; callback attribute progress; callback attribute generatedCommandList; @@ -1768,10 +1791,10 @@ endpoint 1 { callback attribute featureMap; ram attribute clusterRevision default = 1; - handle command SelectLocations; - handle command SelectLocationsResponse; - handle command SkipCurrentLocation; - handle command SkipCurrentLocationResponse; + handle command SelectAreas; + handle command SelectAreasResponse; + handle command SkipArea; + handle command SkipAreaResponse; } } diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index cb3ea7cc0d24c4..89fe82c64f5c21 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -2885,9 +2885,10 @@ "define": "SERVICE_AREA_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "SelectLocations", + "name": "SelectAreas", "code": 0, "mfgCode": null, "source": "client", @@ -2895,7 +2896,7 @@ "isEnabled": 1 }, { - "name": "SelectLocationsResponse", + "name": "SelectAreasResponse", "code": 1, "mfgCode": null, "source": "server", @@ -2903,7 +2904,7 @@ "isEnabled": 1 }, { - "name": "SkipCurrent", + "name": "SkipArea", "code": 2, "mfgCode": null, "source": "client", @@ -2911,7 +2912,7 @@ "isEnabled": 1 }, { - "name": "SkipCurrentResponse", + "name": "SkipAreaResponse", "code": 3, "mfgCode": null, "source": "server", @@ -2921,7 +2922,7 @@ ], "attributes": [ { - "name": "SupportedLocations", + "name": "SupportedAreas", "code": 0, "mfgCode": null, "side": "server", @@ -2953,7 +2954,7 @@ "reportableChange": 0 }, { - "name": "SelectedLocations", + "name": "SelectedAreas", "code": 2, "mfgCode": null, "side": "server", @@ -2969,7 +2970,7 @@ "reportableChange": 0 }, { - "name": "CurrentLocation", + "name": "CurrentArea", "code": 3, "mfgCode": null, "side": "server", @@ -2978,7 +2979,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2994,7 +2995,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3090,7 +3091,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp index 4c66b35b43fe60..aca96da836151d 100644 --- a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp @@ -17,6 +17,7 @@ */ #include #include +#include using namespace chip; using namespace chip::app::Clusters; @@ -25,49 +26,44 @@ using namespace chip::app::Clusters::ServiceArea; CHIP_ERROR RvcServiceAreaDelegate::Init() { // hardcoded fill of SUPPORTED MAPS for prototyping - uint8_t supportedMapId_XX = 3; - uint8_t supportedMapId_YY = 245; + uint32_t supportedMapId_XX = 3; + uint32_t supportedMapId_YY = 245; GetInstance()->AddSupportedMap(supportedMapId_XX, "My Map XX"_span); GetInstance()->AddSupportedMap(supportedMapId_YY, "My Map YY"_span); // hardcoded fill of SUPPORTED LOCATIONS for prototyping - uint32_t supportedLocationId_A = 7; - uint32_t supportedLocationId_B = 1234567; - uint32_t supportedLocationId_C = 10050; - uint32_t supportedLocationId_D = 0x88888888; + uint32_t supportedAreaID_A = 7; + uint32_t supportedAreaID_B = 1234567; + uint32_t supportedAreaID_C = 10050; + uint32_t supportedAreaID_D = 0x88888888; // Location A has name, floor number, uses map XX - GetInstance()->AddSupportedLocation( - supportedLocationId_A, DataModel::Nullable(supportedMapId_XX), "My Location A"_span, - DataModel::Nullable(4), DataModel::Nullable(), - DataModel::Nullable(), DataModel::Nullable(), - DataModel::Nullable()); + GetInstance()->AddSupportedLocation(supportedAreaID_A, DataModel::Nullable(supportedMapId_XX), "My Location A"_span, + DataModel::Nullable(4), DataModel::Nullable(), + DataModel::Nullable(), + DataModel::Nullable()); // Location B has name, uses map XX - GetInstance()->AddSupportedLocation( - supportedLocationId_B, DataModel::Nullable(supportedMapId_XX), "My Location B"_span, - DataModel::Nullable(), DataModel::Nullable(), - DataModel::Nullable(), DataModel::Nullable(), - DataModel::Nullable()); + GetInstance()->AddSupportedLocation(supportedAreaID_B, DataModel::Nullable(supportedMapId_XX), "My Location B"_span, + DataModel::Nullable(), DataModel::Nullable(), + DataModel::Nullable(), + DataModel::Nullable()); // Location C has full SemData, no name, Map YY - GetInstance()->AddSupportedLocation(supportedLocationId_C, DataModel::Nullable(supportedMapId_YY), CharSpan(), + GetInstance()->AddSupportedLocation(supportedAreaID_C, DataModel::Nullable(supportedMapId_YY), CharSpan(), DataModel::Nullable(-1), - DataModel::Nullable(ServiceArea::AreaTypeTag::kPlayRoom), - DataModel::Nullable(ServiceArea::LandmarkTag::kBackDoor), - DataModel::Nullable(ServiceArea::PositionTag::kNextTo), - DataModel::Nullable(ServiceArea::FloorSurfaceTag::kConcrete)); + DataModel::Nullable(Globals::AreaTypeTag::kPlayRoom), + DataModel::Nullable(Globals::LandmarkTag::kBackDoor), + DataModel::Nullable(Globals::RelativePositionTag::kNextTo)); // Location D has null values for all HomeLocationStruct fields, Map YY - GetInstance()->AddSupportedLocation(supportedLocationId_D, DataModel::Nullable(supportedMapId_YY), - "My Location D"_span, DataModel::Nullable(), - DataModel::Nullable(), - DataModel::Nullable(ServiceArea::LandmarkTag::kCouch), - DataModel::Nullable(ServiceArea::PositionTag::kNextTo), - DataModel::Nullable(ServiceArea::FloorSurfaceTag::kHardwood)); + GetInstance()->AddSupportedLocation(supportedAreaID_D, DataModel::Nullable(supportedMapId_YY), "My Location D"_span, + DataModel::Nullable(), DataModel::Nullable(), + DataModel::Nullable(Globals::LandmarkTag::kCouch), + DataModel::Nullable(Globals::RelativePositionTag::kNextTo)); - GetInstance()->SetCurrentLocation(supportedLocationId_C); + GetInstance()->SetCurrentArea(supportedAreaID_C); return CHIP_NO_ERROR; } @@ -75,20 +71,20 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() //************************************************************************* // command support -bool RvcServiceAreaDelegate::IsSetSelectedLocationsAllowed(MutableCharSpan statusText) +bool RvcServiceAreaDelegate::IsSetSelectedAreasAllowed(MutableCharSpan statusText) { // TODO IMPLEMENT return true; }; -bool RvcServiceAreaDelegate::IsValidSelectLocationsSet(const Commands::SelectLocations::DecodableType & req, - SelectLocationsStatus & locationStatus, MutableCharSpan statusText) +bool RvcServiceAreaDelegate::IsValidSelectAreasSet(const Commands::SelectAreas::DecodableType & req, + SelectAreasStatus & locationStatus, MutableCharSpan statusText) { // TODO IMPLEMENT return true; }; -bool RvcServiceAreaDelegate::HandleSkipCurrentLocation(MutableCharSpan skipStatusText) +bool RvcServiceAreaDelegate::HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan skipStatusText) { // TODO IMPLEMENT return true; @@ -97,41 +93,41 @@ bool RvcServiceAreaDelegate::HandleSkipCurrentLocation(MutableCharSpan skipStatu //************************************************************************* // Supported Locations accessors -bool RvcServiceAreaDelegate::IsSupportedLocationsChangeAllowed() +bool RvcServiceAreaDelegate::IsSupportedAreasChangeAllowed() { // TODO IMPLEMENT return true; } -uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations() +uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedAreas() { - return static_cast(mSupportedLocations.size()); + return static_cast(mSupportedAreas.size()); } -bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, LocationStructureWrapper & aSupportedLocation) +bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedLocation) { - if (listIndex < mSupportedLocations.size()) + if (listIndex < mSupportedAreas.size()) { - aSupportedLocation = mSupportedLocations[listIndex]; + aSupportedLocation = mSupportedAreas[listIndex]; return true; } return false; }; -bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, - LocationStructureWrapper & aSupportedLocation) +bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aAreaID, uint32_t & listIndex, + AreaStructureWrapper & aSupportedLocation) { // We do not need to reimplement this method as it's already done by the SDK. // We are reimplementing this method, still using linear search, but with some optimization on the SDK implementation // since we have direct access to the list. listIndex = 0; - while (listIndex < mSupportedLocations.size()) + while (listIndex < mSupportedAreas.size()) { - if (mSupportedLocations[listIndex].locationID == aLocationId) + if (mSupportedAreas[listIndex].areaID == aAreaID) { - aSupportedLocation = mSupportedLocations[listIndex]; + aSupportedLocation = mSupportedAreas[listIndex]; return true; } @@ -141,49 +137,49 @@ bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aLocationId, uint return false; }; -bool RvcServiceAreaDelegate::AddSupportedLocation(const LocationStructureWrapper & newLocation, uint32_t & listIndex) +bool RvcServiceAreaDelegate::AddSupportedLocation(const AreaStructureWrapper & newArea, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. - if (mSupportedLocations.size() < kMaxNumSupportedLocations) + if (mSupportedAreas.size() < kMaxNumSupportedAreas) { // not sorting list, number of locations normally expected to be small, max 255 - mSupportedLocations.push_back(newLocation); + mSupportedAreas.push_back(newArea); listIndex = static_cast(mSupportedMaps.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddSupportedLocation %u - supported locations list is already at maximum size %u", newLocation.locationID, - static_cast(kMaxNumSupportedLocations)); + ChipLogError(Zcl, "AddSupportedLocation %u - supported locations list is already at maximum size %u", newArea.areaID, + static_cast(kMaxNumSupportedAreas)); return false; } -bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const LocationStructureWrapper & modifiedLocation) +bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const AreaStructureWrapper & modifiedLocation) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. - // Double-check that locationID's match. - if (modifiedLocation.locationID != mSupportedLocations[listIndex].locationID) + // Double-check that areaID's match. + if (modifiedLocation.areaID != mSupportedAreas[listIndex].areaID) { - ChipLogError(Zcl, "ModifySupportedLocation - locationID's do not match, new locationID %u, existing locationID %u", - modifiedLocation.locationID, mSupportedLocations[listIndex].locationID); + ChipLogError(Zcl, "ModifySupportedLocation - areaID's do not match, new areaID %u, existing areaID %u", + modifiedLocation.areaID, mSupportedAreas[listIndex].areaID); return false; } // checks passed, update the attribute - mSupportedLocations[listIndex] = modifiedLocation; + mSupportedAreas[listIndex] = modifiedLocation; return true; } -bool RvcServiceAreaDelegate::ClearSupportedLocations() +bool RvcServiceAreaDelegate::ClearSupportedAreas() { - if (!mSupportedLocations.empty()) + if (!mSupportedAreas.empty()) { - mSupportedLocations.clear(); + mSupportedAreas.clear(); return true; } @@ -215,7 +211,7 @@ bool RvcServiceAreaDelegate::GetSupportedMapByIndex(uint32_t listIndex, MapStruc return false; }; -bool RvcServiceAreaDelegate::GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap) +bool RvcServiceAreaDelegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap) { // We do not need to reimplement this method as it's already done by the SDK. // We are reimplementing this method, still using linear search, but with some optimization on the SDK implementation @@ -238,7 +234,7 @@ bool RvcServiceAreaDelegate::GetSupportedMapById(uint8_t aMapId, uint32_t & list bool RvcServiceAreaDelegate::AddSupportedMap(const MapStructureWrapper & newMap, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. @@ -257,7 +253,7 @@ bool RvcServiceAreaDelegate::AddSupportedMap(const MapStructureWrapper & newMap, bool RvcServiceAreaDelegate::ModifySupportedMap(uint32_t listIndex, const MapStructureWrapper & modifiedMap) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check that mapID's match. @@ -287,46 +283,46 @@ bool RvcServiceAreaDelegate::ClearSupportedMaps() //************************************************************************* // Selected Locations accessors -uint32_t RvcServiceAreaDelegate::GetNumberOfSelectedLocations() +uint32_t RvcServiceAreaDelegate::GetNumberOfSelectedAreas() { - return static_cast(mSelectedLocations.size()); + return static_cast(mSelectedAreas.size()); } bool RvcServiceAreaDelegate::GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & aSelectedLocation) { - if (listIndex < mSelectedLocations.size()) + if (listIndex < mSelectedAreas.size()) { - aSelectedLocation = mSelectedLocations[listIndex]; + aSelectedLocation = mSelectedAreas[listIndex]; return true; } return false; }; -bool RvcServiceAreaDelegate::AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) +bool RvcServiceAreaDelegate::AddSelectedLocation(uint32_t aAreaID, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. - if (mSelectedLocations.size() < kMaxNumSelectedLocations) + if (mSelectedAreas.size() < kMaxNumSelectedAreas) { // not sorting list, number of locations normally expected to be small, max 255 - mSelectedLocations.push_back(aLocationId); - listIndex = static_cast(mSelectedLocations.size()) - 1; // new element is last in list + mSelectedAreas.push_back(aAreaID); + listIndex = static_cast(mSelectedAreas.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddSelectedLocation %u - selected locations list is already at maximum size %u", aLocationId, - static_cast(kMaxNumSelectedLocations)); + ChipLogError(Zcl, "AddSelectedLocation %u - selected locations list is already at maximum size %u", aAreaID, + static_cast(kMaxNumSelectedAreas)); return false; } -bool RvcServiceAreaDelegate::ClearSelectedLocations() +bool RvcServiceAreaDelegate::ClearSelectedAreas() { - if (!mSelectedLocations.empty()) + if (!mSelectedAreas.empty()) { - mSelectedLocations.clear(); + mSelectedAreas.clear(); return true; } @@ -352,7 +348,7 @@ bool RvcServiceAreaDelegate::GetProgressElementByIndex(uint32_t listIndex, Struc return false; }; -bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, +bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aAreaID, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) { // We do not need to reimplement this method as it's already done by the SDK. @@ -362,7 +358,7 @@ bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32 while (listIndex < mProgressList.size()) { - if (mProgressList[listIndex].locationID == aLocationId) + if (mProgressList[listIndex].areaID == aAreaID) { aProgressElement = mProgressList[listIndex]; return true; @@ -376,7 +372,7 @@ bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32 bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. @@ -387,7 +383,7 @@ bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::T listIndex = static_cast(mProgressList.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u", newProgressElement.locationID, + ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u", newProgressElement.areaID, static_cast(kMaxNumProgressElements)); return false; diff --git a/examples/shell/cc13x4_26x4/README.md b/examples/shell/cc13x4_26x4/README.md index 3f1923f3db33af..2d5e53d5ec1b18 100644 --- a/examples/shell/cc13x4_26x4/README.md +++ b/examples/shell/cc13x4_26x4/README.md @@ -63,7 +63,7 @@ Ninja to build the executable. to the GN call. ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"]" + gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" ``` ## Programming 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 ab4f6f7b2e6ee8..21d1cebf065fb4 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 @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; diff --git a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp index e0d7decc849616..88fee24b7535b6 100644 --- a/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/temperature-measurement-app/esp32/main/DeviceCallbacks.cpp @@ -23,6 +23,7 @@ * **/ #include "DeviceCallbacks.h" +#include static const char TAG[] = "echo-devicecallbacks"; 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 7b0f7ee75df290..4ebc3dc672d48f 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; diff --git a/examples/thermostat/linux/include/thermostat-delegate-impl.h b/examples/thermostat/linux/include/thermostat-delegate-impl.h index c4daef5fde1d6a..f559977f341949 100644 --- a/examples/thermostat/linux/include/thermostat-delegate-impl.h +++ b/examples/thermostat/linux/include/thermostat-delegate-impl.h @@ -54,6 +54,8 @@ class ThermostatDelegate : public Delegate CHIP_ERROR SetActivePresetHandle(const DataModel::Nullable & newActivePresetHandle) override; + void InitializePendingPresets() override; + CHIP_ERROR AppendToPendingPresetList(const Structs::PresetStruct::Type & preset) override; CHIP_ERROR GetPendingPresetAtIndex(size_t index, PresetStructWithOwnedMembers & preset) override; diff --git a/examples/thermostat/linux/thermostat-delegate-impl.cpp b/examples/thermostat/linux/thermostat-delegate-impl.cpp index 491e44a311c3e8..61d496f233b408 100644 --- a/examples/thermostat/linux/thermostat-delegate-impl.cpp +++ b/examples/thermostat/linux/thermostat-delegate-impl.cpp @@ -16,7 +16,8 @@ * limitations under the License. */ -#include "include/thermostat-delegate-impl.h" +#include +#include #include #include @@ -29,24 +30,6 @@ using namespace chip::app::Clusters::Thermostat::Structs; ThermostatDelegate ThermostatDelegate::sInstance; -namespace { - -/** - * @brief Checks if the presets are matching i.e the presetHandles are the same. - * - * @param[in] preset The preset to check. - * @param[in] presetToMatch The preset to match with. - * - * @return true If the presets match, false otherwise. If both preset handles are null, returns false - */ -bool PresetHandlesExistAndMatch(const PresetStructWithOwnedMembers & preset, const PresetStructWithOwnedMembers & presetToMatch) -{ - return !preset.GetPresetHandle().IsNull() && !presetToMatch.GetPresetHandle().IsNull() && - preset.GetPresetHandle().Value().data_equal(presetToMatch.GetPresetHandle().Value()); -} - -} // anonymous namespace - ThermostatDelegate::ThermostatDelegate() { mNumberOfPresets = kMaxNumberOfPresetTypes * kMaxNumberOfPresetsOfEachType; @@ -165,16 +148,29 @@ CHIP_ERROR ThermostatDelegate::SetActivePresetHandle(const DataModel::Nullable(preset.presetScenario) }; + mPendingPresets[mNextFreeIndexInPendingPresetsList].SetPresetHandle(DataModel::MakeNullable(ByteSpan(handle))); + } mNextFreeIndexInPendingPresetsList++; return CHIP_NO_ERROR; } @@ -193,37 +189,12 @@ CHIP_ERROR ThermostatDelegate::GetPendingPresetAtIndex(size_t index, PresetStruc CHIP_ERROR ThermostatDelegate::ApplyPendingPresets() { - - // TODO: #34546 - Need to support deletion of presets that are removed from Presets. + mNextFreeIndexInPresetsList = 0; for (uint8_t indexInPendingPresets = 0; indexInPendingPresets < mNextFreeIndexInPendingPresetsList; indexInPendingPresets++) { const PresetStructWithOwnedMembers & pendingPreset = mPendingPresets[indexInPendingPresets]; - - bool found = false; - for (uint8_t indexInPresets = 0; indexInPresets < mNextFreeIndexInPresetsList; indexInPresets++) - { - if (PresetHandlesExistAndMatch(mPresets[indexInPresets], pendingPreset)) - { - found = true; - - // Replace the preset with the pending preset - mPresets[indexInPresets] = pendingPreset; - } - } - - // If pending preset was not found in the Presets list, append to the Presets list. - if (!found) - { - - mPresets[mNextFreeIndexInPresetsList] = pendingPreset; - - // TODO: #34556 Since we support only one preset of each type, using the octet string containing the preset scenario - // suffices as the unique preset handle. Need to fix this to actually provide unique handles once multiple presets of - // each type are supported. - const uint8_t handle[] = { static_cast(pendingPreset.GetPresetScenario()) }; - mPresets[mNextFreeIndexInPresetsList].SetPresetHandle(DataModel::MakeNullable(ByteSpan(handle))); - mNextFreeIndexInPresetsList++; - } + mPresets[mNextFreeIndexInPresetsList] = pendingPreset; + mNextFreeIndexInPresetsList++; } return CHIP_NO_ERROR; } diff --git a/examples/thermostat/linux/thermostat-manager.cpp b/examples/thermostat/linux/thermostat-manager.cpp index e96f04a78d49e9..ea1f4375c1649d 100644 --- a/examples/thermostat/linux/thermostat-manager.cpp +++ b/examples/thermostat/linux/thermostat-manager.cpp @@ -20,8 +20,8 @@ * Includes *********************************************************/ -#include "include/thermostat-manager.h" -#include "include/thermostat-delegate-impl.h" +#include +#include #include #include @@ -61,12 +61,6 @@ ThermostatManager ThermostatManager::sThermostatMgr; namespace { -CHIP_ERROR ChipErrorFromStatusCode(Status status) -{ - StatusIB statusIB(status); - return statusIB.ToChipError(); -} - template static void OnAttributeChangeReported(const ConcreteDataAttributePath & path, const DecodableAttributeType & value); @@ -274,7 +268,7 @@ void ThermostatManager::ThermostatClusterAttributeChangeHandler(AttributeId attr break; default: { - ChipLogError(AppServer, "Unhandled thermostat attribute %x", attributeId); + ChipLogError(AppServer, "Unhandled thermostat attribute %u", static_cast(attributeId)); return; } break; @@ -332,7 +326,7 @@ CHIP_ERROR ThermostatManager::SetSystemMode(SystemModeEnum systemMode) } ChipLogError(AppServer, "Setting system mode: %u (%s)", systemModeValue, SystemModeString(systemMode)); - return ChipErrorFromStatusCode(SystemMode::Set(kThermostatEndpoint, systemMode)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(SystemMode::Set(kThermostatEndpoint, systemMode)); } CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMode) @@ -345,22 +339,22 @@ CHIP_ERROR ThermostatManager::SetRunningMode(ThermostatRunningModeEnum runningMo } ChipLogError(AppServer, "Setting running mode: %u (%s)", runningModeValue, RunningModeString(runningMode)); - return ChipErrorFromStatusCode(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(ThermostatRunningMode::Set(kThermostatEndpoint, runningMode)); } CHIP_ERROR ThermostatManager::SetCurrentTemperature(int16_t temperature) { - return ChipErrorFromStatusCode(LocalTemperature::Set(kThermostatEndpoint, temperature)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(LocalTemperature::Set(kThermostatEndpoint, temperature)); } CHIP_ERROR ThermostatManager::SetCurrentHeatingSetPoint(int16_t heatingSetpoint) { - return ChipErrorFromStatusCode(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedHeatingSetpoint::Set(kThermostatEndpoint, heatingSetpoint)); } CHIP_ERROR ThermostatManager::SetCurrentCoolingSetPoint(int16_t coolingSetpoint) { - return ChipErrorFromStatusCode(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint)); + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(OccupiedCoolingSetpoint::Set(kThermostatEndpoint, coolingSetpoint)); } void ThermostatManager::EvalThermostatState() @@ -490,25 +484,13 @@ static const char * RunningModeString(ThermostatRunningModeEnum runningMode) } } -void MatterPostAttributeChangeCallback(const ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, uint8_t * value) -{ - ClusterId clusterId = attributePath.mClusterId; - AttributeId attributeId = attributePath.mAttributeId; - ChipLogProgress(AppServer, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - - ChipLogProgress(AppServer, - "Attribute ID changed: " ChipLogFormatMEI " Endpoint: %d ClusterId: " ChipLogFormatMEI - " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), attributePath.mEndpointId, ChipLogValueMEI(clusterId), type, *value, size); - - ThermostatMgr().AttributeChangeHandler(attributePath.mEndpointId, clusterId, attributeId, value, size); -} - void emberAfThermostatClusterInitCallback(EndpointId endpoint) { + ChipLogProgress(Zcl, "Starting Thermostat Manager"); + ThermostatManager().Init(); + // Register the delegate for the Thermostat auto & delegate = ThermostatDelegate::GetInstance(); - // Set the default delegate for endpoint kThermostatEndpoint. VerifyOrDie(endpoint == kThermostatEndpoint); SetDefaultDelegate(endpoint, &delegate); diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 94696ef33210a7..001e1b43ace09d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1992,7 +2208,7 @@ provisional cluster ScenesManagement = 98 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -2038,7 +2254,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -2111,7 +2326,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -2121,6 +2335,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -2186,7 +2404,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -2218,23 +2436,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -2275,8 +2493,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2316,28 +2533,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } endpoint 0 { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 1be09ca8f753c9..066afc85509947 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1903,7 +2119,7 @@ provisional cluster ScenesManagement = 98 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1949,7 +2165,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -2022,7 +2237,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -2032,6 +2246,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -2097,7 +2315,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -2129,23 +2347,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -2186,8 +2404,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2227,28 +2444,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } endpoint 0 { diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 8de2bcd4126529..31e5775d88148f 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1600,7 +1816,7 @@ cluster UserLabel = 65 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1646,7 +1862,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1719,7 +1934,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1729,6 +1943,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1794,7 +2012,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -1826,23 +2044,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -1883,8 +2101,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1924,28 +2141,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 3552c9b8ce25f0..a53e3cdc692952 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ cluster Identify = 3 { revision 4; @@ -1780,7 +1996,7 @@ cluster UserLabel = 65 { /** An interface for configuring and controlling the functionality of a thermostat. */ cluster Thermostat = 513 { - revision 6; + revision 7; enum ACCapacityFormatEnum : enum8 { kBTUh = 0; @@ -1826,7 +2042,6 @@ cluster Thermostat = 513 { } enum PresetScenarioEnum : enum8 { - kUnspecified = 0; kOccupied = 1; kUnoccupied = 2; kSleep = 3; @@ -1899,7 +2114,6 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; kMatterScheduleConfiguration = 0x80; kPresets = 0x100; - kSetpoints = 0x200; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1909,6 +2123,10 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap OccupancyBitmap : bitmap8 { + kOccupied = 0x1; + } + bitmap PresetTypeFeaturesBitmap : bitmap16 { kAutomatic = 0x1; kSupportsNames = 0x2; @@ -1974,7 +2192,7 @@ cluster Thermostat = 513 { optional char_string<64> name = 2; optional octet_string<16> presetHandle = 3; ScheduleTransitionStruct transitions[] = 4; - optional nullable boolean builtIn = 5; + nullable boolean builtIn = 5; } struct PresetStruct { @@ -2006,23 +2224,23 @@ cluster Thermostat = 513 { readonly attribute nullable temperature localTemperature = 0; readonly attribute optional nullable temperature outdoorTemperature = 1; - readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional OccupancyBitmap occupancy = 2; readonly attribute optional temperature absMinHeatSetpointLimit = 3; readonly attribute optional temperature absMaxHeatSetpointLimit = 4; readonly attribute optional temperature absMinCoolSetpointLimit = 5; readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; - attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -2063,8 +2281,7 @@ cluster Thermostat = 513 { readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; attribute access(write: manage) optional PresetStruct presets[] = 80; attribute access(write: manage) optional ScheduleStruct schedules[] = 81; - readonly attribute optional boolean presetsSchedulesEditable = 82; - readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2104,28 +2321,32 @@ cluster Thermostat = 513 { octet_string<16> presetHandle = 0; } - request struct StartPresetsSchedulesEditRequestRequest { - int16u timeoutSeconds = 0; + response struct AtomicResponse = 253 { + status statusCode = 0; + AtomicAttributeStatusStruct attributeStatus[] = 1; + optional int16u timeout = 2; + } + + request struct AtomicRequestRequest { + AtomicRequestTypeEnum requestType = 0; + attrib_id attributeRequests[] = 1; + optional int16u timeout = 2; } - /** Command description for SetpointRaiseLower */ + /** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; - /** Command description for SetWeeklySchedule */ + /** This command is used to update the thermostat weekly setpoint schedule from a management system. */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; - /** Command description for GetWeeklySchedule */ + /** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ + /** This command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to set the active schedule. */ + /** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */ command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; - /** This command is used to set the active preset. */ + /** ID */ command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; - /** This command is used to start editing the presets and schedules. */ - command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; - /** This command is used to cancel editing presets and schedules. */ - command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; - /** This command is used to notify the server that all edits are done and should be committed. */ - command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** Begins, Commits or Cancels an atomic write */ + command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -2561,6 +2782,7 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; + ram attribute localTemperatureCalibration default = 0x00; persist attribute occupiedCoolingSetpoint default = 0x0A28; persist attribute occupiedHeatingSetpoint default = 0x07D0; ram attribute minHeatSetpointLimit default = 700; @@ -2574,7 +2796,7 @@ endpoint 1 { ram attribute numberOfPresets default = 0; ram attribute activePresetHandle; callback attribute presets; - ram attribute presetsSchedulesEditable; + ram attribute setpointHoldExpiryTimestamp; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; @@ -2582,10 +2804,10 @@ endpoint 1 { ram attribute clusterRevision default = 6; handle command SetpointRaiseLower; + handle command SetActiveScheduleRequest; handle command SetActivePresetRequest; - handle command StartPresetsSchedulesEditRequest; - handle command CancelPresetsSchedulesEditRequest; - handle command CommitPresetsSchedulesRequest; + handle command AtomicResponse; + handle command AtomicRequest; } server cluster ThermostatUserInterfaceConfiguration { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 483b79d7d434f5..8b2fe4f5c82318 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -4661,32 +4661,32 @@ "isEnabled": 1 }, { - "name": "SetActivePresetRequest", - "code": 6, + "name": "SetActiveScheduleRequest", + "code": 5, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "StartPresetsSchedulesEditRequest", - "code": 7, + "name": "SetActivePresetRequest", + "code": 6, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 }, { - "name": "CancelPresetsSchedulesEditRequest", - "code": 8, + "name": "AtomicResponse", + "code": 253, "mfgCode": null, - "source": "client", - "isIncoming": 1, + "source": "server", + "isIncoming": 0, "isEnabled": 1 }, { - "name": "CommitPresetsSchedulesRequest", - "code": 9, + "name": "AtomicRequest", + "code": 254, "mfgCode": null, "source": "client", "isIncoming": 1, @@ -4774,12 +4774,28 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "LocalTemperatureCalibration", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "OccupiedCoolingSetpoint", "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -4795,7 +4811,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -4811,7 +4827,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4827,7 +4843,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4843,7 +4859,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4859,7 +4875,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -4983,11 +4999,11 @@ "reportableChange": 0 }, { - "name": "PresetsSchedulesEditable", + "name": "SetpointHoldExpiryTimestamp", "code": 82, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "epoch_s", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thread-br-app/esp32/.gitignore b/examples/thread-br-app/esp32/.gitignore new file mode 100644 index 00000000000000..234526a082ad26 --- /dev/null +++ b/examples/thread-br-app/esp32/.gitignore @@ -0,0 +1,5 @@ +*.vscode + +/build/ +/sdkconfig +/sdkconfig.old diff --git a/examples/thread-br-app/esp32/CMakeLists.txt b/examples/thread-br-app/esp32/CMakeLists.txt new file mode 100644 index 00000000000000..7661eae12fdfc0 --- /dev/null +++ b/examples/thread-br-app/esp32/CMakeLists.txt @@ -0,0 +1,49 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The following lines of boilerplate have to be in your project's +# CMakeLists in this exact order for cmake to work correctly +cmake_minimum_required(VERSION 3.5) + +set(PROJECT_VER "v1.0") +set(PROJECT_VER_NUMBER 1) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/../../common/cmake/idf_flashing.cmake) + +set(EXTRA_COMPONENT_DIRS + "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" +) + +project(chip-thread-br-app) + +# C++17 is required for RPC build. +idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DCHIP_HAVE_CONFIG_H" APPEND) +idf_build_set_property(C_COMPILE_OPTIONS "-Os" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) + +# We don't need Thread Network Commissioning Driver +idf_build_set_property(COMPILE_OPTIONS "-D_NO_GENERIC_THREAD_NETWORK_COMMISSIONING_DRIVER_" APPEND) + +# -Wmaybe-uninitialized has too many false positives, including on std::optional +# and chip::Optional. Make it nonfatal. +# +# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 +idf_build_set_property(COMPILE_OPTIONS "-Wno-error=maybe-uninitialized" APPEND) + +flashing_script() diff --git a/examples/thread-br-app/esp32/README.md b/examples/thread-br-app/esp32/README.md new file mode 100644 index 00000000000000..576339cd43b224 --- /dev/null +++ b/examples/thread-br-app/esp32/README.md @@ -0,0 +1,94 @@ +# Matter ESP32 Thread Border Router Example + +A prototype application that demonstrates OpenThread Border Router on ESP32-S3 + +ESP32-H2 Thread Border Router DevKit Board. + +Please +[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) +and refer +[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md) +guides to get started. + +--- + +- [OpenThread Border Router Board](#openthread-border-router-board) +- [OpenThread RCP](#openthread-rcp) +- [OpenThread CLI](#openthread-cli) +- [Setup Thread Network](#setup-thread-network) +- [Commissioning Thread End Devices](#commissioning-thread-end-devices) + +--- + +### OpenThread Border Router Board + +The ESP Thread border router board provides an integrated module of an ESP32-S3 +and an ESP32-H2. + +![Border Router Board](image/esp-thread-border-router-board.png) + +### OpenThread RCP + +We need to build an OpenThread RCP(Radio Co-Processor) firmware for ESP32-H2 of +the Border Router Board before building this Thread Border example. + +``` +cd $IDF_PATH/examples/openthread/ot_rcp +idf.py set-target esp32h2 +idf.py build +``` + +Then we need to connect the USB2 port(ESP32-S3) of the Border Router Board to +your host machine. Build and flash this example. + +``` +cd ${CHIP_ROOT}/examples/thread-br-app/esp32 +idf.py set-target esp32s3 +idf.py build +idf.py -p {port} erase-flash flash monitor +``` + +This example will detect the RCP firmware built in ESP-IDF path and flash it to +the spiffs partition. When starting this example, the ESP32-S3 will compare the +versions of both the RCP firmware in the spiffs partition and the firmware on +ESP32-H2. if the spiffs RCP firmware is newer than the firmware on ESP32-H2, the +Thread BR will flash the RCP firmware to ESP32-H2 automatically. + +### OpenThread CLI + +After you build this example and flash it to the ESP32-S3 of Border Router +Board, you can access a standard OpenThread CLI via the device console with a +`matter otcli` prefix. + +For instance, you can get the state: + +``` +> matter otcli state +Detached +Done +``` + +### Setup Thread Network + +You can send SetActiveDatasetRequest command to the Thread BR after +commissioning it as a Matter-Over-Wi-Fi device to setup the Thread network or +join an existing Thread network. + +``` +./chip-tool pairing ble-wifi 1 20202021 3840 +./chip-tool generalcommissioning arm-fail-safe 180 1 1 0 +./chip-tool threadborderroutermanagement set-active-dataset-request hex: 1 1 1 +./chip-tool generalcommissioning commissioning-complete 1 0 +``` + +The Thread BR with enable the Thread network interface and start Thread network +after it receives SetActiveDatasetRequest command. And after the Thread BR sets +up or join a Thread network, it will send the success response. + +### Commissioning Thread End Devices + +After setting up the Thread network, you can commission a Thread End-device to +the Thread network. + +``` +./chip-tool pairing ble-wifi 2 hex: +``` diff --git a/examples/thread-br-app/esp32/create_ota_image.py b/examples/thread-br-app/esp32/create_ota_image.py new file mode 100755 index 00000000000000..56f7caa81f1b85 --- /dev/null +++ b/examples/thread-br-app/esp32/create_ota_image.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 + +import argparse +import os +import pathlib +import struct + +FILETAG_RCP_VERSION = 0 +FILETAG_RCP_FLASH_ARGS = 1 +FILETAG_RCP_BOOTLOADER = 2 +FILETAG_RCP_PARTITION_TABLE = 3 +FILETAG_RCP_FIRMWARE = 4 +FILETAG_BR_OTA_IMAGE = 5 +FILETAG_IMAGE_HEADER = 0xff + +HEADER_ENTRY_SIZE = 3 * 4 +RCP_IMAGE_HEADER_SIZE = HEADER_ENTRY_SIZE * 6 +RCP_FLASH_ARGS_SIZE = 2 * 4 * 3 + + +def append_subfile_header(fout, tag, size, offset): + fout.write(struct.pack(' 0: + fout.write(data) + data = fin.read(buf_size) + + +def append_flash_args(fout, flash_args_path): + with open(flash_args_path, 'r') as f: + # skip first line + next(f) + partition_info_list = [line.split() for line in f] + for offset, partition_file in partition_info_list: + offset = int(offset, 0) + if partition_file.find('bootloader') >= 0: + fout.write(struct.pack('= 0: + fout.write(struct.pack('" +) diff --git a/examples/thread-br-app/esp32/main/DeviceCallbacks.cpp b/examples/thread-br-app/esp32/main/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..6925df9b21da8f --- /dev/null +++ b/examples/thread-br-app/esp32/main/DeviceCallbacks.cpp @@ -0,0 +1,61 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ + +#include "DeviceCallbacks.h" +#include "common/Esp32ThreadInit.h" +#include "platform/ESP32/OpenthreadLauncher.h" +#include "platform/ThreadStackManager.h" +#include +#include +#include +#include + +static const char TAG[] = "thread-br-app-callbacks"; + +using namespace chip; +using namespace chip::Inet; +using namespace chip::System; +using namespace chip::app::Clusters; + +void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) +{ + ESP_LOGI(TAG, "PostAttributeChangeCallback - Cluster ID: '0x%" PRIx32 "', EndPoint ID: '0x%x', Attribute ID: '0x%" PRIx32 "'", + clusterId, endpointId, attributeId); + + ESP_LOGI(TAG, "Current free heap: %u\n", static_cast(heap_caps_get_free_size(MALLOC_CAP_8BIT))); +} + +void AppDeviceCallbacksDelegate::OnIPv6ConnectivityEstablished(void) +{ + static bool sThreadBRInitialized = false; + if (!sThreadBRInitialized) + { + esp_openthread_lock_acquire(portMAX_DELAY); + esp_openthread_border_router_init(); + esp_openthread_lock_release(); + sThreadBRInitialized = true; + } +} diff --git a/examples/thread-br-app/esp32/main/Kconfig.projbuild b/examples/thread-br-app/esp32/main/Kconfig.projbuild new file mode 100644 index 00000000000000..7f65d083795e42 --- /dev/null +++ b/examples/thread-br-app/esp32/main/Kconfig.projbuild @@ -0,0 +1,45 @@ +# +# Copyright (c) 2022 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. +# +# Description: +# Configuration options CHIP ESP32 demo application. +# + +menu "Demo" + choice + prompt "Rendezvous Mode" + default RENDEZVOUS_MODE_BLE + help + Specifies the Rendezvous mode of the peripheral. + + config RENDEZVOUS_MODE_WIFI + bool "Wi-Fi" + config RENDEZVOUS_MODE_BLE + bool "BLE" + config RENDEZVOUS_MODE_THREAD + bool "Thread" + config RENDEZVOUS_MODE_ETHERNET + bool "Ethernet" + endchoice + + config RENDEZVOUS_MODE + int + range 0 8 + default 1 if RENDEZVOUS_MODE_WIFI + default 2 if RENDEZVOUS_MODE_BLE + default 4 if RENDEZVOUS_MODE_THREAD + default 8 if RENDEZVOUS_MODE_ETHERNET +endmenu diff --git a/examples/thread-br-app/esp32/main/include/DeviceCallbacks.h b/examples/thread-br-app/esp32/main/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..1507e284e0d5f5 --- /dev/null +++ b/examples/thread-br-app/esp32/main/include/DeviceCallbacks.h @@ -0,0 +1,45 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include +#include + +class AppDeviceCallbacks : public CommonDeviceCallbacks +{ +public: + virtual void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value); +}; + +class AppDeviceCallbacksDelegate : public DeviceCallbacksDelegate +{ +public: + void OnIPv4ConnectivityEstablished(void) override {} + void OnIPv4ConnectivityLost(void) override {} + void OnIPv6ConnectivityEstablished(void) override; + void OnDnssdInitialized(void) override {} +}; diff --git a/examples/thread-br-app/esp32/main/main.cpp b/examples/thread-br-app/esp32/main/main.cpp new file mode 100644 index 00000000000000..d419e2a73505b3 --- /dev/null +++ b/examples/thread-br-app/esp32/main/main.cpp @@ -0,0 +1,158 @@ +/* + * + * Copyright (c) 2022 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 "DeviceCallbacks.h" +#include + +#include +#include +#include +#include + +#include "core/CHIPPersistentStorageDelegate.h" +#include "esp_log.h" +#include "esp_netif.h" +#include "esp_openthread_border_router.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "nvs_flash.h" +#include "shell_extension/launch.h" +#include "support/CHIPMem.h" + +#include +#include +#include +#include +#include +#include + +#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER +#include +#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER + +#if CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER +#include +#else +#include +#endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER + +using namespace ::chip; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceManager; +using namespace ::chip::DeviceLayer; +using namespace ::chip::app::Clusters; + +namespace { +#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER +DeviceLayer::ESP32FactoryDataProvider sFactoryDataProvider; +#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER + +#if CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER +DeviceLayer::ESP32DeviceInfoProvider gExampleDeviceInfoProvider; +#else +DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; +#endif // CONFIG_ENABLE_ESP32_DEVICE_INFO_PROVIDER +} // namespace + +static const char TAG[] = "thread-br-app"; + +static AppDeviceCallbacks EchoCallbacks; +static AppDeviceCallbacksDelegate sAppDeviceCallbacksDelegate; + +static constexpr EndpointId kThreadBRMgmtEndpoint = 1; +static ThreadBorderRouterManagement::GenericOpenThreadBorderRouterDelegate * sThreadBRDelegate; +static ThreadBorderRouterManagement::ServerInstance * sThreadBRMgmtInstance; + +static void InitServer(intptr_t context) +{ + // Print QR Code URL + PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE)); + + Esp32AppServer::Init(); // Init ZCL Data Model and CHIP App Server AND Initialize device attestation config + PersistentStorageDelegate * storageDelegate = &chip::Server::GetInstance().GetPersistentStorage(); + sThreadBRDelegate = chip::Platform::New(storageDelegate); + sThreadBRMgmtInstance = chip::Platform::New( + kThreadBRMgmtEndpoint, sThreadBRDelegate, chip::Server::GetInstance().GetFailSafeContext()); + sThreadBRMgmtInstance->Init(); +} + +extern "C" void app_main() +{ + // Initialize the ESP NVS layer. + esp_err_t err = nvs_flash_init(); + if (err != ESP_OK) + { + ESP_LOGE(TAG, "nvs_flash_init() failed: %s", esp_err_to_name(err)); + return; + } + err = esp_event_loop_create_default(); + if (err != ESP_OK) + { + ESP_LOGE(TAG, "esp_event_loop_create_default() failed: %s", esp_err_to_name(err)); + return; + } + + ESP_LOGI(TAG, "=================================================="); + ESP_LOGI(TAG, "chip-esp32-thread-br-example starting"); + ESP_LOGI(TAG, "=================================================="); + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + if (DeviceLayer::Internal::ESP32Utils::InitWiFiStack() != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "Failed to initialize the Wi-Fi stack"); + return; + } +#endif + +#if CONFIG_ENABLE_CHIP_SHELL +#if CONFIG_OPENTHREAD_CLI + chip::RegisterOpenThreadCliCommands(); +#endif + chip::LaunchShell(); +#endif // CONFIG_ENABLE_CHIP_SHELL + + DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance(); + CHIP_ERROR error = deviceMgr.Init(&EchoCallbacks); + DeviceCallbacksDelegate::Instance().SetAppDelegate(&sAppDeviceCallbacksDelegate); + if (error != CHIP_NO_ERROR) + { + ESP_LOGE(TAG, "device.Init() failed: %" CHIP_ERROR_FORMAT, error.Format()); + return; + } + +#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER + SetCommissionableDataProvider(&sFactoryDataProvider); + SetDeviceAttestationCredentialsProvider(&sFactoryDataProvider); +#if CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER + SetDeviceInstanceInfoProvider(&sFactoryDataProvider); +#endif +#else + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); +#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER + esp_openthread_set_backbone_netif(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF")); + ESPOpenThreadInit(); + + chip::DeviceLayer::PlatformMgr().ScheduleWork(InitServer, reinterpret_cast(nullptr)); +} + +extern "C" void otSysProcessDrivers(otInstance * aInstance) +{ + (void) aInstance; +} diff --git a/examples/thread-br-app/esp32/partitions.csv b/examples/thread-br-app/esp32/partitions.csv new file mode 100644 index 00000000000000..c451874965912a --- /dev/null +++ b/examples/thread-br-app/esp32/partitions.csv @@ -0,0 +1,8 @@ +# Name, Type, SubType, Offset, Size, Flags +# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap +nvs, data, nvs, , 0xC000, +otadata, data, ota, , 0x2000, +phy_init, data, phy, , 0x1000, +ota_0, app, ota_0, , 1800K, +ota_1, app, ota_1, , 1200K, +rcp_fw, data, spiffs, , 640K, diff --git a/examples/thread-br-app/esp32/sdkconfig.defaults b/examples/thread-br-app/esp32/sdkconfig.defaults new file mode 100644 index 00000000000000..dffd9283bc498a --- /dev/null +++ b/examples/thread-br-app/esp32/sdkconfig.defaults @@ -0,0 +1,74 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Description: +# Some useful defaults for the demo app configuration. +# + +# Flash size and partition table +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y +CONFIG_PARTITION_TABLE_CUSTOM=y + +# BLE +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n + +# Increase some stack size +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=7200 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=5120 +CONFIG_ESP_TIMER_TASK_STACK_SIZE=5120 + +# USB console for Thread border board +CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y + +# Disable SoftAP +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n + +# LWIP +CONFIG_LWIP_IPV6_FORWARD=y +CONFIG_LWIP_IPV6_AUTOCONFIG=y +CONFIG_LWIP_IPV6_NUM_ADDRESSES=8 +CONFIG_LWIP_MULTICAST_PING=y +CONFIG_LWIP_NETIF_STATUS_CALLBACK=y +CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y +CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y +CONFIG_LWIP_HOOK_IP6_INPUT_CUSTOM=y +CONFIG_LWIP_HOOK_IP6_SELECT_SRC_ADDR_CUSTOM=y + +# ESP Border Router will also enable a route hook so we don't need the route hook in matter +CONFIG_ENABLE_ROUTE_HOOK=n + +# mbedTLS +CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE=y +CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +CONFIG_MBEDTLS_ECJPAKE_C=y +CONFIG_MBEDTLS_HKDF_C=y + +# OpenThread +CONFIG_OPENTHREAD_ENABLED=y +CONFIG_OPENTHREAD_LOG_LEVEL_DYNAMIC=n +CONFIG_OPENTHREAD_LOG_LEVEL_NOTE=y +CONFIG_OPENTHREAD_SRP_CLIENT=n +CONFIG_OPENTHREAD_DNS_CLIENT=n +CONFIG_OPENTHREAD_BORDER_ROUTER=y +CONFIG_THREAD_NETWORK_COMMISSIONING_DRIVER=n + +# Use platform mDNS +CONFIG_USE_MINIMAL_MDNS=n + +# Enable Matter shell +CONFIG_ENABLE_CHIP_SHELL=y diff --git a/examples/thread-br-app/esp32/third_party/connectedhomeip b/examples/thread-br-app/esp32/third_party/connectedhomeip new file mode 120000 index 00000000000000..11a54ed360106c --- /dev/null +++ b/examples/thread-br-app/esp32/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../ \ No newline at end of file diff --git a/examples/thread-br-app/thread-br-common/thread-br-app.matter b/examples/thread-br-app/thread-br-common/thread-br-app.matter new file mode 100644 index 00000000000000..1b043a7cdde916 --- /dev/null +++ b/examples/thread-br-app/thread-br-common/thread-br-app.matter @@ -0,0 +1,1721 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + int64u token = 0; + nullable long_char_string instruction = 1; + nullable long_char_string redirectURL = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for how dates and times are conveyed. As such, Nodes that visually + or audibly convey time information need a mechanism by which they can be configured to use a + user’s preferred format. */ +cluster TimeFormatLocalization = 44 { + revision 1; // NOTE: Default/not specifically set + + enum CalendarTypeEnum : enum8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + kUseActiveLocale = 255; + } + + enum HourFormatEnum : enum8 { + k12hr = 0; + k24hr = 1; + kUseActiveLocale = 255; + } + + bitmap Feature : bitmap32 { + kCalendarFormat = 0x1; + } + + attribute access(write: manage) HourFormatEnum hourFormat = 0; + attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; + readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 2; + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** Manage the Thread network of Thread Border Router */ +provisional cluster ThreadBorderRouterManagement = 1106 { + revision 1; + + bitmap Feature : bitmap32 { + kPANChange = 0x1; + } + + provisional readonly attribute char_string<63> borderRouterName = 0; + provisional readonly attribute octet_string<254> borderAgentID = 1; + provisional readonly attribute int16u threadVersion = 2; + provisional readonly attribute boolean interfaceEnabled = 3; + provisional readonly attribute nullable int64u activeDatasetTimestamp = 4; + provisional readonly attribute nullable int64u pendingDatasetTimestamp = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + response struct DatasetResponse = 2 { + octet_string<254> dataset = 0; + } + + request struct SetActiveDatasetRequestRequest { + octet_string<254> activeDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct SetPendingDatasetRequestRequest { + octet_string<254> pendingDataset = 0; + } + + /** Command to request the active operational dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */ + command access(invoke: manage) GetActiveDatasetRequest(): DatasetResponse = 0; + /** Command to request the pending dataset of the Thread network to which the border router is connected. This command must be sent over a valid CASE session */ + command access(invoke: manage) GetPendingDatasetRequest(): DatasetResponse = 1; + /** Command to set or update the active Dataset of the Thread network to which the Border Router is connected. */ + command access(invoke: manage) SetActiveDatasetRequest(SetActiveDatasetRequestRequest): DefaultSuccess = 3; + /** Command set or update the pending Dataset of the Thread network to which the Border Router is connected. */ + command access(invoke: manage) SetPendingDatasetRequest(SetPendingDatasetRequestRequest): DefaultSuccess = 4; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster LocalizationConfiguration { + persist attribute activeLocale default = "en-US"; + callback attribute supportedLocales; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster TimeFormatLocalization { + persist attribute hourFormat default = 0; + persist attribute activeCalendarType default = 0; + callback attribute supportedCalendarTypes; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type ma_thread_border_router = 145, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster ThreadBorderRouterManagement { + callback attribute borderRouterName; + callback attribute borderAgentID; + callback attribute threadVersion; + callback attribute interfaceEnabled; + callback attribute activeDatasetTimestamp; + callback attribute pendingDatasetTimestamp; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command GetActiveDatasetRequest; + handle command GetPendingDatasetRequest; + handle command DatasetResponse; + handle command SetActiveDatasetRequest; + handle command SetPendingDatasetRequest; + } +} + + diff --git a/examples/thread-br-app/thread-br-common/thread-br-app.zap b/examples/thread-br-app/thread-br-common/thread-br-app.zap new file mode 100644 index 00000000000000..e8c999068390e6 --- /dev/null +++ b/examples/thread-br-app/thread-br-common/thread-br-app.zap @@ -0,0 +1,3041 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 145, + "profileId": 259, + "label": "MA-thread-border-router", + "name": "MA-thread-border-router" + }, + "deviceTypes": [ + { + "code": 145, + "profileId": 259, + "label": "MA-thread-border-router", + "name": "MA-thread-border-router" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 145 + ], + "deviceTypeName": "MA-thread-border-router", + "deviceTypeCode": 145, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Border Router Management", + "code": 1106, + "mfgCode": null, + "define": "THREAD_BORDER_ROUTER_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "GetActiveDatasetRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetPendingDatasetRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "DatasetResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetActiveDatasetRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetPendingDatasetRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BorderRouterName", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BorderAgentID", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveDatasetTimestamp", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingDatasetTimestamp", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": null + } + ] +} \ No newline at end of file diff --git a/examples/tv-app/android/App/platform-app/build.gradle b/examples/tv-app/android/App/platform-app/build.gradle index 0845105bffccc5..5b4203e9c1509c 100644 --- a/examples/tv-app/android/App/platform-app/build.gradle +++ b/examples/tv-app/android/App/platform-app/build.gradle @@ -72,4 +72,4 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation 'com.google.zxing:core:3.3.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" -} +} \ No newline at end of file diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/handlers/ApplicationLauncherManagerImpl.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/handlers/ApplicationLauncherManagerImpl.java new file mode 100644 index 00000000000000..bb1856ec6e14d1 --- /dev/null +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/handlers/ApplicationLauncherManagerImpl.java @@ -0,0 +1,165 @@ +package com.matter.tv.server.handlers; + +import android.content.Context; +import android.content.pm.PackageManager; +import android.util.Log; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import com.matter.tv.server.tvapp.Application; +import com.matter.tv.server.tvapp.ApplicationLauncherManager; +import com.matter.tv.server.tvapp.LauncherResponse; +import com.matter.tv.server.utils.EndpointsDataStore; +import com.matter.tv.server.utils.InstallationObserver; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +public class ApplicationLauncherManagerImpl implements ApplicationLauncherManager { + + private static final String TAG = "ApplicationLauncherService"; + + private volatile boolean registered = false; + private PackageManager packageManager; + private EndpointsDataStore endpointsDataStore; + + /** Hash Map of packageName & Install Status */ + private Map lastReceivedInstallationStatus = + new HashMap<>(); + + private LiveData installStateLiveData; + + public ApplicationLauncherManagerImpl(Context context) { + packageManager = context.getPackageManager(); + endpointsDataStore = EndpointsDataStore.getInstance(context); + registerSelf(context); + } + + private final Observer installStateObserver = + state -> { + lastReceivedInstallationStatus.put(state.getAppPackageName(), state.getStatus()); + switch (state.getStatus()) { + case IN_PROGRESS: + // Installation is in progress + Log.d(TAG, "Installation of " + state.getAppPackageName() + " in progress"); + break; + case SUCCEEDED: + // Installation succeeded + Log.d(TAG, "Installation of " + state.getAppPackageName() + " succeeded"); + break; + case FAILED: + // Installation failed + Log.d(TAG, "Installation of " + state.getAppPackageName() + " failed"); + break; + } + }; + + private void stopObservingInstallations() { + if (installStateLiveData != null) { + Log.d("InstallationObserver", "Stopped Observing"); + installStateLiveData.removeObserver(installStateObserver); + } + } + + public void unregister() { + stopObservingInstallations(); + } + + private void registerSelf(Context context) { + if (registered) { + Log.i(TAG, "Package update receiver for matter already registered"); + return; + } else { + registered = true; + } + Log.i(TAG, "Registered the matter package updates receiver"); + + installStateLiveData = InstallationObserver.installationStates(context); + installStateLiveData.observeForever(installStateObserver); + Log.d(TAG, "Started Observing package installations"); + } + + @Override + public int[] getCatalogList() { + Log.i(TAG, "Get Catalog List"); + return new int[] {123, 456, 89010}; + } + + @Override + public LauncherResponse launchApp(Application app, String data) { + Log.i( + TAG, + "Launch app id:" + app.applicationId + " cid:" + app.catalogVendorId + " data:" + data); + + int status = 0; + String responseData = ""; + + // Installed Apps that have declared CSA product id & vendor id in their manifes + boolean matterEnabledAppdIsInstalled = + endpointsDataStore.getAllPersistedContentApps().containsKey(app.applicationId); + // Installed App + boolean appIsInstalled = + InstallationObserver.getInstalledPackages(packageManager).contains(app.applicationId); + boolean isAppInstalling = + Objects.equals( + lastReceivedInstallationStatus.get(app.applicationId), + InstallationObserver.InstallStatus.IN_PROGRESS); + boolean appInstallFailed = + Objects.equals( + lastReceivedInstallationStatus.get(app.applicationId), + InstallationObserver.InstallStatus.FAILED); + + // This use-case can happen if app is installed + // but it does not support Matter + if (!matterEnabledAppdIsInstalled && appIsInstalled) { + Log.i( + TAG, + "Matter enabled app is not installed, but app is installed. Launching app's install page"); + status = LauncherResponse.STATUS_PENDING_USER_APPROVAL; + responseData = "App is installed, try updating"; + + // + // Add code to launch App Install Page + // + + } else if (!matterEnabledAppdIsInstalled && !appIsInstalled) { + Log.i( + TAG, + "Matter enabled app is not installed and app is not installed. Launching app's install page"); + if (isAppInstalling) { + Log.i(TAG, "App is installing"); + status = LauncherResponse.STATUS_INSTALLING; + } else { + status = LauncherResponse.STATUS_PENDING_USER_APPROVAL; + if (appInstallFailed) { + responseData = "App install failed. Try again"; + } + } + + // + // Add code to launch App Install Page + // + + } else if (matterEnabledAppdIsInstalled && appIsInstalled) { + Log.i(TAG, "Launching the app"); + status = LauncherResponse.STATUS_SUCCESS; + + // + // Add code to launch an app + // + } + + return new LauncherResponse(status, responseData); + } + + @Override + public LauncherResponse stopApp(Application app) { + Log.i(TAG, "Stop app id:" + app.applicationId + " cid:" + app.catalogVendorId); + return new LauncherResponse(LauncherResponse.STATUS_SUCCESS, ""); + } + + @Override + public LauncherResponse hideApp(Application app) { + Log.i(TAG, "Hide app id:" + app.applicationId + " cid:" + app.catalogVendorId); + return new LauncherResponse(LauncherResponse.STATUS_SUCCESS, ""); + } +} diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServant.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServant.java index c1d479e6d147e1..683fb226c9e441 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServant.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/MatterServant.java @@ -30,6 +30,8 @@ import chip.platform.PreferencesConfigurationManager; import chip.platform.PreferencesKeyValueStoreManager; import com.matter.tv.server.MatterCommissioningPrompter; +import com.matter.tv.server.handlers.ApplicationLauncherManagerImpl; +import com.matter.tv.server.tvapp.ApplicationLauncherManager; import com.matter.tv.server.tvapp.ChannelManagerStub; import com.matter.tv.server.tvapp.Clusters; import com.matter.tv.server.tvapp.ContentLaunchManagerStub; @@ -55,6 +57,8 @@ public class MatterServant { private boolean mIsOn = true; private int mOnOffEndpoint; private int mLevelEndpoint; + private MatterCommissioningPrompter matterCommissioningPrompter; + private ApplicationLauncherManager applicationLauncherManager; private MatterServant() {} @@ -72,17 +76,25 @@ public void init(@NonNull Context context) { this.context = context; + this.applicationLauncherManager = new ApplicationLauncherManagerImpl(context); + // The order is important, must // first new TvApp to load dynamic library // then chipPlatform to prepare platform // then TvApp.preServerInit to initialize any server configuration // then start ChipAppServer // then TvApp.postServerInit to init app platform + // + // TODO: Move all of the bellow KeypadInputManager...LevelManagerStub to + // PlatformAppCommandDelegate + // There is no need for this complicated logic mTvApp = new TvApp( (app, clusterId, endpoint) -> { if (clusterId == Clusters.ClusterId_KeypadInput) { app.setKeypadInputManager(endpoint, new KeypadInputManagerStub(endpoint)); + } else if (clusterId == Clusters.ClusterId_ApplicationLauncher) { + app.setApplicationLauncherManager(endpoint, applicationLauncherManager); } else if (clusterId == Clusters.ClusterId_WakeOnLan) { app.setWakeOnLanManager(endpoint, new WakeOnLanManagerStub(endpoint)); } else if (clusterId == Clusters.ClusterId_MediaInput) { diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/EndpointsDataStore.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/EndpointsDataStore.java index 227ea9326be538..7b3822bb1b59a4 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/EndpointsDataStore.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/EndpointsDataStore.java @@ -4,6 +4,7 @@ import android.content.SharedPreferences; import android.util.JsonReader; import android.util.JsonWriter; +import android.util.Log; import com.matter.tv.app.api.SupportedCluster; import com.matter.tv.server.model.ContentApp; import java.io.IOException; @@ -59,6 +60,7 @@ public Map getAllPersistedContentApps() { } public void persistContentAppEndpoint(ContentApp app) { + Log.i(EndpointsDataStore.class.toString(), "Persist Content App Endpoint " + app.getAppName()); persistedContentApps.put(app.getAppName(), app); discoveredEndpoints.edit().putString(app.getAppName(), serializeContentApp(app)).apply(); } diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/InstallationObserver.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/InstallationObserver.java new file mode 100644 index 00000000000000..c47359272a1359 --- /dev/null +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/InstallationObserver.java @@ -0,0 +1,137 @@ +package com.matter.tv.server.utils; + +import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.pm.PackageInstaller; +import android.content.pm.PackageManager; +import android.util.Log; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.MutableLiveData; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Set; + +public class InstallationObserver { + public enum InstallStatus { + IN_PROGRESS, + SUCCEEDED, + FAILED + } + + public static class InstallState { + private final String appPackageName; + private final InstallStatus status; + + public InstallState(String appPackageName, InstallStatus status) { + this.appPackageName = appPackageName; + this.status = status; + } + + public String getAppPackageName() { + return appPackageName; + } + + public InstallStatus getStatus() { + return status; + } + + public String getPackageShortName() { + return appPackageName.substring(appPackageName.lastIndexOf(".") + 1); + } + + public String getPackageTitle() { + String shortName = getPackageShortName(); + return shortName.substring(0, 1).toUpperCase(Locale.getDefault()) + shortName.substring(1); + } + } + + private static InstallState stateFromId(PackageInstaller installer, int sessionId) { + PackageInstaller.SessionInfo info = installer.getSessionInfo(sessionId); + if (info == null || info.getAppPackageName() == null) { + return null; + } + return new InstallState(info.getAppPackageName(), InstallStatus.IN_PROGRESS); + } + + public static Set getInstalledPackages(PackageManager packageManager) { + List packageInfoList = packageManager.getInstalledPackages(0); + Set setOfInstalledApps = new HashSet<>(); + for (PackageInfo info : packageInfoList) { + setOfInstalledApps.add(info.packageName); + } + return setOfInstalledApps; + } + + public static LiveData installationStates(Context context) { + MutableLiveData liveData = new MutableLiveData<>(); + PackageInstaller packageInstaller = context.getPackageManager().getPackageInstaller(); + Map inProgressSessions = new HashMap<>(); + + PackageInstaller.SessionCallback callback = + new PackageInstaller.SessionCallback() { + @Override + public void onCreated(int sessionId) { + Log.d(TAG, "onCreated "); + InstallState state = stateFromId(packageInstaller, sessionId); + if (state != null) { + inProgressSessions.put(sessionId, state); + liveData.postValue(state); + } + } + + @Override + public void onBadgingChanged(int sessionId) {} + + @Override + public void onActiveChanged(int sessionId, boolean active) { + Log.d(TAG, "onActiveChanged"); + InstallState state = stateFromId(packageInstaller, sessionId); + if (state != null) { + inProgressSessions.put(sessionId, state); + liveData.postValue(state); + } + } + + @Override + public void onProgressChanged(int sessionId, float progress) { + Log.d(TAG, "onProgressChanged:" + progress); + InstallState state = stateFromId(packageInstaller, sessionId); + if (state != null) { + inProgressSessions.put(sessionId, state); + liveData.postValue(state); + } + } + + @Override + public void onFinished(int sessionId, boolean success) { + Log.d(TAG, "onFinished " + sessionId + " " + success); + InstallState current = inProgressSessions.get(sessionId); + if (current != null) { + InstallState newState = + new InstallState( + current.getAppPackageName(), + success ? InstallStatus.SUCCEEDED : InstallStatus.FAILED); + liveData.postValue(newState); + inProgressSessions.remove(sessionId); + } + } + }; + + packageInstaller.registerSessionCallback(callback); + + for (PackageInstaller.SessionInfo info : packageInstaller.getMySessions()) { + if (info.isActive() && info.getAppPackageName() != null) { + InstallState state = new InstallState(info.getAppPackageName(), InstallStatus.IN_PROGRESS); + inProgressSessions.put(info.getSessionId(), state); + liveData.postValue(state); + } + } + + return liveData; + } + + private static final String TAG = "InstallationObserver"; +} diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/ResourceUtils.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/ResourceUtils.java index 1a04c5294d2f30..f0feb70d529677 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/ResourceUtils.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/utils/ResourceUtils.java @@ -58,38 +58,43 @@ public Set getSupportedClusters(final Resources resources, fin SupportedCluster cluster = new SupportedCluster(); while (reader.hasNext()) { String name = reader.nextName(); - if (name.equals(KEY_CLUSTER_ID)) { - cluster.clusterIdentifier = reader.nextInt(); - } else if (name.equals(KEY_FEATURE_FLAGS)) { - cluster.features = reader.nextInt(); - } else if (name.equals(KEY_OPTIONAL_COMMANDS)) { - List commands = new ArrayList<>(); - reader.beginArray(); - while (reader.hasNext()) { - commands.add(reader.nextInt()); + try { + if (name.equals(KEY_CLUSTER_ID)) { + cluster.clusterIdentifier = reader.nextInt(); + } else if (name.equals(KEY_FEATURE_FLAGS)) { + cluster.features = reader.nextInt(); + } else if (name.equals(KEY_OPTIONAL_COMMANDS)) { + List commands = new ArrayList<>(); + reader.beginArray(); + while (reader.hasNext()) { + commands.add(reader.nextInt()); + } + reader.endArray(); + int[] commandIds = new int[commands.size()]; + int i = 0; + for (Integer command : commands) { + commandIds[i++] = command; + } + cluster.optionalCommandIdentifiers = commandIds; + } else if (name.equals(KEY_OPTIONAL_ATTRIBUTES)) { + List attributes = new ArrayList<>(); + reader.beginArray(); + while (reader.hasNext()) { + attributes.add(reader.nextInt()); + } + reader.endArray(); + int[] attributeIds = new int[attributes.size()]; + int i = 0; + for (Integer command : attributes) { + attributeIds[i++] = command; + } + cluster.optionalAttributesIdentifiers = attributeIds; + } else { + reader.skipValue(); } - reader.endArray(); - int[] commandIds = new int[commands.size()]; - int i = 0; - for (Integer command : commands) { - commandIds[i++] = command; - } - cluster.optionalCommandIdentifiers = commandIds; - } else if (name.equals(KEY_OPTIONAL_ATTRIBUTES)) { - List attributes = new ArrayList<>(); - reader.beginArray(); - while (reader.hasNext()) { - attributes.add(reader.nextInt()); - } - reader.endArray(); - int[] attributeIds = new int[attributes.size()]; - int i = 0; - for (Integer command : attributes) { - attributeIds[i++] = command; - } - cluster.optionalAttributesIdentifiers = attributeIds; - } else { - reader.skipValue(); + } catch (NumberFormatException | IllegalStateException e) { + Log.e(TAG, "Invalid number format in JSON for key: " + name, e); + reader.skipValue(); // Skip the invalid entry } } supportedClusters.add(cluster); diff --git a/examples/tv-app/android/BUILD.gn b/examples/tv-app/android/BUILD.gn index 38c75d9273c243..f08f16f363e516 100644 --- a/examples/tv-app/android/BUILD.gn +++ b/examples/tv-app/android/BUILD.gn @@ -28,8 +28,6 @@ shared_library("jni") { "include/account-login/AccountLoginManager.h", "include/application-basic/ApplicationBasicManager.cpp", "include/application-basic/ApplicationBasicManager.h", - "include/application-launcher/ApplicationLauncherManager.cpp", - "include/application-launcher/ApplicationLauncherManager.h", "include/audio-output/AudioOutputManager.cpp", "include/audio-output/AudioOutputManager.h", "include/cluster-init.cpp", @@ -80,6 +78,8 @@ shared_library("jni") { "java/TVApp-JNI.cpp", "java/WakeOnLanManager.cpp", "java/WakeOnLanManager.h", + "java/application-launcher/ApplicationLauncherManager.cpp", + "java/application-launcher/ApplicationLauncherManager.h", ] deps = [ @@ -115,6 +115,8 @@ android_library("java") { sources = [ "java/src/com/matter/tv/server/tvapp/AppPlatform.java", "java/src/com/matter/tv/server/tvapp/AppPlatformShellCommands.java", + "java/src/com/matter/tv/server/tvapp/Application.java", + "java/src/com/matter/tv/server/tvapp/ApplicationLauncherManager.java", "java/src/com/matter/tv/server/tvapp/ChannelInfo.java", "java/src/com/matter/tv/server/tvapp/ChannelLineupInfo.java", "java/src/com/matter/tv/server/tvapp/ChannelManager.java", @@ -136,6 +138,7 @@ android_library("java") { "java/src/com/matter/tv/server/tvapp/DeviceEventProvider.java", "java/src/com/matter/tv/server/tvapp/KeypadInputManager.java", "java/src/com/matter/tv/server/tvapp/KeypadInputManagerStub.java", + "java/src/com/matter/tv/server/tvapp/LauncherResponse.java", "java/src/com/matter/tv/server/tvapp/LevelManager.java", "java/src/com/matter/tv/server/tvapp/LevelManagerStub.java", "java/src/com/matter/tv/server/tvapp/LowPowerManager.java", diff --git a/examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.cpp b/examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.cpp deleted file mode 100644 index c915856f48fd4d..00000000000000 --- a/examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.cpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "ApplicationLauncherManager.h" - -using namespace std; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::ApplicationLauncher; -using namespace chip::Uint8; - -CHIP_ERROR ApplicationLauncherManager::HandleGetCatalogList(AttributeValueEncoder & aEncoder) -{ - std::list catalogList = { 123, 456 }; - return aEncoder.EncodeList([catalogList](const auto & encoder) -> CHIP_ERROR { - for (const auto & catalog : catalogList) - { - ReturnErrorOnFailure(encoder.Encode(catalog)); - } - return CHIP_NO_ERROR; - }); -} - -void ApplicationLauncherManager::HandleLaunchApp(CommandResponseHelper & helper, const ByteSpan & data, - const ApplicationType & application) -{ - ChipLogProgress(Zcl, "ApplicationLauncherManager::HandleLaunchApp"); - - // TODO: Insert code here - LauncherResponseType response; - const char * buf = "data"; - response.data.SetValue(ByteSpan(from_const_char(buf), strlen(buf))); - response.status = StatusEnum::kSuccess; - helper.Success(response); -} - -void ApplicationLauncherManager::HandleStopApp(CommandResponseHelper & helper, - const ApplicationType & application) -{ - ChipLogProgress(Zcl, "ApplicationLauncherManager::HandleStopApp"); - - // TODO: Insert code here - LauncherResponseType response; - const char * buf = "data"; - response.data.SetValue(ByteSpan(from_const_char(buf), strlen(buf))); - response.status = StatusEnum::kSuccess; - helper.Success(response); -} - -void ApplicationLauncherManager::HandleHideApp(CommandResponseHelper & helper, - const ApplicationType & application) -{ - ChipLogProgress(Zcl, "ApplicationLauncherManager::HandleHideApp"); - - // TODO: Insert code here - LauncherResponseType response; - const char * buf = "data"; - response.data.SetValue(ByteSpan(from_const_char(buf), strlen(buf))); - response.status = StatusEnum::kSuccess; - helper.Success(response); -} diff --git a/examples/tv-app/android/include/cluster-init.cpp b/examples/tv-app/android/include/cluster-init.cpp index e6f0cd8b481f57..7481625b664a21 100644 --- a/examples/tv-app/android/include/cluster-init.cpp +++ b/examples/tv-app/android/include/cluster-init.cpp @@ -17,7 +17,6 @@ */ #include "application-basic/ApplicationBasicManager.h" -#include "application-launcher/ApplicationLauncherManager.h" #include "audio-output/AudioOutputManager.h" #include "target-navigator/TargetNavigatorManager.h" @@ -30,7 +29,6 @@ using namespace chip; namespace { static ApplicationBasicManager applicationBasicManager; -static ApplicationLauncherManager applicationLauncherManager; static AudioOutputManager audioOutputManager; static TargetNavigatorManager targetNavigatorManager; } // namespace @@ -50,21 +48,6 @@ void emberAfApplicationBasicClusterInitCallback(chip::EndpointId endpoint) chip::app::Clusters::ApplicationBasic::SetDefaultDelegate(endpoint, &applicationBasicManager); } -/** @brief Application Launcher 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 emberAfApplicationLauncherClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Android App: ApplicationLauncher::SetDefaultDelegate"); - chip::app::Clusters::ApplicationLauncher::SetDefaultDelegate(endpoint, &applicationLauncherManager); -} - /** @brief Audio Output Cluster Init * * This function is called when a specific cluster is initialized. It gives the diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index d04964ee5eb747..d7da8ab6661a46 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -503,6 +503,18 @@ EndpointId ContentAppFactoryImpl::RemoveContentApp(EndpointId epId) return kInvalidEndpointId; } +void ContentAppFactoryImpl::LogInstalledApps() +{ + for (auto & contentApp : mContentApps) + { + ChipLogProgress(DeviceLayer, "Content app vid=%d pid=%d id=%s is on ep=%d", + contentApp->GetApplicationBasicDelegate()->HandleGetVendorId(), + contentApp->GetApplicationBasicDelegate()->HandleGetProductId(), + contentApp->GetApplicationBasicDelegate()->GetCatalogVendorApp()->GetApplicationId(), + contentApp->GetEndpointId()); + } +} + void ContentAppFactoryImpl::AddAdminVendorId(uint16_t vendorId) { mAdminVendorIds.push_back(vendorId); @@ -572,7 +584,7 @@ CHIP_ERROR InitVideoPlayerPlatform(jobject contentAppEndpointManager) { ContentAppCommandDelegate * delegate = new ContentAppCommandDelegate(contentAppEndpointManager, contentAppClusters[i].clusterId); - chip::app::CommandHandlerInterfaceRegistry::RegisterCommandHandler(delegate); + app::CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler(delegate); ChipLogProgress(AppServer, "Registered command handler delegate for cluster %d", contentAppClusters[i].clusterId); } diff --git a/examples/tv-app/android/java/AppImpl.h b/examples/tv-app/android/java/AppImpl.h index b10c96608c8fc1..a86a11c4386626 100644 --- a/examples/tv-app/android/java/AppImpl.h +++ b/examples/tv-app/android/java/AppImpl.h @@ -35,7 +35,6 @@ #include "../include/account-login/AccountLoginManager.h" #include "../include/application-basic/ApplicationBasicManager.h" -#include "../include/application-launcher/ApplicationLauncherManager.h" #include "../include/content-control/ContentController.h" #include "../include/content-launcher/AppContentLauncherManager.h" #include "../include/media-playback/AppMediaPlaybackManager.h" @@ -45,6 +44,7 @@ #include "ContentAppAttributeDelegate.h" #include "ContentAppCommandDelegate.h" #include "KeypadInputManager.h" +#include "application-launcher/ApplicationLauncherManager.h" #include #include #include @@ -198,6 +198,8 @@ class DLL_EXPORT ContentAppFactoryImpl : public ContentAppFactory void setContentAppCommandDelegate(ContentAppCommandDelegate * commandDelegate); + void LogInstalledApps(); + protected: // TODO: Update to use unique_ptr instead of raw pointers std::vector mContentApps; diff --git a/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp b/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp index f15ef7bebae54c..cb491fcae91163 100644 --- a/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp +++ b/examples/tv-app/android/java/AppPlatformShellCommands-JNI.cpp @@ -269,6 +269,17 @@ char * AppPlatformHandler(int argc, char ** argv) } return response; } + else if (strcmp(argv[0], "print-apps") == 0) + { + ContentAppFactoryImpl * factory = GetContentAppFactoryImpl(); + factory->LogInstalledApps(); + + ChipLogProgress(DeviceLayer, "logged installed apps"); + + strcpy(response, "logged installed apps"); + + return response; + } else if (strcmp(argv[0], "remove-app-access") == 0) { Access::GetAccessControl().DeleteAllEntriesForFabric(GetDeviceCommissioner()->GetFabricIndex()); diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index 199ec7761be0c8..8d459588a7a8d6 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -133,6 +133,26 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust JniUtfString respStr(env, resp); ChipLogProgress(Zcl, "ContentAppCommandDelegate::InvokeCommand got response %s", respStr.c_str()); + Json::CharReaderBuilder readerBuilder; + std::string errors; + + std::unique_ptr testReader(readerBuilder.newCharReader()); + + if (!testReader->parse(respStr.c_str(), respStr.c_str() + std::strlen(respStr.c_str()), &value, &errors)) + { + ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str()); + env->DeleteLocalRef(resp); + return chip::Protocols::InteractionModel::Status::Failure; + } + + // Validate and access JSON data safely + if (!value.isObject()) + { + ChipLogError(Zcl, "Invalid JSON structure: not an object"); + env->DeleteLocalRef(resp); + return chip::Protocols::InteractionModel::Status::Failure; + } + Json::Reader reader; if (!reader.parse(respStr.c_str(), value)) { @@ -166,7 +186,26 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand { handlerContext.SetCommandHandled(); Json::Reader reader; + + Json::CharReaderBuilder readerBuilder; + std::string errors; + Json::Value value; + std::unique_ptr testReader(readerBuilder.newCharReader()); + + if (!testReader->parse(response, response + std::strlen(response), &value, &errors)) + { + ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str()); + return; + } + + // Validate and access JSON data safely + if (!value.isObject()) + { + ChipLogError(Zcl, "Invalid JSON structure: not an object"); + return; + } + if (!reader.parse(response, value)) { return; diff --git a/examples/tv-app/android/java/TVApp-JNI.cpp b/examples/tv-app/android/java/TVApp-JNI.cpp index 65a0a4409e9b8f..0fe1bdef939ca8 100644 --- a/examples/tv-app/android/java/TVApp-JNI.cpp +++ b/examples/tv-app/android/java/TVApp-JNI.cpp @@ -31,6 +31,7 @@ #include "MyUserPrompter-JNI.h" #include "OnOffManager.h" #include "WakeOnLanManager.h" +#include "application-launcher/ApplicationLauncherManager.h" #include "credentials/DeviceAttestationCredsProvider.h" #include #include @@ -139,6 +140,11 @@ JNI_METHOD(void, setMediaPlaybackManager)(JNIEnv *, jobject, jint endpoint, jobj MediaPlaybackManager::NewManager(endpoint, manager); } +JNI_METHOD(void, setApplicationLauncherManager)(JNIEnv *, jobject, jint endpoint, jobject manager) +{ + ApplicationLauncherManager::NewManager(endpoint, manager); +} + JNI_METHOD(void, setMessagesManager)(JNIEnv *, jobject, jint endpoint, jobject manager) { MessagesManager::NewManager(endpoint, manager); diff --git a/examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.cpp b/examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.cpp new file mode 100644 index 00000000000000..8ee91292a5e76a --- /dev/null +++ b/examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.cpp @@ -0,0 +1,345 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ApplicationLauncherManager.h" +#include "../TvApp-JNI.h" +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::ApplicationLauncher; +using namespace chip::Uint8; + +void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Android App: ApplicationLauncher::PostClusterInit"); + if (endpoint > kLocalVideoPlayerEndpointId) + { + ChipLogProgress(Zcl, "TV Android App: ignore setting the delegate for endpoints larger than 1"); + return; + } + TvAppJNIMgr().PostClusterInit(chip::app::Clusters::ApplicationLauncher::Id, endpoint); +} + +void ApplicationLauncherManager::NewManager(jint endpoint, jobject manager) +{ + if (endpoint > kLocalVideoPlayerEndpointId) + { + ChipLogProgress(Zcl, "TV Android App: ignore setting the delegate for endpoints larger than 1"); + return; + } + ChipLogProgress(Zcl, "TV Android App: ApplicationLauncher::SetDefaultDelegate for endpoint: %d", endpoint); + ApplicationLauncherManager * mgr = new ApplicationLauncherManager(); + mgr->InitializeWithObjects(manager); + chip::app::Clusters::ApplicationLauncher::SetDefaultDelegate(static_cast(endpoint), mgr); +} + +CHIP_ERROR ApplicationLauncherManager::HandleGetCatalogList(AttributeValueEncoder & aEncoder) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturnError(env != nullptr, CHIP_JNI_ERROR_NO_ENV, ChipLogError(Zcl, "Could not get JNIEnv for current thread")); + chip::JniLocalReferenceScope scope(env); + + ChipLogProgress(Zcl, "Received ApplicationLauncherManager::GetCatalogList"); + VerifyOrExit(mApplicationLauncherManagerObject.HasValidObjectRef(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mGetCatalogListMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + env->ExceptionClear(); + + return aEncoder.EncodeList([this, env](const auto & encoder) -> CHIP_ERROR { + jintArray jCatalogList = + (jintArray) env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mGetCatalogListMethod); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ApplicationLauncherManager::GetCatalogList"); + env->ExceptionDescribe(); + env->ExceptionClear(); + return CHIP_ERROR_INCORRECT_STATE; + } + + jint size = env->GetArrayLength(jCatalogList); + jint * elements = env->GetIntArrayElements(jCatalogList, 0); + for (int i = 0; i < size; i++) + { + jint jCatalogVendorId = elements[i]; + ReturnErrorOnFailure(encoder.Encode(static_cast(jCatalogVendorId))); + } + + return CHIP_NO_ERROR; + }); + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ApplicationLauncherManager::GetCatalogList status error: %s", err.AsString()); + } + + return err; +} + +void ApplicationLauncherManager::HandleLaunchApp(CommandResponseHelper & helper, const ByteSpan & data, + const ApplicationType & application) +{ + chip::DeviceLayer::StackUnlock unlock; + LauncherResponseType response; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNIEnv for current thread")); + chip::JniLocalReferenceScope scope(env); + + ChipLogProgress(Zcl, "Received ApplicationLauncherManager::LaunchApp"); + VerifyOrExit(mApplicationLauncherManagerObject.HasValidObjectRef(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mLaunchAppMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + env->ExceptionClear(); + + { + // UtfString accepts const char * data + chip::UtfString jByteData(env, reinterpret_cast(data.data())); + + chip::UtfString jappId(env, application.applicationID); + + // Create an instance of Application + jobject appObject = env->NewObject(mApplicationClass, mCreateApplicationMethod, + static_cast(application.catalogVendorID), jappId.jniValue()); + VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object")); + + jobject resp = + env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mLaunchAppMethod, appObject, jByteData.jniValue()); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ApplicationLauncherManager::LaunchApp"); + env->ExceptionDescribe(); + env->ExceptionClear(); + err = CHIP_ERROR_INCORRECT_STATE; + goto exit; + } + + VerifyOrExit(resp != nullptr, err = CHIP_JNI_ERROR_NULL_OBJECT); + jclass respCls = env->GetObjectClass(resp); + jfieldID statusFid = env->GetFieldID(respCls, "status", "I"); + VerifyOrExit(statusFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jint status = env->GetIntField(resp, statusFid); + + jfieldID dataFid = env->GetFieldID(respCls, "data", "Ljava/lang/String;"); + VerifyOrExit(dataFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jstring jdataStr = (jstring) env->GetObjectField(resp, dataFid); + chip::JniUtfString dataStr(env, jdataStr); + + response.status = static_cast(status); + response.data = chip::Optional(dataStr.byteSpan()); + + err = helper.Success(response); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ApplicationLauncherManager::LaunchApp status error: %s", err.AsString()); + } +} + +void ApplicationLauncherManager::HandleStopApp(CommandResponseHelper & helper, + const ApplicationType & application) +{ + chip::DeviceLayer::StackUnlock unlock; + LauncherResponseType response; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNIEnv for current thread")); + chip::JniLocalReferenceScope scope(env); + + ChipLogProgress(Zcl, "Received ApplicationLauncherManager::StopApp"); + VerifyOrExit(mApplicationLauncherManagerObject.HasValidObjectRef(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mStopAppMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + env->ExceptionClear(); + + { + chip::UtfString jappId(env, application.applicationID); + + // Create an instance of Application + jobject appObject = env->NewObject(mApplicationClass, mCreateApplicationMethod, + static_cast(application.catalogVendorID), jappId.jniValue()); + VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object")); + + jobject resp = env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mStopAppMethod, appObject); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ApplicationLauncherManager::StopApp"); + env->ExceptionDescribe(); + env->ExceptionClear(); + err = CHIP_ERROR_INCORRECT_STATE; + goto exit; + } + + VerifyOrExit(resp != nullptr, err = CHIP_JNI_ERROR_NULL_OBJECT); + jclass respCls = env->GetObjectClass(resp); + jfieldID statusFid = env->GetFieldID(respCls, "status", "I"); + VerifyOrExit(statusFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jint status = env->GetIntField(resp, statusFid); + + jfieldID dataFid = env->GetFieldID(respCls, "data", "Ljava/lang/String;"); + VerifyOrExit(dataFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jstring jdataStr = (jstring) env->GetObjectField(resp, dataFid); + chip::JniUtfString dataStr(env, jdataStr); + + response.status = static_cast(status); + response.data = chip::Optional(dataStr.byteSpan()); + + err = helper.Success(response); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ApplicationLauncherManager::StopApp status error: %s", err.AsString()); + } +} + +void ApplicationLauncherManager::HandleHideApp(CommandResponseHelper & helper, + const ApplicationType & application) +{ + chip::DeviceLayer::StackUnlock unlock; + LauncherResponseType response; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNIEnv for current thread")); + chip::JniLocalReferenceScope scope(env); + + ChipLogProgress(Zcl, "Received ApplicationLauncherManager::HideApp"); + VerifyOrExit(mApplicationLauncherManagerObject.HasValidObjectRef(), err = CHIP_ERROR_INCORRECT_STATE); + VerifyOrExit(mHideAppMethod != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + + env->ExceptionClear(); + + { + chip::UtfString jappId(env, application.applicationID); + + // Create an instance of Application + jobject appObject = env->NewObject(mApplicationClass, mCreateApplicationMethod, + static_cast(application.catalogVendorID), jappId.jniValue()); + VerifyOrReturn(appObject != nullptr, ChipLogError(Zcl, "Failed to create Application object")); + + jobject resp = env->CallObjectMethod(mApplicationLauncherManagerObject.ObjectRef(), mHideAppMethod, appObject); + if (env->ExceptionCheck()) + { + ChipLogError(Zcl, "Java exception in ApplicationLauncherManager::HideApp"); + env->ExceptionDescribe(); + env->ExceptionClear(); + err = CHIP_ERROR_INCORRECT_STATE; + goto exit; + } + + VerifyOrExit(resp != nullptr, err = CHIP_JNI_ERROR_NULL_OBJECT); + jclass respCls = env->GetObjectClass(resp); + jfieldID statusFid = env->GetFieldID(respCls, "status", "I"); + VerifyOrExit(statusFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jint status = env->GetIntField(resp, statusFid); + + jfieldID dataFid = env->GetFieldID(respCls, "data", "Ljava/lang/String;"); + VerifyOrExit(dataFid != nullptr, err = CHIP_JNI_ERROR_FIELD_NOT_FOUND); + jstring jdataStr = (jstring) env->GetObjectField(resp, dataFid); + chip::JniUtfString dataStr(env, jdataStr); + + response.status = static_cast(status); + response.data = chip::Optional(dataStr.byteSpan()); + + err = helper.Success(response); + } + +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "ApplicationLauncherManager::HideApp status error: %s", err.AsString()); + } +} + +void ApplicationLauncherManager::InitializeWithObjects(jobject managerObject) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Failed to GetEnvForCurrentThread for ApplicationLauncherManager")); + + VerifyOrReturn(mApplicationLauncherManagerObject.Init(managerObject) == CHIP_NO_ERROR, + ChipLogError(Zcl, "Failed to init mApplicationLauncherManagerObject")); + + jclass applicationLauncherClass = env->GetObjectClass(managerObject); + VerifyOrReturn(applicationLauncherClass != nullptr, ChipLogError(Zcl, "Failed to get ApplicationLauncherManager Java class")); + + mGetCatalogListMethod = env->GetMethodID(applicationLauncherClass, "getCatalogList", "()[I"); + if (mGetCatalogListMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'getCatalogList' method"); + env->ExceptionClear(); + } + + mLaunchAppMethod = env->GetMethodID(applicationLauncherClass, "launchApp", + "(Lcom/matter/tv/server/tvapp/" + "Application;Ljava/lang/String;)Lcom/matter/tv/server/tvapp/LauncherResponse;"); + if (mLaunchAppMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'launchApp' method"); + env->ExceptionClear(); + } + + mStopAppMethod = env->GetMethodID(applicationLauncherClass, "stopApp", + "(Lcom/matter/tv/server/tvapp/" + "Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;"); + if (mStopAppMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'stopApp' method"); + env->ExceptionClear(); + } + + mHideAppMethod = env->GetMethodID(applicationLauncherClass, "hideApp", + "(Lcom/matter/tv/server/tvapp/" + "Application;)Lcom/matter/tv/server/tvapp/LauncherResponse;"); + if (mHideAppMethod == nullptr) + { + ChipLogError(Zcl, "Failed to access ApplicationLauncherManager 'hideApp' method"); + env->ExceptionClear(); + } + + // Find the Application class + jclass jc = env->FindClass("com/matter/tv/server/tvapp/Application"); + // convert it to a global reference, otherwise code will crash + mApplicationClass = static_cast(env->NewGlobalRef(jc)); + if (mApplicationClass == nullptr) + { + ChipLogError(Zcl, "Failed to find Application Java class"); + env->ExceptionClear(); + } + + // Get the constructor method ID + mCreateApplicationMethod = env->GetMethodID(mApplicationClass, "", "(ILjava/lang/String;)V"); + if (mCreateApplicationMethod == nullptr) + { + ChipLogError(Zcl, "Failed to find constructor of Application Java class"); + env->ExceptionClear(); + } +} diff --git a/examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.h b/examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.h similarity index 74% rename from examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.h rename to examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.h index ffdd89ca8731e9..fd0f40d84b5b60 100644 --- a/examples/tv-app/android/include/application-launcher/ApplicationLauncherManager.h +++ b/examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.h @@ -19,7 +19,9 @@ #pragma once #include -#include + +#include +#include using chip::ByteSpan; using chip::app::AttributeValueEncoder; @@ -28,11 +30,13 @@ using ApplicationLauncherDelegate = chip::app::Clusters::ApplicationLauncher::De using ApplicationType = chip::app::Clusters::ApplicationLauncher::Structs::ApplicationStruct::Type; using LauncherResponseType = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Type; +inline constexpr chip::EndpointId kLocalVideoPlayerEndpointId = 1; + class ApplicationLauncherManager : public ApplicationLauncherDelegate { public: - ApplicationLauncherManager() : ApplicationLauncherDelegate(){}; - ApplicationLauncherManager(bool featureMapContentPlatform) : ApplicationLauncherDelegate(featureMapContentPlatform){}; + static void NewManager(jint endpoint, jobject manager); + void InitializeWithObjects(jobject managerObject); CHIP_ERROR HandleGetCatalogList(AttributeValueEncoder & aEncoder) override; @@ -40,4 +44,12 @@ class ApplicationLauncherManager : public ApplicationLauncherDelegate const ApplicationType & application) override; void HandleStopApp(CommandResponseHelper & helper, const ApplicationType & application) override; void HandleHideApp(CommandResponseHelper & helper, const ApplicationType & application) override; + + chip::JniGlobalReference mApplicationLauncherManagerObject; + jmethodID mGetCatalogListMethod = nullptr; + jmethodID mLaunchAppMethod = nullptr; + jmethodID mStopAppMethod = nullptr; + jmethodID mHideAppMethod = nullptr; + jmethodID mCreateApplicationMethod = nullptr; + jclass mApplicationClass = nullptr; }; diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Application.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Application.java new file mode 100644 index 00000000000000..bac89b09420213 --- /dev/null +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Application.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package com.matter.tv.server.tvapp; + +public class Application { + + public int catalogVendorId; + public String applicationId; + + public Application(int catalogVendorId, String applicationId) { + this.catalogVendorId = catalogVendorId; + this.applicationId = applicationId; + } + + public Application createApplication(int catalogVendorId, String applicationId) { + return new Application(catalogVendorId, applicationId); + } + + @Override + public String toString() { + return "Application{" + "catalogVendorId=" + catalogVendorId + ", applicationId='" + '\'' + '}'; + } +} diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/ApplicationLauncherManager.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/ApplicationLauncherManager.java new file mode 100644 index 00000000000000..7f80eb7a6c3421 --- /dev/null +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/ApplicationLauncherManager.java @@ -0,0 +1,36 @@ +package com.matter.tv.server.tvapp; + +public interface ApplicationLauncherManager { + + /** + * Return a list of available catalogs + * + * @return list of int + */ + int[] getCatalogList(); + + /** + * Launch an app + * + * @param app that you want to launch + * @param data to send addditional data if needed + * @return launcher response with status + */ + LauncherResponse launchApp(Application app, String data); + + /** + * Stop an app + * + * @param app that you want to stop + * @return launcher response with status + */ + LauncherResponse stopApp(Application app); + + /** + * hide an app + * + * @param app that you want to hide + * @return launcher response with status + */ + LauncherResponse hideApp(Application app); +} diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/LauncherResponse.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/LauncherResponse.java new file mode 100644 index 00000000000000..c0a41d2b153969 --- /dev/null +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/LauncherResponse.java @@ -0,0 +1,22 @@ +package com.matter.tv.server.tvapp; + +public class LauncherResponse { + + public static final int STATUS_SUCCESS = 0; + public static final int STATUS_APP_NOT_AVAILABLE = 1; + public static final int STATUS_SYSTEM_BUSY = 2; + public static final int STATUS_PENDING_USER_APPROVAL = 3; + public static final int STATUS_DOWNLOADING = 4; + public static final int STATUS_INSTALLING = 5; + + public LauncherResponse(int status, String data) { + this.status = status; + this.data = data; + } + + /** The status in STATUS_XXX */ + public int status; + + /** Optional app-specific data. */ + public String data; +} diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/TvApp.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/TvApp.java index eaf207e45f3618..8cac42ff582e3e 100644 --- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/TvApp.java +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/TvApp.java @@ -47,6 +47,9 @@ private void postClusterInit(long clusterId, int endpoint) { public native void setKeypadInputManager(int endpoint, KeypadInputManager manager); + public native void setApplicationLauncherManager( + int endpoint, ApplicationLauncherManager manager); + public native void setWakeOnLanManager(int endpoint, WakeOnLanManager manager); public native void setMediaInputManager(int endpoint, MediaInputManager manager); diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 8f4f6a1b37b697..f2a2a6f0affb0f 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1,6 +1,211 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + enum TestGlobalEnum : enum8 { kSomeValue = 0; kSomeOtherValue = 1; @@ -18,6 +223,17 @@ struct TestGlobalStruct { optional nullable TestGlobalEnum myEnum = 2; } +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + /** Attributes and commands for switching devices between 'On' and 'Off' states. */ cluster OnOff = 6 { revision 6; @@ -3043,6 +3259,9 @@ cluster ApplicationLauncher = 1292 { kSuccess = 0; kAppNotAvailable = 1; kSystemBusy = 2; + kPendingUserApproval = 3; + kDownloading = 4; + kInstalling = 5; } bitmap Feature : bitmap32 { diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java index b61b63f3e0785e..5db9a3560749b5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ConnectionExampleFragment.java @@ -160,13 +160,17 @@ public void handle(Void v) { Log.i( TAG, "Successfully connected to CastingPlayer with deviceId: " - + targetCastingPlayer.getDeviceId()); + + targetCastingPlayer.getDeviceId() + + ", useCommissionerGeneratedPasscode: " + + useCommissionerGeneratedPasscode); getActivity() .runOnUiThread( () -> { connectionFragmentStatusTextView.setText( "Successfully connected to Casting Player with device name: " + targetCastingPlayer.getDeviceName() + + "\n\nUsed CastingPlayer Passcode: " + + useCommissionerGeneratedPasscode + "\n\n"); connectionFragmentNextButton.setEnabled(true); }); diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java index 3dca2320b8924c..64130fa94cfe7b 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/DiscoveryExampleFragment.java @@ -67,7 +67,8 @@ public class DiscoveryExampleFragment extends Fragment { public void onAdded(CastingPlayer castingPlayer) { Log.i( TAG, - "onAdded() Discovered CastingPlayer deviceId: " + castingPlayer.getDeviceId()); + "DiscoveryExampleFragment onAdded() Discovered CastingPlayer deviceId: " + + castingPlayer.getDeviceId()); // Display CastingPlayer info on the screen new Handler(Looper.getMainLooper()) .post( @@ -80,7 +81,7 @@ public void onAdded(CastingPlayer castingPlayer) { public void onChanged(CastingPlayer castingPlayer) { Log.i( TAG, - "onChanged() Discovered changes to CastingPlayer with deviceId: " + "DiscoveryExampleFragment onChanged() Discovered changes to CastingPlayer with deviceId: " + castingPlayer.getDeviceId()); // Update the CastingPlayer on the screen new Handler(Looper.getMainLooper()) @@ -107,7 +108,7 @@ public void onChanged(CastingPlayer castingPlayer) { public void onRemoved(CastingPlayer castingPlayer) { Log.i( TAG, - "onRemoved() Removed CastingPlayer with deviceId: " + "DiscoveryExampleFragment onRemoved() Removed CastingPlayer with deviceId: " + castingPlayer.getDeviceId()); // Remove CastingPlayer from the screen new Handler(Looper.getMainLooper()) @@ -215,7 +216,10 @@ public void onResume() { @Override public void onPause() { super.onPause(); - Log.i(TAG, "onPause() called"); + Log.i(TAG, "DiscoveryExampleFragment onPause() called, calling stopDiscovery()"); + // Stop discovery when leaving the fragment, for example, while displaying the + // ConnectionExampleFragment. + stopDiscovery(); } /** Interface for notifying the host. */ @@ -261,7 +265,7 @@ private boolean startDiscovery() { } private void stopDiscovery() { - Log.i(TAG, "stopDiscovery() called"); + Log.i(TAG, "DiscoveryExampleFragment stopDiscovery() called"); matterDiscoveryErrorMessageTextView.setText( getString(R.string.matter_discovery_error_message_initial)); diff --git a/examples/tv-casting-app/android/App/app/src/main/res/layout/custom_passcode_dialog.xml b/examples/tv-casting-app/android/App/app/src/main/res/layout/custom_passcode_dialog.xml index 1b868e06b71f29..c91fa4ad404089 100644 --- a/examples/tv-casting-app/android/App/app/src/main/res/layout/custom_passcode_dialog.xml +++ b/examples/tv-casting-app/android/App/app/src/main/res/layout/custom_passcode_dialog.xml @@ -1,5 +1,6 @@ @@ -11,7 +12,6 @@ android:textStyle="bold" android:textSize="18sp" android:padding="16dp" - android:textColor="@android:color/white" android:gravity="center" android:text="@string/matter_connection_input_dialog_title" /> @@ -24,7 +24,6 @@ android:paddingEnd="16dp" android:paddingTop="8dp" android:paddingBottom="8dp" - android:textColor="@android:color/white" android:text="@string/matter_connection_input_dialog_instructions" /> - - -