diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index d068ecd7566a42..750009aabbeb45 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -478,6 +478,7 @@ EEE eef ef EFR +efuse eg EjQ elftools @@ -1072,6 +1073,7 @@ ProxyDiscovery ProxyValid ProxyView PRs +PSA PSCAN PSECT PSK diff --git a/.github/actions/bootstrap-cache/action.yaml b/.github/actions/bootstrap-cache/action.yaml new file mode 100644 index 00000000000000..af0d09819a5e26 --- /dev/null +++ b/.github/actions/bootstrap-cache/action.yaml @@ -0,0 +1,17 @@ +name: Bootstrap cache +description: Bootstrap cache +runs: + using: "composite" + steps: + - uses: Wandalen/wretry.action@v1.3.0 + name: Bootstrap cache + continue-on-error: true + with: + action: buildjet/cache@v3 + attempt_limit: 3 + attempt_delay: 2000 + with: | + key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} + path: | + .environment + build_overrides/pigweed_environment.gni diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml new file mode 100644 index 00000000000000..66e6645fff4992 --- /dev/null +++ b/.github/actions/bootstrap/action.yaml @@ -0,0 +1,8 @@ +name: Bootstrap +description: Bootstrap +runs: + using: "composite" + steps: + - name: Bootstrap + shell: bash + run: bash scripts/bootstrap.sh diff --git a/.github/actions/checkout-submodules-and-bootstrap/action.yaml b/.github/actions/checkout-submodules-and-bootstrap/action.yaml new file mode 100644 index 00000000000000..8b178ce64438fc --- /dev/null +++ b/.github/actions/checkout-submodules-and-bootstrap/action.yaml @@ -0,0 +1,30 @@ +name: Checkout submodules & Bootstrap +description: Checkout submodules & Bootstrap +inputs: + platform: + description: "Platform name" + required: true + extra-submodule-parameters: + description: "extra submodule parameters" + required: false + default: "" + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs +runs: + using: "composite" + steps: + - name: Checkout submodules + uses: ./.github/actions/checkout-submodules + with: + platform: ${{ inputs.platform }} + extra-parameters: ${{ inputs.extra-submodule-parameters }} + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache + - name: Bootstrap + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs + with: + platform: ${{ inputs.bootstrap-log-name }} diff --git a/.github/actions/checkout-submodules/action.yaml b/.github/actions/checkout-submodules/action.yaml new file mode 100644 index 00000000000000..d5d4709ed3f37c --- /dev/null +++ b/.github/actions/checkout-submodules/action.yaml @@ -0,0 +1,16 @@ +name: Checkout submodules +description: Checkout submodules +inputs: + extra-parameters: + description: "extra parameters" + required: false + default: "" + platform: + description: "Platform name" + required: true +runs: + using: "composite" + steps: + - name: Checkout submodules + shell: bash + run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ${{ inputs.platform }} ${{ inputs.extra-parameters }} diff --git a/.github/actions/perform-codeql-analysis/action.yaml b/.github/actions/perform-codeql-analysis/action.yaml new file mode 100644 index 00000000000000..ff63a60665f08c --- /dev/null +++ b/.github/actions/perform-codeql-analysis/action.yaml @@ -0,0 +1,38 @@ +name: Run CodeQL Analysis +description: Run and upload CodeQL Analysis +inputs: + language: + description: "language for codeql analysis" + required: true +runs: + using: "composite" + steps: + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ inputs.language }}" + upload: False + output: sarif-results + - name: filter-sarif + if: ${{ inputs.run-codeql }} + uses: advanced-security/filter-sarif@v1 + with: + patterns: | + -**/third_party/** + -**/scripts/** + input: "sarif-results/${{ inputs.language }}.sarif" + output: "sarif-results/${{ inputs.language }}.sarif" + + - name: Upload SARIF + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: "sarif-results/${{ inputs.language }}.sarif" + - name: Upload loc as a Build Artifact + if: ${{ inputs.run-codeql }} + uses: actions/upload-artifact@v2.2.0 + with: + name: sarif-results + path: sarif-results + retention-days: 1 diff --git a/.github/actions/setup-size-reports/action.yaml b/.github/actions/setup-size-reports/action.yaml new file mode 100644 index 00000000000000..511a434242d2e6 --- /dev/null +++ b/.github/actions/setup-size-reports/action.yaml @@ -0,0 +1,15 @@ +name: Setup size reports +description: Setup size reports +inputs: + gh-context: + description: "GH Context" + required: true + +runs: + using: "composite" + steps: + - name: Set up environment for size reports + shell: bash + env: + GH_CONTEXT: ${{ inputs.gh-context }} + run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" diff --git a/.github/actions/upload-bootstrap-logs/action.yaml b/.github/actions/upload-bootstrap-logs/action.yaml new file mode 100644 index 00000000000000..85209c7302f2a5 --- /dev/null +++ b/.github/actions/upload-bootstrap-logs/action.yaml @@ -0,0 +1,18 @@ +name: Upload bootstrap logs +description: Upload bootstrap logs +inputs: + bootstrap-log-name: + description: "Bootstrap log name" + required: false + default: bootstrap-logs +runs: + using: "composite" + steps: + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v3 + if: ${{ always() && !env.ACT }} + with: + name: ${{ inputs.bootstrap-log-name }} + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log diff --git a/.github/actions/upload-size-reports/action.yaml b/.github/actions/upload-size-reports/action.yaml new file mode 100644 index 00000000000000..c71312ae6578ee --- /dev/null +++ b/.github/actions/upload-size-reports/action.yaml @@ -0,0 +1,17 @@ +name: upload-size-reports +description: upload-size-reports +inputs: + platform-name: + description: "Platform name Name" + required: true + +runs: + using: "composite" + steps: + - name: Uploading Size Reports + uses: actions/upload-artifact@v3 + if: ${{ !env.ACT }} + with: + name: Size,${{ inputs.platform-name }}-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + path: | + /tmp/bloat_reports/ diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 33651d52198a01..c44f9a5559c8ed 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -36,15 +36,8 @@ jobs: image: connectedhomeip/chip-build:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - + - name: Checkout + uses: actions/checkout@v3 - name: Report run: | scripts/tools/memory/gh_report.py \ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7ec5d0994a9275..2cf7dc01d8f5ae 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,20 +19,22 @@ on: pull_request: merge_group: workflow_dispatch: - + workflow_call: + inputs: + run-codeql: + required: false + type: boolean + 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 - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: build_linux_gcc_debug: name: Build on Linux (gcc_debug) - timeout-minutes: 85 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -53,54 +55,27 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout + uses: actions/checkout@v3 - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + platform: linux + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v2 with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + languages: "cpp" - name: Setup Build run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false" - name: Run Build - timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" - name: Run Tests - timeout-minutes: 30 run: scripts/tests/gn_tests.sh # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 @@ -113,17 +88,14 @@ jobs: - name: Setup Build Without Detail Logging run: scripts/build/gn_gen.sh --args="chip_detail_logging=false" - name: Run Build Without Detail Logging - timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" - name: Setup Build Without Progress Logging run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false" - name: Run Build Without Progress Logging - timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" - name: Setup Build Without Error Logging run: scripts/build/gn_gen.sh --args="chip_detail_logging=false chip_progress_logging=false chip_error_logging=false" - name: Run Build Without Error Logging - timeout-minutes: 20 run: scripts/run_in_build_env.sh "ninja -C ./out" - name: Uploading core files uses: actions/upload-artifact@v3 @@ -133,6 +105,11 @@ jobs: path: /tmp/cores/ # Cores are big; don't hold on to them too long. retention-days: 5 + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp # OBJDIR on linux is > 10K files and takes more than 50 minutes to upload, usually # having the job timeout. # @@ -149,7 +126,6 @@ jobs: build_linux: name: Build on Linux (fake, gcc_release, clang, simulated) - timeout-minutes: 150 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -170,54 +146,23 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - # - name: Initialize CodeQL - # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - # uses: github/codeql-action/init@v1 - # with: - # languages: "cpp" - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout + uses: actions/checkout@v3 - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + platform: linux + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v2 with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + languages: "cpp" - name: Setup and Build Simulated Device - timeout-minutes: 20 run: | BUILD_TYPE=simulated GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' @@ -225,13 +170,11 @@ jobs: CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests - timeout-minutes: 90 run: | BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false" scripts/run_in_build_env.sh "ninja -C ./out/gcc_release" BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh - name: Run Tests with sanitizers - timeout-minutes: 60 env: LSAN_OPTIONS: detect_leaks=1 run: | @@ -248,11 +191,9 @@ jobs: BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh done - name: Ensure codegen is done for sanitize - timeout-minutes: 45 run: | ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/sanitizers" - name: Clang-tidy validation - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/run-clang-tidy-on-compile-commands.py \ @@ -261,7 +202,6 @@ jobs: check \ " - name: Build using build_examples.py - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -276,7 +216,6 @@ jobs: - name: Clean output run: rm -rf ./out - name: Build using build_examples.py (pregen) - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -298,10 +237,15 @@ jobs: rm -rf ./zzz_pregenerated mv scripts/codegen.py.renamed scripts/codegen.py - name: Run fake linux tests with build_examples - timeout-minutes: 15 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --target linux-fake-tests build" + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp + - name: Uploading core files uses: actions/upload-artifact@v3 if: ${{ failure() && !env.ACT }} @@ -326,7 +270,6 @@ jobs: build_linux_python_lib: name: Build on Linux (python_lib) - timeout-minutes: 60 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -347,42 +290,19 @@ jobs: env: CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: linux - name: Setup Build, Run Build and Run Tests - timeout-minutes: 50 run: | scripts/build/gn_gen.sh --args="enable_rtti=true enable_pylib=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false" scripts/run_in_build_env.sh "ninja -C ./out" scripts/tests/gn_tests.sh - name: Run Python library specific unit tests - timeout-minutes: 5 run: | scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl' scripts/run_in_build_env.sh 'pip3 install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl' @@ -390,7 +310,6 @@ jobs: scripts/run_in_build_env.sh '(cd src/controller/python/test/unit_tests/ && python3 -m unittest -v)' - name: Run Python Setup Payload Generator Test - timeout-minutes: 20 run: | scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/' scripts/run_in_build_env.sh 'pip3 install -r src/setup_payload/python/requirements.txt' @@ -398,57 +317,26 @@ jobs: build_darwin: name: Build on Darwin (clang, python_lib, simulated) - timeout-minutes: 200 runs-on: macos-latest if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - #- name: Initialize CodeQL - # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - # uses: github/codeql-action/init@v1 - # with: - # languages: "cpp" - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + platform: darwin - name: Try to ensure the directory for diagnostic log collection exists run: | mkdir -p ~/Library/Logs/DiagnosticReports || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Initialize CodeQL + if: ${{ inputs.run-codeql }} + uses: github/codeql-action/init@v2 with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + languages: "cpp" - name: Setup and Build Simulated Device - timeout-minutes: 20 run: | BUILD_TYPE=simulated GN_ARGS='chip_tests_zap_config="app1" chip_project_config_include_dirs=["../../examples/placeholder/linux/apps/app1/include", "../../config/standalone"] chip_config_network_layer_ble=false' @@ -456,7 +344,6 @@ jobs: CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS" scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests - timeout-minutes: 120 # We can't enable leak checking here in LSAN_OPTIONS, because on # Darwin that's only supported with a new enough clang, and we're # not building with the pigweed clang here. @@ -478,11 +365,9 @@ jobs: BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh done - name: Ensure codegen is done for sanitize - timeout-minutes: 45 run: | ./scripts/run_in_build_env.sh "./scripts/run_codegen_targets.sh out/default" - name: Clang-tidy validation - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/run-clang-tidy-on-compile-commands.py \ @@ -495,15 +380,18 @@ jobs: with: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ - # - name: Perform CodeQL Analysis - # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - # uses: github/codeql-action/analyze@v1 + + - name: Perform CodeQL Analysis + if: ${{ inputs.run-codeql }} + uses: ./.github/actions/perform-codeql-analysis + with: + language: cpp + # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 build_linux_gcc_coverage: name: Build on Linux (coverage) - timeout-minutes: 85 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -516,42 +404,12 @@ jobs: net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: linux - name: Run Build Coverage - timeout-minutes: 30 run: ./scripts/build_coverage.sh diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 7b2dcc96f0cf88..183c115555f0e2 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: chef_linux: name: Chef - Linux CI Examples @@ -39,32 +37,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: linux - name: CI Examples Linux shell: bash run: | @@ -80,32 +58,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: esp32 - name: CI Examples ESP32 shell: bash run: | @@ -121,32 +79,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: nrfconnect - name: CI Examples NRFConnect shell: bash run: | diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 9f5139535b4e9b..321b450f8799de 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -26,13 +26,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cirque: name: Cirque - timeout-minutes: 90 env: DOCKER_RUN_VERSION: 0.7.3 @@ -54,32 +51,16 @@ jobs: # options: "--privileged" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + uses: ./.github/actions/checkout-submodules with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + platform: linux + + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - timeout-minutes: 15 run: | integrations/docker/images/chip-build-cirque/run.sh \ -- sh -c " \ @@ -94,8 +75,8 @@ jobs: - uses: Wandalen/wretry.action@v1.3.0 name: Cirque Bootstrap cache if: ${{ !env.ACT }} - timeout-minutes: 10 continue-on-error: true + timeout-minutes: 10 with: action: buildjet/cache@v3 attempt_limit: 3 @@ -105,7 +86,6 @@ jobs: restore-keys: ${{ runner.os }}-cirque- path: ${{ env.GITHUB_CACHE_PATH }} - name: Cirque Bootstrap - timeout-minutes: 15 run: | integrations/docker/images/chip-build-cirque/run.sh \ --env GITHUB_ACTION_RUN=1 \ @@ -122,7 +102,6 @@ jobs: if_true: "${{ github.sha }}" if_false: "pull-${{ github.event.pull_request.number }}" - name: Build Binaries - timeout-minutes: 30 run: | integrations/docker/images/chip-build-cirque/run.sh \ -- sh -c " \ @@ -130,7 +109,6 @@ jobs: && scripts/build/gn_gen_cirque.sh \ " - name: Run Tests - timeout-minutes: 45 run: | integrations/docker/images/chip-build-cirque/run.sh \ --env LOG_DIR=/tmp/cirque_test_output \ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2ecf27ee932310..6b150397783138 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,125 +21,9 @@ on: schedule: - cron: '0 5 * * *' -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 - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - jobs: analyze: - name: CodeQL Analysis - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - container: - image: connectedhomeip/chip-build:0.7.3 - volumes: - - "/tmp/log_output:/tmp/test_logs" - options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 - net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" - - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - # language: [ 'cpp', 'java', 'javascript', 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJSON(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Dump Concurrency context - env: - CONCURRENCY_CONTEXT: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - run: echo "$CONCURRENCY_CONTEXT" - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - name: Try to ensure the directories for core dumping exist and we - can write them. - run: | - mkdir /tmp/cores || true - sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - name: Setup Build - run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false" - - name: Run Build - run: scripts/run_in_build_env.sh "ninja -C ./out" - - name: Run Tests - run: scripts/tests/gn_tests.sh - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" - upload: False - output: sarif-results - - - name: filter-sarif - uses: advanced-security/filter-sarif@v1 - with: - patterns: | - -**/third_party/** - -**/scripts/** - input: "sarif-results/${{matrix.language}}.sarif" - output: "sarif-results/${{matrix.language}}.sarif" - - - name: Upload SARIF - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: "sarif-results/${{matrix.language}}.sarif" + uses: project-chip/connectedhomeip/.github/workflows/build.yaml@master + with: + run-codeql: true - - name: Upload loc as a Build Artifact - uses: actions/upload-artifact@v2.2.0 - with: - name: sarif-results - path: sarif-results - retention-days: 1 diff --git a/.github/workflows/darwin-tests.yaml b/.github/workflows/darwin-tests.yaml index 031263c3d13e40..0920d90438c979 100644 --- a/.github/workflows/darwin-tests.yaml +++ b/.github/workflows/darwin-tests.yaml @@ -28,13 +28,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: test_suites_chip_tool_darwin: name: Test Suites - Darwin - timeout-minutes: 150 strategy: matrix: @@ -47,16 +44,8 @@ jobs: runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -67,31 +56,11 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Run macOS Darwin Framework Tool Build Debug working-directory: src/darwin/Framework @@ -112,7 +81,6 @@ jobs: run: xcodebuild clean working-directory: src/darwin/Framework - name: Build Apps - timeout-minutes: 90 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -127,7 +95,6 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 65 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ @@ -144,7 +111,6 @@ jobs: --bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - name: Run OTA Test - timeout-minutes: 5 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_darwin_framework_ota_test.py \ diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 6cbfde3a32748b..a422c2066a8d98 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -26,56 +26,23 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: darwin: name: Build Darwin - timeout-minutes: 300 if: github.actor != 'restyled-io[bot]' runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment run: brew install python@3.9 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + platform: darwin - name: Block zap-cli from being used # xcodebuild is NOT expected to require zap-cli run: scripts/run_in_build_env.sh 'D=$(dirname $(which zap-cli)) && mv $D/zap-cli $D/zap-cli.moved' @@ -83,7 +50,6 @@ jobs: # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' - name: Run iOS Build Debug - timeout-minutes: 50 working-directory: src/darwin/Framework # For now disable unguarded-availability-new warnings because we # internally use APIs that we are annotating as only available on @@ -91,7 +57,6 @@ jobs: # target versions instead? run: xcodebuild -target "Matter" -sdk iphoneos OTHER_CFLAGS='${inherited} -Wno-unguarded-availability-new' - name: Run iOS Build Release - timeout-minutes: 50 working-directory: src/darwin/Framework # For now disable unguarded-availability-new warnings because we # internally use APIs that we are annotating as only available on @@ -105,7 +70,6 @@ jobs: run: defaults delete com.apple.dt.xctest.tool continue-on-error: true - name: Run macOS Build - timeout-minutes: 70 # Enable -Werror by hand here, because the Xcode config can't # enable it for various reasons. Keep whatever Xcode settings # for OTHER_CFLAGS exist by using ${inherited}. @@ -126,27 +90,22 @@ jobs: - name: Validate zap-cli is again available run: scripts/run_in_build_env.sh 'zap-cli --version' - name: Build example All Clusters Server - timeout-minutes: 15 run: | scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false - name: Build example OTA Provider - timeout-minutes: 10 run: | scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false - name: Build OTA image files with software version number 5 - timeout-minutes: 10 run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 chip_device_config_device_software_version=5 chip_device_config_device_software_version_string='"5.0"' cp out/debug/chip-ota-requestor-app /tmp/ota-test005-raw-image - name: Build example OTA Requestor - timeout-minutes: 10 run: | scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0 - name: Delete Defaults run: defaults delete com.apple.dt.xctest.tool continue-on-error: true - name: Run Framework Tests - timeout-minutes: 30 # For now disable unguarded-availability-new warnings because we # internally use APIs that we are annotating as only available on # new enough versions. Maybe we should change out deployment @@ -168,7 +127,6 @@ jobs: xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2) working-directory: src/darwin/Framework - name: Build Matter TV Casting Bridge - timeout-minutes: 35 run: | xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge diff --git a/.github/workflows/docker_img.yaml b/.github/workflows/docker_img.yaml index 975e5194a4208e..150922d984fb08 100644 --- a/.github/workflows/docker_img.yaml +++ b/.github/workflows/docker_img.yaml @@ -56,14 +56,8 @@ jobs: # NOTE: vscode image consumes ~52 GB disk space but GitHub-hosted runners provide ~10 GB free disk space(https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources) #- "-vscode" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Build All images using project bash script run: | cd integrations/docker/images/chip-build${{ matrix.img }} diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 15c5477c848c57..b65b2c02b2bc7d 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -78,7 +78,6 @@ concurrency: jobs: doxygen: name: Build Doxygen - timeout-minutes: 5 runs-on: ubuntu-latest container: diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 51d8961f80ce7b..ef5947ec4adbbe 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: ameba: name: Ameba @@ -42,31 +40,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform ameba - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: ameba - name: Build example Ameba All Clusters App run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 49788293fe7a8b..b826fcbe88c16c 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: asr: name: ASR @@ -40,31 +38,12 @@ jobs: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform asr - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: asr - name: Build all ASR582X examples run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index a4e8e485cf5046..62fb197224f8e0 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -26,13 +26,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 jobs: bouffalolab: name: Bouffalo Lab - timeout-minutes: 90 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -42,50 +39,19 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform bouffalolab --recursive - + platform: bouffalolab + extra-submodule-parameters: " --recursive" - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 20 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + gh-context: ${{ toJson(github) }} - name: Build example BL602 Lighting App - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -108,7 +74,6 @@ jobs: run: rm -rf ./out - name: Build example BL702 Lighting App - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -149,9 +114,7 @@ jobs: run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,BouffaloLab-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: BouffaloLab diff --git a/.github/workflows/examples-cc13x2x7_26x2x7.yaml b/.github/workflows/examples-cc13x2x7_26x2x7.yaml index 09e4cbc95d9560..7d9ec65e5aac25 100644 --- a/.github/workflows/examples-cc13x2x7_26x2x7.yaml +++ b/.github/workflows/examples-cc13x2x7_26x2x7.yaml @@ -24,13 +24,10 @@ concurrency: cancel-in-progress: true env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cc26x2x7: name: cc26x2x7 - timeout-minutes: 120 env: BUILD_TYPE: gn_cc26x2x7 @@ -46,49 +43,19 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc13xx_26xx + platform: cc13xx_26xx - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - + gh-context: ${{ toJson(github) }} + - name: Build examples - timeout-minutes: 100 run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ @@ -107,72 +74,60 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Get lock MTD size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x2_26x2 LP_CC2652R7 lock-mtd \ out/artifacts/ti-cc13x2x7_26x2x7-lock-mtd/chip-LP_CC2652R7-lock-example.out \ /tmp/bloat_reports/ - name: Get Pump App size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x2_26x2 LP_CC2652R7 pump-app \ out/artifacts/ti-cc13x2x7_26x2x7-pump-mtd/chip-LP_CC2652R7-pump-example.out \ /tmp/bloat_reports/ - name: Get Pump Controller App size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x2_26x2 LP_CC2652R7 pump-controller-app \ out/artifacts/ti-cc13x2x7_26x2x7-pump-controller-mtd/chip-LP_CC2652R7-pump-controller-example.out \ /tmp/bloat_reports/ - name: Get lock FTD size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 lock-ftd \ out/artifacts/ti-cc13x4_26x4-lock-ftd/chip-LP_EM_CC1354P10_6-lock-example.out \ /tmp/bloat_reports/ - name: Get lock MTD size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 lock-mtd \ out/artifacts/ti-cc13x4_26x4-lock-mtd/chip-LP_EM_CC1354P10_6-lock-example.out \ /tmp/bloat_reports/ - name: Get Pump App size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \ out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \ /tmp/bloat_reports/ - name: Get Pump Controller App size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \ out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \ /tmp/bloat_reports/ - name: Get Lighting App size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \ out/artifacts/ti-cc13x4_26x4-lighting/chip-LP_EM_CC1354P10_6-lighting-example.out \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v2 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc13x2x7_26x2x7-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc13x2x7_26x2x7 - name: Uploading Size Reports - uses: actions/upload-artifact@v2 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc13x4_26x4-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc13x4_26x4 diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 07ca5440ce0bd7..66c0f47e41d526 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: cc32xx: name: cc32xx - timeout-minutes: 100 env: BUILD_TYPE: gn_cc32xx @@ -44,49 +41,19 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform cc32xx + platform: cc32xx - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build examples - timeout-minutes: 60 run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ @@ -94,7 +61,6 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Get lock app size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cc32xx CC3235SF_LAUNCHXL lock \ @@ -102,9 +68,7 @@ jobs: /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,cc32xx-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: cc32xx diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 16748a82fbde59..5f384b4542d899 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 jobs: efr32: name: EFR32 - timeout-minutes: 110 env: SILABS_BOARD: BRD4161A @@ -45,58 +42,26 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform silabs_docker - - # - name: Out of Tree verification - # run: third_party/silabs/out_of_tree_verification.sh + platform: silabs_docker - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 20 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - # - name: Test SLC gen + gh-context: ${{ toJson(github) }} + +# - name: Test SLC gen # timeout-minutes: 30 # run: | # scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker # scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker # rm -rf ./out/ - name: Build some BRD4187C variants - timeout-minutes: 90 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -124,7 +89,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build example EFR32+WF200 WiFi Lock app for BRD4161A - timeout-minutes: 15 run: | scripts/examples/gn_silabs_example.sh examples/lock-app/silabs out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \ @@ -132,7 +96,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A - timeout-minutes: 15 run: | scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \ @@ -140,9 +103,7 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,EFR32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: EFR32 diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index a294cdac176c49..f795cd4863ae5c 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: esp32: name: ESP32 - timeout-minutes: 120 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -42,50 +39,20 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: esp32 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build some M5Stack variations - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -107,7 +74,6 @@ jobs: - name: Clean output run: rm -rf ./out - name: Build some M5Stack variations with pregen - timeout-minutes: 60 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -131,7 +97,6 @@ jobs: rm -rf ./zzz_pregenerated mv scripts/codegen.py.renamed scripts/codegen.py - name: Build example All Clusters App C3 - timeout-minutes: 15 run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults - name: Copy aside build products run: | @@ -143,25 +108,20 @@ jobs: example_binaries/esp32-build/chip-all-clusters-app.elf \ /tmp/bloat_reports/ - name: Build example Pigweed App - timeout-minutes: 15 run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults - name: Build example Lighting App - timeout-minutes: 15 run: scripts/examples/esp_example.sh lighting-app sdkconfig.defaults - name: Build example Lock App - timeout-minutes: 15 run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,ESP32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: /tmp/bloat_reports/ + platform-name: ESP32 esp32_1: name: ESP32_1 - timeout-minutes: 90 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -172,62 +132,27 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: esp32 - name: Build example Bridge App - timeout-minutes: 15 run: scripts/examples/esp_example.sh bridge-app - name: Build example Persistent Storage App - timeout-minutes: 15 run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults - name: Build example Shell App - timeout-minutes: 15 run: scripts/examples/esp_example.sh shell sdkconfig.defaults - name: Build example Temperature Measurement App - timeout-minutes: 15 run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults - name: Build example OTA Requestor App run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults - timeout-minutes: 15 - name: Build example OTA Provider App run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults - timeout-minutes: 15 diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 8870d3a7349b6b..b798ae148c58cd 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -26,13 +26,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: infineon: name: Infineon examples building - timeout-minutes: 140 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -42,50 +39,20 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform infineon + platform: infineon - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build PSoC6 lock-app example - timeout-minutes: 15 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ @@ -99,7 +66,6 @@ jobs: out/artifacts/infineon-psoc6-lock/chip-psoc6-lock-example.out \ /tmp/bloat_reports/ - name: Build PSoC6 all-clusters-app example - timeout-minutes: 20 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ @@ -113,7 +79,6 @@ jobs: out/artifacts/infineon-psoc6-all-clusters/chip-psoc6-clusters-example.out \ /tmp/bloat_reports/ - name: Build PSoC6 all-clusters-minimal-app example - timeout-minutes: 20 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ @@ -127,7 +92,6 @@ jobs: out/artifacts/infineon-psoc6-all-clusters-minimal/chip-psoc6-clusters-minimal-example.out \ /tmp/bloat_reports/ - name: Build PSoC6 lighting-app example - timeout-minutes: 15 run: | scripts/run_in_build_env.sh \ "scripts/build/build_examples.py \ @@ -142,7 +106,6 @@ jobs: /tmp/bloat_reports/ - name: Build example CYW30739 Apps - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -154,37 +117,31 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Get light size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cyw30739 cyw930739m2evb_01 light \ out/artifacts/cyw30739-cyw930739m2evb_01-light/chip-cyw30739-lighting-example.elf \ /tmp/bloat_reports/ - name: Get lock size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cyw30739 cyw930739m2evb_01 lock \ out/artifacts/cyw30739-cyw930739m2evb_01-lock/chip-cyw30739-lock-example.elf \ /tmp/bloat_reports/ - name: Get ota-requestor size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cyw30739 cyw930739m2evb_01 ota-requestor \ out/artifacts/cyw30739-cyw930739m2evb_01-ota-requestor/chip-cyw30739-ota-requestor-example.elf \ /tmp/bloat_reports/ - name: Get switch size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ cyw30739 cyw930739m2evb_01 switch \ out/artifacts/cyw30739-cyw930739m2evb_01-switch/chip-cyw30739-light-switch-example.elf \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Infineon-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Infineon \ No newline at end of file diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 0a1a5200ce68fe..fa80b0d146e725 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: k32w: name: K32W - timeout-minutes: 90 env: BUILD_TYPE: gn_k32w @@ -44,50 +41,20 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform k32w0 + platform: k32w0 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build examples - timeout-minutes: 70 run: | scripts/run_in_build_env.sh "\ ./scripts/build/build_examples.py \ @@ -101,30 +68,25 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Get light size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ k32w k32w0+release light \ out/artifacts/k32w-light-crypto-platform-tokenizer/chip-k32w0x-light-example \ /tmp/bloat_reports/ - name: Get lock size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ k32w k32w0+release lock \ out/artifacts/k32w-lock-crypto-platform-tokenizer/chip-k32w0x-lock-example \ /tmp/bloat_reports/ - name: Get contact size stats - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ k32w k32w0+release contact \ out/artifacts/k32w-contact-crypto-platform-tokenizer/chip-k32w0x-contact-example \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,K32W-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: K32W diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 3fb3655381a414..15a55fbb604b36 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: arm_crosscompile: name: Linux ARM Cross compile - timeout-minutes: 70 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -42,50 +39,20 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + platform: linux - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build Some samples - timeout-minutes: 45 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -99,23 +66,19 @@ jobs: build \ " - name: Bloat report - chip-tool - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ linux arm64 chip-tool-ipv6only \ out/linux-arm64-chip-tool-ipv6only-clang/chip-tool \ /tmp/bloat_reports/ - name: Bloat report - thermostat - timeout-minutes: 5 run: | .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ linux arm64 thermostat-no-ble \ out/linux-arm64-thermostat-no-ble-clang/thermostat-app \ /tmp/bloat_reports/ - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Linux-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Linux diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 244e0807980526..476d94793023a1 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: imx: name: Linux i.MX Build - timeout-minutes: 70 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -40,35 +37,14 @@ jobs: image: connectedhomeip/chip-build-imx:0.7.19.1 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: linux - name: Build lighting-app - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -77,7 +53,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build chip-tool - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -86,7 +61,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build thermostat - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -95,7 +69,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build all-cluster - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -104,7 +77,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build all-cluster-minimal - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -113,7 +85,6 @@ jobs: - name: Clean out build output run: rm -rf ./out - name: Build ota-provider-app - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index c42d1ad1f7a810..3bd48a1960b8ba 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: linux_standalone: name: Linux Standalone - timeout-minutes: 90 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -42,47 +39,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + platform: linux - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build Standalone cert tool run: | @@ -213,9 +181,7 @@ jobs: --target linux-x64-contact-sensor-no-ble-with-ui \ build" - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Linux-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Linux-Standalone diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 4499e32db93f2a..e1fb72d40301f3 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -26,13 +26,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: mbedos: name: Mbed OS examples building - timeout-minutes: 200 env: BUILD_TYPE: mbedos @@ -48,16 +45,12 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mbed + platform: mbed - name: Detect changed paths uses: dorny/paths-filter@v2 @@ -70,38 +63,12 @@ jobs: - 'examples/pigweed-app/mbed/**' - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build lock-app example - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=lock-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -112,7 +79,6 @@ jobs: - name: Build lighting-app example if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=lighting-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -123,7 +89,6 @@ jobs: - name: Build pigweed-app example if: github.event_name == 'push' || steps.changed_paths.outputs.pigweedapp == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=pigweed-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -134,7 +99,6 @@ jobs: - name: Build all-clusters-app example if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=all-clusters-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -145,7 +109,6 @@ jobs: - name: Build all-clusters-minimal-app example if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=all-clusters-minimal-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -156,7 +119,6 @@ jobs: - name: Build shell example if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=shell -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -167,7 +129,6 @@ jobs: - name: Build ota-requestor-app example if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' - timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=ota-requestor-app -b=$APP_TARGET -p=$APP_PROFILE .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -179,13 +140,10 @@ jobs: - name: Build unit tests # Temporarily disable build due to running out of flash space if: false - timeout-minutes: 20 run: scripts/tests/mbed/mbed_unit_tests.sh -b=$APP_TARGET -p=$APP_PROFILE - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Mbed-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Mbed diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 253334804bbb3c..d685fb26cd384b 100755 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: mw320: name: MW320 - timeout-minutes: 60 env: BUILD_TYPE: gn_mw320 @@ -44,50 +41,20 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform mw320 + platform: mw320 - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build MW320 all clusters example app - timeout-minutes: 20 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -96,9 +63,7 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,MW320-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: MW320 diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index df4155a5053dc0..985f3b5c7fff82 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: nrfconnect: name: nRF Connect SDK - timeout-minutes: 140 env: BUILD_TYPE: nrfconnect @@ -45,16 +42,12 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform nrfconnect + platform: nrfconnect - name: Detect changed paths uses: dorny/paths-filter@v2 id: changed_paths @@ -69,47 +62,19 @@ jobs: shell: - 'examples/shell/nrfconnect/**' - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Check nRF Connect SDK revision. - timeout-minutes: 15 run: scripts/run_in_build_env.sh "python3 scripts/setup/nrfconnect/update_ncs.py --check" - name: Run unit tests of factory data generation script - timeout-minutes: 15 run: | scripts/run_in_build_env.sh 'pip3 install -r scripts/setup/requirements.nrfconnect.txt' scripts/run_in_build_env.sh "./scripts/tools/nrfconnect/tests/test_generate_factory_data.py" - name: Build example nRF Connect SDK Lock App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lock-app nrf52840dk_nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -118,7 +83,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf52840dongle_nrf52840 -DCONF_FILE=prj_no_dfu.conf -DCONFIG_CHIP_ROTATING_DEVICE_ID=y .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -127,7 +91,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF52840 DK with RPC if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840 -DOVERLAY_CONFIG=rpc.overlay .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -136,7 +99,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Light Switch App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -145,7 +107,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Shell on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh shell nrf52840dk_nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -154,7 +115,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Pump App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh pump-app nrf52840dk_nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -163,7 +123,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Pump Controller App on nRF52840 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh pump-controller-app nrf52840dk_nrf52840 .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -171,7 +130,6 @@ jobs: examples/pump-controller-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters App on nRF52840 DK - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh all-clusters-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -179,7 +137,6 @@ jobs: examples/all-clusters-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters Minimal App on nRF52840 DK - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh all-clusters-minimal-app nrf52840dk_nrf52840 -DCONF_FILE=prj_dfu.conf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -188,7 +145,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lock App on nRF5340 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -197,7 +153,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF5340 DK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -206,7 +161,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lock App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh lock-app nrf7002dk_nrf5340_cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -215,7 +169,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Light Switch App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh light-switch-app nrf7002dk_nrf5340_cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -224,7 +177,6 @@ jobs: /tmp/bloat_reports/ - name: Build example nRF Connect SDK Lighting App on nRF7002 PDK if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh lighting-app nrf7002dk_nrf5340_cpuapp .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -232,7 +184,6 @@ jobs: examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \ /tmp/bloat_reports/ - name: Build example nRF Connect SDK All Clusters App on nRF7002 PDK - timeout-minutes: 20 run: | scripts/examples/nrfconnect_example.sh all-clusters-app nrf7002dk_nrf5340_cpuapp -DCONF_FILE=prj_release.conf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -241,7 +192,6 @@ jobs: /tmp/bloat_reports/ - name: Run unit tests for Zephyr native_posix_64 platform if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true' || steps.changed_paths.outputs.nrfconnect == 'true' - timeout-minutes: 15 run: | scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target nrf-native-posix-64-tests build" - name: Uploading Failed Test Logs @@ -253,9 +203,7 @@ jobs: src/test_driver/nrfconnect/build/Testing/Temporary/LastTest.log - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,nRFConnect-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: nRFConnect diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index 03c2670ba76dcc..15bfa0b5bab8df 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -26,13 +26,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: openiotsdk: name: Open IoT SDK examples building - timeout-minutes: 90 env: TEST_NETWORK_NAME: OIStest @@ -47,49 +44,27 @@ jobs: options: --privileged steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --recursive --platform openiotsdk + platform: openiotsdk + extra-submodule-parameters: " --recursive" - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + gh-context: ${{ toJson(github) }} - name: Build and install Python controller - timeout-minutes: 10 run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.openiotsdk.txt' - name: Build shell example id: build_shell - timeout-minutes: 10 run: | scripts/examples/openiotsdk_example.sh shell .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ @@ -97,41 +72,64 @@ jobs: examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \ /tmp/bloat_reports/ - - name: Build lock-app example - id: build_lock_app - timeout-minutes: 10 + - name: Build lock-app example (mbedtls) + id: build_lock_app_mbedtls run: | - scripts/examples/openiotsdk_example.sh lock-app + scripts/examples/openiotsdk_example.sh -b mbedtls lock-app .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - openiotsdk release lock-app \ + openiotsdk release lock-app-mbedtls \ examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ /tmp/bloat_reports/ - - name: Build unit tests - id: build_unit_tests - timeout-minutes: 10 + - name: Build unit tests (mbedtls) + id: build_unit_tests_mbedtls run: | - scripts/examples/openiotsdk_example.sh unit-tests + scripts/examples/openiotsdk_example.sh -b mbedtls unit-tests - name: "Test: shell example" if: steps.build_shell.outcome == 'success' - timeout-minutes: 5 run: | scripts/run_in_python_env.sh out/venv \ 'scripts/examples/openiotsdk_example.sh --no-activate -C test shell' - - name: "Test: lock-app example" - if: steps.build_lock_app.outcome == 'success' - timeout-minutes: 5 + - name: "Test: lock-app example (mbedtls)" + if: steps.build_lock_app_mbedtls.outcome == 'success' + run: | + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up + scripts/run_in_python_env.sh out/venv \ + 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' + scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down + + - name: "Test: unit-tests (mbedtls)" + if: steps.build_unit_tests_mbedtls.outcome == 'success' + run: | + scripts/run_in_python_env.sh out/venv \ + 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' + + - name: Build lock-app example (psa) + id: build_lock_app_psa + run: | + scripts/examples/openiotsdk_example.sh -c -b psa lock-app + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + openiotsdk release lock-app-psa \ + examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \ + /tmp/bloat_reports/ + + - name: Build unit tests (psa) + id: build_unit_tests_psa + run: | + scripts/examples/openiotsdk_example.sh -b psa unit-tests + + - name: "Test: lock-app example (psa)" + if: steps.build_lock_app_psa.outcome == 'success' run: | scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up scripts/run_in_python_env.sh out/venv \ 'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app' scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down - - name: "Test: unit-tests" - if: steps.build_unit_tests.outcome == 'success' - timeout-minutes: 40 + - name: "Test: unit-tests (psa)" + if: steps.build_unit_tests_psa.outcome == 'success' run: | scripts/run_in_python_env.sh out/venv \ 'scripts/examples/openiotsdk_example.sh --no-activate -C test unit-tests' diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 4516f6dd5ea1ff..0f426d8286999b 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: qpg: name: QPG - timeout-minutes: 60 env: BUILD_TYPE: gn_qpg @@ -44,50 +41,20 @@ jobs: volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform qpg + platform: qpg - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + gh-context: ${{ toJson(github) }} - name: Build QPG6105 example apps - timeout-minutes: 30 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -100,7 +67,6 @@ jobs: --copy-artifacts-to out/artifacts \ " - name: Build Matter SDK library - timeout-minutes: 10 run: | config/qpg/chip-gn/build.sh @@ -114,11 +80,8 @@ jobs: qpg qpg6105+debug lock-app \ out/qpg-qpg6105-lock/chip-qpg6105-lock-example.out \ /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,QPG-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: QPG \ No newline at end of file diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index da8b71db43cf92..05c0adcccff319 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: telink: name: Telink @@ -43,39 +41,18 @@ jobs: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform telink + platform: telink - name: Set up environment for size reports + uses: ./.github/actions/setup-size-reports if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh + gh-context: ${{ toJson(github) }} - name: Build example Telink All Clusters App run: | @@ -273,9 +250,7 @@ jobs: run: rm -rf ./out - name: Uploading Size Reports - uses: actions/upload-artifact@v3 + uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} with: - name: Size,Telink-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + platform-name: Telink diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 42a1c8d7b72349..655b6a092f7f81 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -25,9 +25,7 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: tizen: name: Tizen @@ -43,32 +41,12 @@ jobs: - "/tmp/output_binaries:/tmp/output_binaries" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - run: bash scripts/bootstrap.sh + platform: tizen - name: Build Tizen examples run: | diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index c3ba703a804208..2ec4fdcca3e7ae 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -24,13 +24,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: full_android: name: Run - timeout-minutes: 120 env: JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ @@ -44,16 +41,11 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} + - uses: actions/checkout@v3 name: Checkout with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - # To use act like: + token: ${{ github.token }} + # To use act like: # act -j full_android # # Note you likely still need to have non submodules setup for the @@ -62,33 +54,10 @@ jobs: - uses: actions/checkout@v3.5.2 if: ${{ env.ACT }} name: Checkout (ACT for local build) - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: android - name: Build Android arm-chip-tool run: | diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index 11f67a926057d3..aabb379e8a8deb 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -24,13 +24,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: build_linux_fuzzing: name: Build on Linux - timeout-minutes: 90 runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -41,48 +38,22 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - run: apt-get update - run: apt-get install --fix-missing llvm-10 clang-10 - name: Try to ensure the objdir-clone dir exists run: | mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build all-clusters-app - timeout-minutes: 20 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -101,53 +72,26 @@ jobs: build_darwin_fuzzing: name: Build on Darwin - timeout-minutes: 90 runs-on: macos-latest if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment run: brew install llvm - name: Try to ensure the objdir-clone dir exists run: | mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build all-clusters-app - timeout-minutes: 20 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index f4fecddf9aa67e..f56b1c42d77c5c 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -28,13 +28,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: java_tests_linux: name: Linux - timeout-minutes: 130 env: TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" @@ -50,41 +47,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | mkdir /tmp/cores || true sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - name: Generate unit tests - timeout-minutes: 2 run: | scripts/run_in_build_env.sh \ './scripts/build/build_examples.py \ @@ -92,11 +66,9 @@ jobs: gen \ ' - name: Build unit tests - timeout-minutes: 30 run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests' - name: Run unit tests - timeout-minutes: 15 # TODO: this direct path loading is not maintainable. Our build system should define and # support test classes. run: | @@ -109,7 +81,6 @@ jobs: chip.jsontlv.JsonToTlvToJsonTest \ chip.onboardingpayload.ManualCodeTest - name: Build Java Matter Controller and all clusters app - timeout-minutes: 60 run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' @@ -121,7 +92,6 @@ jobs: build \ " - name: Run Discover Commissionables Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -133,7 +103,6 @@ jobs: --factoryreset \ ' - name: Run Pairing Onnetwork Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -145,7 +114,6 @@ jobs: --factoryreset \ ' - name: Run IM Invoke Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -157,7 +125,6 @@ jobs: --factoryreset \ ' - name: Run IM Read Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -169,7 +136,6 @@ jobs: --factoryreset \ ' - name: Run IM Write Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -181,7 +147,6 @@ jobs: --factoryreset \ ' - name: Run IM Subscribe Test - timeout-minutes: 15 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -193,7 +158,6 @@ jobs: --factoryreset \ ' - name: Run Pairing AlreadyDiscovered Test - timeout-minutes: 25 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -206,7 +170,6 @@ jobs: ' # Disabled due to failure: https://github.com/project-chip/connectedhomeip/issues/27361 # - name: Run Pairing Address-PaseOnly Test - # timeout-minutes: 25 # run: | # scripts/run_in_python_env.sh out/venv \ # './scripts/tests/run_java_test.py \ @@ -218,7 +181,6 @@ jobs: # --factoryreset \ # ' - name: Run Pairing SetupQRCode Test - timeout-minutes: 25 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ @@ -230,7 +192,6 @@ jobs: --factoryreset \ ' - name: Run Pairing ManualCode Test - timeout-minutes: 25 run: | scripts/run_in_python_env.sh out/venv \ './scripts/tests/run_java_test.py \ diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f9585f3deea3f2..5c2a7441b08ad9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,10 +23,6 @@ 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: - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - jobs: code-lints: runs-on: ubuntu-latest @@ -36,45 +32,15 @@ jobs: image: connectedhomeip/chip-build:0.6.47 steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - # To use act like: - # act -j code-lints - # - # Note you likely still need to have non submodules setup for the - # local machine, like: - # git submodule deinit --all - - uses: actions/checkout@v3.5.2 - if: ${{ env.ACT }} - name: Checkout (ACT for local build) + - name: Checkout + uses: actions/checkout@v3 # Bootstrap and checkout for internal scripts (like idl_lint) # to run - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: linux - name: Check for matter lint errors if: always() diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index 77b801a749fb3a..ea63c286056893 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -26,7 +26,6 @@ concurrency: jobs: minimal: name: Linux / configure build of all-clusters-app - timeout-minutes: 60 if: github.actor != 'restyled-io[bot]' runs-on: ubuntu-latest @@ -36,10 +35,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux - name: Configure and build All Clusters App - timeout-minutes: 10 run: | CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 5b40888ebe2521..43faed9920953d 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -25,14 +25,11 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: qemu-esp32: name: ESP32 - timeout-minutes: 85 env: BUILD_TYPE: esp32-qemu @@ -46,44 +43,14 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform esp32 - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: esp32 - name: Build ESP32 QEMU test images - timeout-minutes: 20 run: | scripts/run_in_build_env.sh " \ ./scripts/build/build_examples.py \ @@ -91,7 +58,6 @@ jobs: build \ " - name: Run all tests - timeout-minutes: 40 run: | src/test_driver/esp32/run_qemu_image.py \ --verbose \ @@ -115,33 +81,12 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform tizen - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh + platform: tizen - name: Build and run tests run: | diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index b1cbf95547f7b8..9e2c26166fef7f 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -23,9 +23,7 @@ on: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: esp32: name: ESP32 @@ -37,41 +35,16 @@ jobs: image: connectedhomeip/chip-build-esp32:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - ref: "${{ github.event.inputs.releaseTag }}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + ref: "${{ github.event.inputs.releaseTag }}" + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build run: scripts/examples/esp_example.sh all-clusters-app @@ -97,41 +70,16 @@ jobs: container: image: connectedhomeip/chip-build-efr32:0.7.3 steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - ref: "${{ github.event.inputs.releaseTag }}" - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni + ref: "${{ github.event.inputs.releaseTag }}" + - name: Bootstrap Cache + uses: ./.github/actions/bootstrap-cache - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + uses: ./.github/actions/bootstrap + - name: Upload Bootstrap Logs + uses: ./.github/actions/upload-bootstrap-logs - name: Build example EFR32 Lock App run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/ diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index c00e2eca1f44bc..8a095f0e604173 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: android: name: Smoke Run - Android - timeout-minutes: 60 env: JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ @@ -45,41 +42,12 @@ jobs: - "/tmp/log_output:/tmp/test_logs" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform android - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: android - name: Build Android CHIPTool and CHIPTest (ARM64) run: | diff --git a/.github/workflows/spell.yml b/.github/workflows/spell.yml index 2280119b06b3e0..6c562b9b73979b 100644 --- a/.github/workflows/spell.yml +++ b/.github/workflows/spell.yml @@ -29,14 +29,8 @@ jobs: name: Check Spelling - reviewdog runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - uses: reviewdog/action-misspell@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -44,12 +38,6 @@ jobs: name: Check Spelling - pyspelling runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - uses: igsekor/pyspelling-any@v1.0.4 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a45ab2163bdf78..27c5ac86a1c1e6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -28,13 +28,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: test_suites_linux: name: Test Suites - Linux - timeout-minutes: 180 strategy: matrix: @@ -55,15 +52,8 @@ jobs: net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - if: ${{ !env.ACT }} - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 # To use act like: # act -j test_suites_linux # @@ -73,8 +63,11 @@ jobs: - uses: actions/checkout@v3.5.2 if: ${{ env.ACT }} name: Checkout (ACT for local build) - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -82,33 +75,7 @@ jobs: sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Validate that xml are parsable - timeout-minutes: 10 # The sub-items being run here are the same as the input XMLs listed # at src/app/zap-templates/zcl/zcl.json # @@ -145,6 +112,7 @@ jobs: src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \ + src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml \ @@ -213,7 +181,6 @@ jobs: src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \ " - name: Build Apps - timeout-minutes: 60 run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv --include_yamltests' scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' @@ -231,7 +198,6 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 65 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ @@ -248,7 +214,6 @@ jobs: " - name: Run Tests using the python parser sending commands to chip-tool - timeout-minutes: 65 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ @@ -266,7 +231,6 @@ jobs: " - name: Run Tests using chip-repl (skip slow) - timeout-minutes: 45 if: github.event_name == 'pull_request' run: | ./scripts/run_in_python_env.sh out/venv \ @@ -287,7 +251,6 @@ jobs: --bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \ " - name: Run Tests using chip-repl (including slow) - timeout-minutes: 45 if: github.event_name == 'push' run: | ./scripts/run_in_python_env.sh out/venv \ @@ -322,7 +285,6 @@ jobs: test_suites_darwin: name: Test Suites - Darwin - timeout-minutes: 180 strategy: matrix: @@ -338,16 +300,8 @@ jobs: runs-on: macos-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin + - name: Checkout + uses: actions/checkout@v3 - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -358,34 +312,14 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} + - name: Build Apps - timeout-minutes: 90 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ @@ -400,7 +334,6 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 80 if: matrix.build_variant != 'no-ble-tsan-clang' run: | ./scripts/run_in_build_env.sh \ @@ -419,7 +352,6 @@ jobs: " - name: Run Tests using the python parser sending commands to chip-tool - timeout-minutes: 80 run: | ./scripts/run_in_build_env.sh \ "./scripts/tests/run_test_suite.py \ @@ -462,7 +394,6 @@ jobs: repl_tests_linux: name: REPL Tests - Linux - timeout-minutes: 130 env: TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt" @@ -478,8 +409,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap + with: + platform: linux + bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Try to ensure the directories for core dumping exist and we can write them. run: | @@ -487,33 +421,7 @@ jobs: sysctl -w kernel.core_pattern=/tmp/cores/core.%u.%p.%t || true mkdir objdir-clone || true - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - name: Build Python REPL and example apps - timeout-minutes: 50 run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv --extra_packages "mobly"' scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' @@ -526,7 +434,6 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 10 run: | scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_RR_1_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"' @@ -559,7 +466,6 @@ jobs: repl_tests_darwin: name: REPL Tests - Darwin - timeout-minutes: 120 strategy: matrix: @@ -574,8 +480,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3.5.2 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform darwin - name: Setup Environment # coreutils for stdbuf run: brew install coreutils @@ -586,34 +490,13 @@ jobs: sudo chown ${USER} /cores || true mkdir -p ~/Library/Logs/DiagnosticReports || true mkdir objdir-clone || true - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 - with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: darwin + bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }} - name: Build Python REPL and example apps - timeout-minutes: 50 run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' scripts/run_in_python_env.sh out/venv 'pip install -r scripts/setup/requirements.build.txt' @@ -625,7 +508,6 @@ jobs: --copy-artifacts-to objdir-clone \ " - name: Run Tests - timeout-minutes: 30 run: | scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/darwin-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 3840 --interface-id -1" --script-args "-t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"' - name: Uploading core files diff --git a/.github/workflows/todos.yaml b/.github/workflows/todos.yaml index 5fb1a3d85098c8..f80dbd784eb69e 100644 --- a/.github/workflows/todos.yaml +++ b/.github/workflows/todos.yaml @@ -23,14 +23,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 + - name: Checkout + uses: actions/checkout@v3 - name: Run Issue Bot uses: derjuulsn/todo-issue@main with: diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 102890ed64a405..366a26d4b7fae6 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -26,7 +26,6 @@ concurrency: jobs: unit_tests: name: Unit / Integration Tests - timeout-minutes: 60 if: github.actor != 'restyled-io[bot]' strategy: @@ -44,29 +43,12 @@ jobs: options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - name: Bootstrap - timeout-minutes: 10 - run: | - mkdir -p /tmp/log_output ; - bash scripts/bootstrap.sh ; - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v3 - if: ${{ always() && !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + platform: linux - name: Artifact suffix id: outsuffix uses: haya14busa/action-cond@v1 @@ -88,10 +70,8 @@ jobs: scripts/build/gn_gen.sh --args="$GN_ARGS" - name: Run Build - timeout-minutes: 30 run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE" - name: Run Tests - timeout-minutes: 30 run: scripts/tests/gn_tests.sh # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index f5c13ed817a3b9..2d7bb344e674b2 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -23,13 +23,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: zap_regeneration: name: ZAP Regeneration - timeout-minutes: 60 runs-on: ubuntu-20.04 container: @@ -40,37 +37,16 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 with: - action: actions/checkout@v3.5.2 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + submodules: true + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: linux - name: Generate all - timeout-minutes: 5 run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py - name: Ensure git works in current working directory run: git config --global --add safe.directory `pwd` diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index a6419178856713..4ab45952330bae 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -25,13 +25,10 @@ concurrency: env: CHIP_NO_LOG_TIMESTAMPS: true - # XXX: Workaround for https://github.com/actions/cache/issues/1141 - SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 - + jobs: zap_templates: name: ZAP templates generation - timeout-minutes: 90 runs-on: ubuntu-20.04 container: @@ -42,33 +39,12 @@ jobs: if: github.actor != 'restyled-io[bot]' steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout - with: - action: actions/checkout@v3.5.2 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux - - - uses: Wandalen/wretry.action@v1.3.0 - name: Bootstrap cache - continue-on-error: true - timeout-minutes: 10 + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: buildjet/cache@v3 - attempt_limit: 3 - attempt_delay: 2000 - with: | - key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }} - path: | - .environment - build_overrides/pigweed_environment.gni - - name: Bootstrap - timeout-minutes: 10 - run: bash scripts/bootstrap.sh + platform: linux - name: Generate all run: ./scripts/run_in_build_env.sh scripts/tools/zap_regen_all.py diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8516b5b12f2e5c..bb0c8ba01853ea 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -251,6 +251,7 @@ "-Cbuild", "-d${input:openiotsdkDebugMode}", "-l${input:openiotsdkLwipDebug}", + "-b${input:openiotsdkCryptoBackend}", "${input:openiotsdkExample}" ], "group": "build", @@ -271,6 +272,7 @@ "-Cbuild", "-d${input:openiotsdkDebugMode}", "-l${input:openiotsdkLwipDebug}", + "-b${input:openiotsdkCryptoBackend}", "unit-tests" ], "group": "build", @@ -480,6 +482,13 @@ "options": ["false", "true"], "default": "false" }, + { + "type": "pickString", + "id": "openiotsdkCryptoBackend", + "description": "Which Crypto algorithm do you wish to use?", + "options": ["mbedtls", "psa"], + "default": "mbedtls" + }, { "type": "command", "id": "openiotsdkExample", diff --git a/config/openiotsdk/CMakeLists.txt b/config/openiotsdk/CMakeLists.txt index 7f559587a88a66..43f9fca7b5dd9a 100644 --- a/config/openiotsdk/CMakeLists.txt +++ b/config/openiotsdk/CMakeLists.txt @@ -62,6 +62,7 @@ matter_add_gn_arg_bool ("chip_automation_logging" CONFIG_CHIP_AUTO matter_add_gn_arg_bool ("chip_error_logging" CONFIG_CHIP_ERROR_LOGGING) matter_add_gn_arg_bool ("chip_openiotsdk_use_tfm" TFM_SUPPORT) matter_add_gn_arg_bool ("chip_openiotsdk_use_psa_ps" CONFIG_CHIP_OPEN_IOT_SDK_USE_PSA_PS) +matter_add_gn_arg_string("chip_crypto" "${CONFIG_CHIP_CRYPTO}") if (TARGET cmsis-rtos-api) matter_add_gn_arg_string("target_os" "cmsis-rtos") endif() diff --git a/config/openiotsdk/chip-gn/args.gni b/config/openiotsdk/chip-gn/args.gni index fd9edf986f8ee7..12ffb66b844957 100644 --- a/config/openiotsdk/chip-gn/args.gni +++ b/config/openiotsdk/chip-gn/args.gni @@ -31,7 +31,6 @@ chip_system_config_use_lwip = true lwip_platform = "external" chip_system_config_use_sockets = false -chip_crypto = "mbedtls" chip_external_mbedtls = true custom_toolchain = "${chip_root}/config/openiotsdk/chip-gn/toolchain:openiotsdk" diff --git a/config/openiotsdk/cmake/chip.cmake b/config/openiotsdk/cmake/chip.cmake index bdef5870433d23..6e1a78bcb8debf 100644 --- a/config/openiotsdk/cmake/chip.cmake +++ b/config/openiotsdk/cmake/chip.cmake @@ -21,7 +21,7 @@ get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) -# Default CHIP build configuration +# Default CHIP build configuration set(CONFIG_CHIP_PROJECT_CONFIG "main/include/CHIPProjectConfig.h" CACHE STRING "") set(CONFIG_CHIP_LIB_TESTS NO CACHE BOOL "") set(CONFIG_CHIP_LIB_SHELL NO CACHE BOOL "") @@ -32,6 +32,7 @@ set(CONFIG_CHIP_AUTOMATION_LOGGING YES CACHE BOOL "Enable logging at automation set(CONFIG_CHIP_ERROR_LOGGING YES CACHE BOOL "Enable logging at error level") set(CONFIG_CHIP_OPEN_IOT_SDK_USE_PSA_PS NO CACHE BOOL "Enable using PSA Protected Storage") +set(CONFIG_CHIP_CRYPTO "mbedtls" CACHE STRING "Matter crypto backend. Mbedtls as default") if(CONFIG_CHIP_OPEN_IOT_SDK_USE_PSA_PS AND NOT TFM_SUPPORT) message( FATAL_ERROR "You can not use PSA Protected Storage without TF-M support" ) @@ -53,8 +54,14 @@ if(TFM_SUPPORT) add_dependencies(chip-gn tfm-ns-interface) endif() +if ("${CONFIG_CHIP_CRYPTO}" STREQUAL "psa") + target_compile_definitions(chip + INTERFACE + CONFIG_CHIP_CRYPTO_PSA) +endif() + function(chip_add_data_model target scope model_name) - target_include_directories(${target} + target_include_directories(${target} PUBLIC ${GEN_DIR}/app-common ${GEN_DIR}/${model_name}-app diff --git a/config/openiotsdk/cmake/sdk.cmake b/config/openiotsdk/cmake/sdk.cmake index 61cd704a030041..6f391bd235033f 100644 --- a/config/openiotsdk/cmake/sdk.cmake +++ b/config/openiotsdk/cmake/sdk.cmake @@ -27,7 +27,7 @@ get_filename_component(OPEN_IOT_SDK_STORAGE_SOURCE ${CHIP_ROOT}/third_party/open # Open IoT SDK targets passed to CHIP build list(APPEND CONFIG_CHIP_EXTERNAL_TARGETS) -# Additional Open IoT SDK build configuration +# Additional Open IoT SDK build configuration set(TFM_SUPPORT NO CACHE BOOL "Add Trusted Firmware-M (TF-M) support to application") set(TFM_NS_APP_VERSION "0.0.0" CACHE STRING "TF-M non-secure application version (in the x.x.x format)") set(CONFIG_CHIP_OPEN_IOT_SDK_LWIP_DEBUG NO CACHE BOOL "Enable LwIP debug logs") @@ -82,7 +82,7 @@ if(TFM_SUPPORT) set(TFM_PLATFORM ${OPEN_IOT_SDK_EXAMPLE_COMMON}/tf-m/targets/an552) set(TFM_PSA_FIRMWARE_UPDATE ON) set(MCUBOOT_IMAGE_VERSION_NS ${TFM_NS_APP_VERSION}) - set(TFM_CMAKE_ARGS "-DCONFIG_TFM_ENABLE_FP=ON;-DTFM_PROFILE=profile_medium;-DTFM_EXCEPTION_INFO_DUMP=ON;-DCONFIG_TFM_HALT_ON_CORE_PANIC=ON;-DTFM_ISOLATION_LEVEL=1") + set(TFM_CMAKE_ARGS "-DCONFIG_TFM_ENABLE_FP=ON;-DTFM_PROFILE=profile_medium;-DTFM_EXCEPTION_INFO_DUMP=ON;-DCONFIG_TFM_HALT_ON_CORE_PANIC=ON;-DTFM_ISOLATION_LEVEL=1;-DTFM_MBEDCRYPTO_PLATFORM_EXTRA_CONFIG_PATH=${OPEN_IOT_SDK_CONFIG}/mbedtls/mbedtls_config_psa.h;-DMBEDCRYPTO_BUILD_TYPE=${CMAKE_BUILD_TYPE};-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}") if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") set(TFM_CMAKE_ARGS "${TFM_CMAKE_ARGS};-DMCUBOOT_LOG_LEVEL=INFO;-DTFM_SPM_LOG_LEVEL=TFM_SPM_LOG_LEVEL_DEBUG;-DTFM_PARTITION_LOG_LEVEL=TFM_PARTITION_LOG_LEVEL_INFO") else() @@ -117,24 +117,24 @@ endif() # Add RTOS configuration headers # Link cmsis-rtos-api against a concrete implementation if(TARGET cmsis-rtos-api) - target_include_directories(cmsis-core - INTERFACE + target_include_directories(cmsis-core + INTERFACE cmsis-config ) - + target_compile_definitions(cmsis-rtos-api PUBLIC DOMAIN_NS=$,1,0> ) if(TARGET freertos-kernel) - target_include_directories(freertos-kernel - PUBLIC + target_include_directories(freertos-kernel + PUBLIC freertos-config ) - target_link_libraries(freertos-kernel - PUBLIC + target_link_libraries(freertos-kernel + PUBLIC cmsis-core ) @@ -250,14 +250,6 @@ if("cmsis-freertos" IN_LIST IOTSDK_FETCH_LIST) ) endif() -if("mbedtls" IN_LIST IOTSDK_FETCH_LIST) - list(APPEND CONFIG_CHIP_EXTERNAL_TARGETS - mbedtls - mbedtls-config - mbedtls-threading-cmsis-rtos - ) -endif() - if("lwip" IN_LIST IOTSDK_FETCH_LIST) list(APPEND CONFIG_CHIP_EXTERNAL_TARGETS lwipcore @@ -282,6 +274,15 @@ if("trusted-firmware-m" IN_LIST IOTSDK_FETCH_LIST) ) endif() +# Note: Mbed TLS must appear after TF-M otherwise psa from mbed TLS is used +if("mbedtls" IN_LIST IOTSDK_FETCH_LIST) + list(APPEND CONFIG_CHIP_EXTERNAL_TARGETS + mbedtls + mbedtls-config + mbedtls-threading-cmsis-rtos + ) +endif() + # Additional Open IoT SDK port components # Add Open IoT SDK storage source diff --git a/config/openiotsdk/lwip/user_lwipopts.h b/config/openiotsdk/lwip/user_lwipopts.h index 48d8d4aee81b21..1e02add588ca4c 100644 --- a/config/openiotsdk/lwip/user_lwipopts.h +++ b/config/openiotsdk/lwip/user_lwipopts.h @@ -49,6 +49,11 @@ */ #define LWIP_RAW (1) +/** + * Disable DHCP as the IP6 link local address can be used. + */ +#define LWIP_DHCP 0 + #ifdef LWIP_DEBUG // Debug Options diff --git a/config/openiotsdk/mbedtls/mbedtls_config.h b/config/openiotsdk/mbedtls/mbedtls_config.h index 316d43c67940d0..b5927a06b63383 100644 --- a/config/openiotsdk/mbedtls/mbedtls_config.h +++ b/config/openiotsdk/mbedtls/mbedtls_config.h @@ -2692,7 +2692,7 @@ * or MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG. * */ -#define MBEDTLS_PSA_CRYPTO_C +//#define MBEDTLS_PSA_CRYPTO_C /** * \def MBEDTLS_PSA_CRYPTO_SE_C @@ -3313,8 +3313,8 @@ //#define MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT 384 /**< Maximum size of (re)seed buffer */ /* ECP options */ -//#define MBEDTLS_ECP_WINDOW_SIZE 4 /**< Maximum window size used */ -//#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ +#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ +#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ /* Entropy options */ //#define MBEDTLS_ENTROPY_MAX_SOURCES 20 /**< Maximum number of sources supported */ diff --git a/config/openiotsdk/mbedtls/mbedtls_config_psa.h b/config/openiotsdk/mbedtls/mbedtls_config_psa.h new file mode 100644 index 00000000000000..c7241ba53228a5 --- /dev/null +++ b/config/openiotsdk/mbedtls/mbedtls_config_psa.h @@ -0,0 +1,6 @@ + +#define MBEDTLS_SHA1_C +#define PSA_WANT_ALG_SHA_1 +#define MBEDTLS_ECP_WINDOW_SIZE 6 /**< Maximum window size used */ +#undef MBEDTLS_ECP_FIXED_POINT_OPTIM +#define MBEDTLS_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */ diff --git a/docs/_extensions/external_content.py b/docs/_extensions/external_content.py index f8c2f48a2207ba..99340cab259d02 100644 --- a/docs/_extensions/external_content.py +++ b/docs/_extensions/external_content.py @@ -35,11 +35,11 @@ import filecmp import os -from pathlib import Path import re import shutil import tempfile -from typing import Dict, Any, List, Optional +from pathlib import Path +from typing import Any, Dict, List, Optional from sphinx.application import Sphinx @@ -161,7 +161,7 @@ def _adjust_image_link(m): def sync_contents(app: Sphinx) -> None: - """Synhronize external contents. + """Synchronize external contents. Args: app: Sphinx application instance. diff --git a/docs/guides/esp32/secure_cert_partition.md b/docs/guides/esp32/secure_cert_partition.md index a001fb0f030cf2..40d40d92d4432a 100644 --- a/docs/guides/esp32/secure_cert_partition.md +++ b/docs/guides/esp32/secure_cert_partition.md @@ -2,29 +2,29 @@ ## 1.1 ESP Secure Cert Partition -- When a device is pre-provisioned, the PKI credentials are generated for the - device and stored in a partition named esp_secure_cert. -- In the Matter Pre-Provisioning service, the Matter DAC certificate is - pre-flashed in esp_secure_cert partition. -- The ESP32SecureCertDACProvider reads the PKI credentials from - esp_secure_cert_partition. -- The DAC,PAI and private key are read from the esp_secure_cert_partition, but - the certificate declaration is read from the factory data partition. - Therefore, we need to also generate a factory partition besides - esp_secure_cert_partition. -- The esp_secure_cert partition can be generated on host with help of - configure_esp_secure_cert.py utility. -- The use of esp_secure_cert_partition is demonstrated in lighting-app. +- When a device is pre-provisioned, PKI credentials are generated for the + device and stored in esp_secure_cert partition. +- In the Matter Pre-Provisioning service, the Matter attestation information + is pre-flashed into the esp_secure_cert partition. +- The ESP32SecureCertDACProvider reads the attestation information from the + esp_secure_cert partition. +- The DAC and PAI are read from the esp_secure_cert partition, while the + certification declaration is read from the factory partition. +- The usage of the esp_secure_cert partition is demonstrated in the + lighting-app. + +- During the development phase, the esp_secure_cert partition can be generated + on the host with the help of the configure_esp_secure_cert.py utility. +- The steps below demonstrate how to generate certificates and the respective + partitions to be used during the development phase. ## 1.2 Prerequisites: To generate the esp_secure_cert_partition and the factory_data_partition, we -need the DAC and PAI certificate as well as the private key(DAC key) in .der -format. The factory_data_provider in addition requires the certificate -declaration in .der format. The generation of the required certificates and keys -is mentioned in the steps given below. +need the DER encoded DAC, PAI certificate, DAC private key, and certification +declaration. -### 1.2.1 Build certification generation tool: +### 1.2.1 Build chip-cert: Run the commands below: @@ -41,19 +41,27 @@ At /path/to/connectedhomeip/out/host run the below commands. ### 1.2.2 Generating Certification Declaration ``` -./chip-cert gen-cd -K ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem -C ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem -O esp_dac_fff1_8000.der -f 1 -V 0xfff1 -p 0x8000 -d 0x0016 -c "CSA00000SWC00000-01" -l 0 -i 0 -n 1 -t 0 +./chip-cert gen-cd -K ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Key.pem \ + -C ../../credentials/test/certification-declaration/Chip-Test-CD-Signing-Cert.pem \ + -O esp_dac_fff1_8000.der -f 1 \ + -V 0xfff1 -p 0x8000 -d 0x0016 -c "CSA00000SWC00000-01" -l 0 -i 0 -n 1 -t 0 ``` ### 1.2.3 Generating PAI ``` -./chip-cert gen-att-cert -t i -c "ESP TEST PAI" -V 0xfff1 -P 0x8000 -C ../../credentials/development/attestation/Chip-Development-PAA-Cert.pem -K ../../credentials/development/attestation/Chip-Development-PAA-Key.pem -o Esp-Development-PAI-Cert.pem -O Esp-Development-PAI-Key.pem -l 4294967295 +./chip-cert gen-att-cert -t i -c "ESP TEST PAI" -V 0xfff1 -P 0x8000 \ + -C ../../credentials/development/attestation/Chip-Development-PAA-Cert.pem \ + -K ../../credentials/development/attestation/Chip-Development-PAA-Key.pem \ + -o Esp-Development-PAI-Cert.pem -O Esp-Development-PAI-Key.pem -l 4294967295 ``` ### 1.2.4 Generating DAC ``` -./chip-cert gen-att-cert -t d -c "ESP TEST DAC 01" -V 0xfff1 -P 0x8000 -C Esp-Development-PAI-Cert.pem -K Esp-Development-PAI-Key.pem -o Esp-Development-DAC-01.pem -O Esp-Development-DAC-Key-01.pem -l 4294967295 +./chip-cert gen-att-cert -t d -c "ESP TEST DAC 01" -V 0xfff1 -P 0x8000 \ + -C Esp-Development-PAI-Cert.pem -K Esp-Development-PAI-Key.pem \ + -o Esp-Development-DAC-01.pem -O Esp-Development-DAC-Key-01.pem -l 4294967295 ``` ### 1.2.5 Change format for the certificates and key (.pem to .der format) @@ -67,30 +75,58 @@ openssl ec -in Esp-Development-DAC-Key-01.pem -out Esp-Development-DAC-Key-01.de - Convert DAC and PAI cert from .pem to .der format ``` -openssl x509 -in Esp-Development-DAC-01.pem -out Esp-Development-DAC-01.der-inform pem -outform der +openssl x509 -in Esp-Development-DAC-01.pem -out Esp-Development-DAC-01.der -inform pem -outform der openssl x509 -in Esp-Development-PAI-Cert.pem -out Esp-Development-PAI-Cert.der -inform pem -outform der ``` The certificates in the steps 1.2 will be generated at /path/to/connectedhomeip/out/host.For steps 1.3 and 1.4 go to -connectedhomeip/scripts/tools , set IDF_PATH. +connectedhomeip/scripts/tools, and set IDF_PATH. ## 1.3 Generating esp_secure_cert_partition To generate the esp_secure_cert_partition install esp-secure-cert-tool using +below command. Please use the tool with version >= 1.0.1 ``` pip install esp-secure-cert-tool ``` -Example command to generate a esp_secure_cert_partition +Please use esp-secure-cert-tool with version >= esp-secure-cert-too + +Espressif have SoCs with and without ECDSA peripheral, so there is a bit +different flow for both. Currently only ESP32H2 has the ECDSA Peripheral. + +### 1.3.2 For SoCs without ECDSA Peripheral (Except ESP32H2) + +The following command generates the secure cert partition and flashes it to the +connected device. Additionally, it preserves the generated partition on the +host, allowing it to be flashed later if the entire flash is erased. ``` -configure_esp_secure_cert.py --private-key path/to/dac-key \ ---device-cert path/to/dac-cert \ ---ca-cert path/to/pai-cert \ ---target_chip esp32c3 \ ---port /dev/ttyUSB0 -- skip_flash +configure_esp_secure_cert.py --private-key Esp-Development-DAC-Key-01.der \ + --device-cert Esp-Development-DAC-01.der \ + --ca-cert Esp-Development-PAI-Cert.der \ + --target_chip esp32c3 \ + --keep_ds_data_on_host \ + --port /dev/ttyUSB0 +``` + +### 1.3.1 For SoCs with ECDSA Peripheral (ESP32H2) + +The following command generates the secure cert partition, flashes it onto the +connected device, burns the efuse block with the private key, and preserves the +generated partition on the host for future use in case of a complete flash +erase. + +``` +configure_esp_secure_cert.py --private-key Esp-Development-DAC-Key-01.der \ + --priv_key_algo ECDSA 256 --efuse_key_id 2 --configure_ds \ + --device-cert Esp-Development-DAC-01.der \ + --ca-cert Esp-Development-PAI-Cert.der \ + --target_chip esp32h2 \ + --keep_ds_data_on_host \ + --port /dev/ttyUSB0 ``` Refer @@ -103,13 +139,10 @@ Example command to generate a factory_data_partition ``` ./generate_esp32_chip_factory_bin.py -d 3434 -p 99663300 \ - --product-name ESP-lighting-app --product-id 0x8000 \ - --vendor-name Test-vendor --vendor-id 0xFFF1 \ - --hw-ver 1 --hw-ver-str DevKit \ - --dac-cert path/to/dac-cert \ - --dac-key path/to/dac-key \ - --pai-cert path/to/pai-cert \ - --cd path/to/certificate-declaration + --product-name ESP-lighting-app --product-id 0x8000 \ + --vendor-name Test-vendor --vendor-id 0xFFF1 \ + --hw-ver 1 --hw-ver-str DevKit \ + --cd esp_dac_fff1_8000.der ``` Refer @@ -118,6 +151,8 @@ to generate a factory_data_partition. ## 1.5 Build the firmware with below configuration options +- For SoCs without ECDSA Peripheral (Except ESP32H2) + ``` # Disable the DS Peripheral support CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=n @@ -129,6 +164,19 @@ CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER=y CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION_LABEL="fctry" ``` +- For SoCs with ECDSA Peripheral (ESP32H2) + +``` +# Enable the DS Peripheral support +CONFIG_ESP_SECURE_CERT_DS_PERIPHERAL=y +# Use DAC Provider implementation which reads attestation data from secure cert partition +CONFIG_SEC_CERT_DAC_PROVIDER=y +# Enable some options which reads CD and other basic info from the factory partition +CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER=y +CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER=y +CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION_LABEL="fctry" +``` + In order to use the esp_secure_cert_partition, in addition to enabling the above config options, you should also have the esp_secure_cert_partition and factory partition in your app. For reference, refer to partitions.csv file of @@ -158,26 +206,3 @@ esptool.py -p (PORT) write_flash 0xd000 path/to/secure_cert_partition.bin ``` esptool.py -p (PORT) write_flash 0x3E0000 path/to/factory_partition.bin ``` - -### Monitor - -``` -idf.py monitor -``` - -Please flash the above mentioned partitions by looking into the addresses in -partitions.csv.The above commands are for example purpose. - -## 1.6 Test commissioning using chip-tool - -Run the following command from host to commission the device. - -``` -./chip-tool pairing ble-wifi 1234 my_SSID my_PASSPHRASE my_PASSCODE my_DISCRIMINATOR --paa-trust-store-path /path/to/PAA-Certificates/ -``` - -For example: - -``` -./chip-tool pairing ble-wifi 0x7283 my_SSID my_PASSPHRASE 99663300 3434 --paa-trust-store-path /path/to/connectedhomeip/credentials/development/attestation/ -``` diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index 7ee72089194645..ff5ee40c60aed8 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -40,11 +40,11 @@ step. ``` - For ESP32C6 & ESP32H2, please use commit - [47852846d3](https://github.com/espressif/esp-idf/tree/47852846d3). + [ea5e0ff](https://github.com/espressif/esp-idf/tree/ea5e0ff). ``` $ cd esp-idf - $ git checkout 47852846d3 + $ git checkout ea5e0ff $ git submodule update --init $ ./install.sh ``` diff --git a/docs/guides/openiotsdk_examples.md b/docs/guides/openiotsdk_examples.md index 158691d27e3640..2d1d7a0813a2c1 100644 --- a/docs/guides/openiotsdk_examples.md +++ b/docs/guides/openiotsdk_examples.md @@ -376,6 +376,42 @@ For `TF-M` protected storage use: [Open IoT SDK build script](../../scripts/examples/openiotsdk_example.sh) provides the `-K,--kvsfile` option to use the persistence options listed above. +### Crypto backend + +Open IoT SDK port supports two crypto backend implementations: + +- [Mbed TLS](../guides/openiotsdk_platform_overview.md#mbed-tls) - it's the + default option +- [PSA crypto service](https://tf-m-user-guide.trustedfirmware.org/integration_guide/services/tfm_crypto_integration_guide.html) + from the + [TrustedFirmware-M (TF-M)](../guides/openiotsdk_platform_overview.md#trusted-firmware-m) + component + +The CMake variable `CONFIG_CHIP_CRYPTO` controls how cryptographic operations +are implemented in Matter. It accepts two values: + +- `mbedtls`: use Mbed TLS for crypto operations. +- `psa`: use + [PSA Cryptography API](https://armmbed.github.io/mbed-crypto/html/) for + crypto operations. + +This variable can be set in the main application `CMakeLists.txt`: + +``` +set(CONFIG_CHIP_CRYPTO ) +``` + +The variable can also be defined with CMake CLI: + +``` +cmake -G <...> -DCONFIG_CHIP_CRYPTO= <...> +``` + +> 💡 **Notes**: +> +> The `TF-M PSA crypto` option requires enabling [TF-M](#trusted-firmware-m) +> support. + ## Building You can build examples using the dedicated VSCode task or by calling directly @@ -388,6 +424,7 @@ the build script from the command line. - Select `Build Open IoT SDK example` - Decide on debug mode support - Decide on LwIP debug logs support +- Choose crypto algorithm - Choose example name This will call the script with the selected parameters. @@ -570,12 +607,12 @@ telnet> close ## Specific examples -### Build lock-app example and run it in the network namespace +### Build lock-app example with PSA crypto backend support and run it in the network namespace **Using CLI** ``` -${MATTER_ROOT}/scripts/examples/openiotsdk_example.sh lock-app +${MATTER_ROOT}/scripts/examples/openiotsdk_example.sh -b psa lock-app export TEST_NETWORK_NAME=OIStest @@ -595,6 +632,7 @@ Build example: - Select `Build Open IoT SDK example` - Deny debug mode support `false` - Deny LwIP debug logs support `false` +- Choose crypto algorithm `psa` - Choose example name `lock-app` Setup network environment: @@ -616,12 +654,12 @@ Run example: The example output should be seen in the terminal window. -### Build lock-app example and execute its test in the network namespace +### Build lock-app example with mbedtls crypto backend support and execute its test in the network namespace **Using CLI** ``` -${MATTER_ROOT}/scripts/examples/openiotsdk_example.sh lock-app +${MATTER_ROOT}/scripts/examples/openiotsdk_example.sh -b mbedtls lock-app export TEST_NETWORK_NAME=OIStest @@ -641,6 +679,7 @@ Build example: - Select `Build Open IoT SDK example` - Deny debug mode support `false` - Deny LwIP debug logs support `false` +- Choose crypto algorithm `mbedtls` - Choose example name `lock-app` Setup network environment: @@ -660,7 +699,7 @@ Test example: - Enter network interface `OIStesttap` - Choose example name `lock-app` -### Build lock-app example in debug mode and debug it in the network namespace using the VSCode task +### Build lock-app example with mbedtls crypto backend support in debug mode and debug it in the network namespace using the VSCode task Build example: @@ -669,6 +708,7 @@ Build example: - Select `Build Open IoT SDK example` - Confirm debug mode support `true` - Deny LwIP debug logs support `false` +- Choose crypto algorithm `mbedtls` - Choose example name `lock-app` Setup network environment: @@ -757,9 +797,8 @@ Example: ... - name: Build new-example example id: build_new_example - timeout-minutes: 10 run: | - scripts/examples/openiotsdk_example.sh new-example + scripts/examples/openiotsdk_example.sh -b ${{ matrix.cryptoBackend }} new-example .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ openiotsdk release new-example \ examples/new-example/openiotsdk/build/chip-openiotsdk-new-example-example.elf \ diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 0884310a04d18a..3b3aed0c92d52b 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -88,6 +88,7 @@ mw320_executable("shell_mw320") { ldflags = [ "-T" + rebase_path(ldscript, root_build_dir), + "-Wl,-print-memory-usage", "-Wl,--no-warn-rwx-segment", ] defines = [ diff --git a/examples/chef/README.md b/examples/chef/README.md index a2cef201c4c0e5..cd384b2350fdd9 100644 --- a/examples/chef/README.md +++ b/examples/chef/README.md @@ -137,20 +137,12 @@ chef_$PLATFORM: options: --user root steps: - - uses: Wandalen/wretry.action@v1.3.0 - name: Checkout + - name: Checkout + uses: actions/checkout@v3 + - name: Checkout submodules & Bootstrap + uses: ./.github/actions/checkout-submodules-and-bootstrap with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: | - scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform $PLATFORM - - name: Bootstrap - timeout-minutes: 25 - run: bash scripts/bootstrap.sh + platform: $PLATFORM - name: CI Examples $PLATFORM shell: bash run: | diff --git a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm index d0c900c3271ddd..a3db301d6529ee 100644 --- a/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm +++ b/examples/darwin-framework-tool/commands/interactive/InteractiveCommands.mm @@ -22,7 +22,7 @@ #include -constexpr const char * kInteractiveModePrompt = ">>> "; +constexpr const char * kInteractiveModePrompt = "Stop and restart stack: [Ctrl+_] & [Ctrl+^] \nQuit Interactive: 'quit()'\n>>> "; constexpr const char * kInteractiveModeHistoryFilePath = "/tmp/darwin_framework_tool_history"; constexpr const char * kInteractiveModeStopCommand = "quit()"; diff --git a/examples/platform/nxp/mw320/app/ldscripts/88MW320_xx_xxxx_flash.ld b/examples/platform/nxp/mw320/app/ldscripts/88MW320_xx_xxxx_flash.ld index 53bf0dc52cd4c8..7133d2ba8b32b9 100644 --- a/examples/platform/nxp/mw320/app/ldscripts/88MW320_xx_xxxx_flash.ld +++ b/examples/platform/nxp/mw320/app/ldscripts/88MW320_xx_xxxx_flash.ld @@ -38,7 +38,7 @@ _nvram_start = 0x480C0000; MEMORY { m_interrupts (RX) : ORIGIN = 0x1F000100, LENGTH = 0x00000180 - m_text (RX) : ORIGIN = 0x1F000280, LENGTH = 0x000FFD80 + m_text (RX) : ORIGIN = 0x1F000280, LENGTH = 0x003FFD80 m_data0 (RW) : ORIGIN = 0x00100000, LENGTH = 0x0005EFC0 m_data1 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00020000 m_nvram (RW) : ORIGIN = 0x480C0044, LENGTH = 0x00000FBC diff --git a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp index 28b6da91f5c176..dff6a15e21cb93 100644 --- a/examples/platform/openiotsdk/app/openiotsdk_platform.cpp +++ b/examples/platform/openiotsdk/app/openiotsdk_platform.cpp @@ -27,6 +27,10 @@ #include "iotsdk/ip_network_api.h" #include "mbedtls/platform.h" +#ifdef CONFIG_CHIP_CRYPTO_PSA +#include "psa/crypto.h" +#endif + #include #include #include @@ -179,6 +183,15 @@ int openiotsdk_platform_init(void) return EXIT_FAILURE; } +#ifdef CONFIG_CHIP_CRYPTO_PSA + ret = psa_crypto_init(); + if (ret) + { + ChipLogError(NotSpecified, "PSA crypto initialization failed: %d", ret); + return EXIT_FAILURE; + } +#endif + #ifdef TFM_SUPPORT ret = get_psa_images_details(); if (ret != 0) diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index 7983d1667b9a04..9c1e3a60bd4e42 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -43,6 +43,13 @@ declare_args() { #default Wifi Password chip_default_wifi_psk = "" + + # Enable TestEventTrigger in GeneralDiagnostics cluster + silabs_test_event_trigger_enabled = false + + # The EnableKey in hex string format used by TestEventTrigger command in + # GeneralDiagnostics cluster. The length of the string should be 32. + silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" } import("${chip_root}/src/platform/silabs/wifi_args.gni") @@ -226,6 +233,7 @@ config("silabs-wifi-config") { source_set("siwx917-common") { deps = [] + defines = [] public_deps = [] public_configs = [ ":siwx917-common-config", @@ -294,6 +302,12 @@ source_set("siwx917-common") { public_deps += [ ":silabs-factory-data-provider" ] } + if (silabs_test_event_trigger_enabled) { + sources += + [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] + defines += [ "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"" ] + } + public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/lib", diff --git a/examples/platform/silabs/SiWx917/matter_config.cpp b/examples/platform/silabs/SiWx917/matter_config.cpp index 9d6344132ce8f1..4422a5474c862c 100644 --- a/examples/platform/silabs/SiWx917/matter_config.cpp +++ b/examples/platform/silabs/SiWx917/matter_config.cpp @@ -55,6 +55,8 @@ using namespace ::chip::DeviceLayer; // If building with the SiWx917-provided crypto backend, we can use the #include "SilabsDeviceDataProvider.h" +#include "SilabsTestEventTriggerDelegate.h" +#include #if SILABS_OTA_ENABLED void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState) @@ -65,7 +67,8 @@ void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, vo } #endif -void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg){ +void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event, intptr_t arg) +{ // Initialize OTA only when Thread or WiFi connectivity is established /*if (((event->Type == DeviceEventType::kThreadConnectivityChange) && (event->ThreadConnectivityChange.Result == kConnectivity_Established)) || @@ -79,6 +82,51 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event SILABS_LOG("Scheduling OTA Requestor initialization") } +#if SILABS_TEST_EVENT_TRIGGER_ENABLED +static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff }; + +static int hex_digit_to_int(char hex) +{ + if ('A' <= hex && hex <= 'F') + { + return 10 + hex - 'A'; + } + if ('a' <= hex && hex <= 'f') + { + return 10 + hex - 'a'; + } + if ('0' <= hex && hex <= '9') + { + return hex - '0'; + } + return -1; +} + +static size_t hex_string_to_binary(const char * hex_string, uint8_t * buf, size_t buf_size) +{ + size_t num_char = strlen(hex_string); + if (num_char != buf_size * 2) + { + return 0; + } + for (size_t i = 0; i < num_char; i += 2) + { + int digit0 = hex_digit_to_int(hex_string[i]); + int digit1 = hex_digit_to_int(hex_string[i + 1]); + + if (digit0 < 0 || digit1 < 0) + { + return 0; + } + buf[i / 2] = (digit0 << 4) + digit1; + } + + return buf_size; +} +#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED + CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) { CHIP_ERROR err; @@ -131,6 +179,17 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // Create initParams with SDK example defaults here static chip::CommonCaseDeviceServerInitParams initParams; +#if SILABS_TEST_EVENT_TRIGGER_ENABLED + if (hex_string_to_binary(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, sTestEventTriggerEnableKey, + sizeof(sTestEventTriggerEnableKey)) == 0) + { + SILABS_LOG("Failed to convert the EnableKey string to octstr type value"); + memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); + } + static SilabsTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; + initParams.testEventTriggerDelegate = &testEventTriggerDelegate; +#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED + // Initialize the remaining (not overridden) providers to the SDK example defaults (void) initParams.InitializeStaticResourcesBeforeServerInit(); diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp new file mode 100644 index 00000000000000..f9a11df74d7ae9 --- /dev/null +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.cpp @@ -0,0 +1,30 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SilabsTestEventTriggerDelegate.h" + +using namespace ::chip::DeviceLayer; + +namespace chip { + +bool SilabsTestEventTriggerDelegate::DoesEnableKeyMatch(const ByteSpan & enableKey) const +{ + return !mEnableKey.empty() && mEnableKey.data_equal(enableKey); +} + +} // namespace chip diff --git a/examples/platform/silabs/SilabsTestEventTriggerDelegate.h b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h new file mode 100644 index 00000000000000..a69bd56c633afd --- /dev/null +++ b/examples/platform/silabs/SilabsTestEventTriggerDelegate.h @@ -0,0 +1,48 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +namespace chip { + +class SilabsTestEventTriggerDelegate : public TestEventTriggerDelegate +{ +public: + explicit SilabsTestEventTriggerDelegate(const ByteSpan & enableKey) : mEnableKey(enableKey) {} + + /** + * @brief Checks to see if `enableKey` provided matches value chosen by the manufacturer. + * @param enableKey Buffer of the key to verify. + * @return True or False. + */ + bool DoesEnableKeyMatch(const ByteSpan & enableKey) const override; + + /** + * @brief User handler for handling the test event trigger based on `eventTrigger` provided. + * @param eventTrigger Event trigger to handle. + * @return CHIP_NO_ERROR on success or another CHIP_ERROR on failure. + */ + CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override; + +private: + ByteSpan mEnableKey; +}; + +} // namespace chip diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index 6d08c1d47a532b..d4fabaacef17cc 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -41,6 +41,13 @@ declare_args() { # Use default handler to negotiate subscription max interval chip_config_use_icd_subscription_callbacks = enable_sleepy_device + + # Enable TestEventTrigger in GeneralDiagnostics cluster + silabs_test_event_trigger_enabled = false + + # The EnableKey in hex string format used by TestEventTrigger command in + # GeneralDiagnostics cluster. The length of the string should be 32. + silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff" } silabs_common_plat_dir = "${chip_root}/examples/platform/silabs" @@ -262,6 +269,7 @@ config("silabs-wifi-config") { source_set("efr32-common") { deps = [] + defines = [] public_deps = [] public_configs = [ ":efr32-common-config", @@ -351,6 +359,15 @@ source_set("efr32-common") { public_deps += [ ":efr32-ICD-subscription-callback" ] } + if (silabs_test_event_trigger_enabled) { + sources += + [ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ] + defines += [ + "SILABS_TEST_EVENT_TRIGGER_ENABLED=true", + "SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY=\"${silabs_test_event_trigger_enable_key}\"", + ] + } + public_deps += [ "${chip_root}/examples/providers:device_info_provider", "${chip_root}/src/app/server", diff --git a/examples/platform/silabs/efr32/matter_config.cpp b/examples/platform/silabs/efr32/matter_config.cpp index 14118d071e892b..fdecec6279b3da 100644 --- a/examples/platform/silabs/efr32/matter_config.cpp +++ b/examples/platform/silabs/efr32/matter_config.cpp @@ -54,7 +54,9 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys #endif #include "SilabsDeviceDataProvider.h" +#include "SilabsTestEventTriggerDelegate.h" #include +#include #ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS ICDSubscriptionCallback SilabsMatterConfig::mICDSubscriptionHandler; @@ -133,6 +135,51 @@ void SilabsMatterConfig::ConnectivityEventCallback(const ChipDeviceEvent * event } } +#if SILABS_TEST_EVENT_TRIGGER_ENABLED +static uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, + 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, + 0xcc, 0xdd, 0xee, 0xff }; + +static int hex_digit_to_int(char hex) +{ + if ('A' <= hex && hex <= 'F') + { + return 10 + hex - 'A'; + } + if ('a' <= hex && hex <= 'f') + { + return 10 + hex - 'a'; + } + if ('0' <= hex && hex <= '9') + { + return hex - '0'; + } + return -1; +} + +static size_t hex_string_to_binary(const char * hex_string, uint8_t * buf, size_t buf_size) +{ + size_t num_char = strlen(hex_string); + if (num_char != buf_size * 2) + { + return 0; + } + for (size_t i = 0; i < num_char; i += 2) + { + int digit0 = hex_digit_to_int(hex_string[i]); + int digit1 = hex_digit_to_int(hex_string[i + 1]); + + if (digit0 < 0 || digit1 < 0) + { + return 0; + } + buf[i / 2] = (digit0 << 4) + digit1; + } + + return buf_size; +} +#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED + CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) { CHIP_ERROR err; @@ -174,6 +221,17 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) // Create initParams with SDK example defaults here static chip::CommonCaseDeviceServerInitParams initParams; +#if SILABS_TEST_EVENT_TRIGGER_ENABLED + if (hex_string_to_binary(SILABS_TEST_EVENT_TRIGGER_ENABLE_KEY, sTestEventTriggerEnableKey, + sizeof(sTestEventTriggerEnableKey)) == 0) + { + SILABS_LOG("Failed to convert the EnableKey string to octstr type value"); + memset(sTestEventTriggerEnableKey, 0, sizeof(sTestEventTriggerEnableKey)); + } + static SilabsTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; + initParams.testEventTriggerDelegate = &testEventTriggerDelegate; +#endif // SILABS_TEST_EVENT_TRIGGER_ENABLED + #if CHIP_CRYPTO_PLATFORM // When building with EFR32 crypto, use the opaque key store // instead of the default (insecure) one. diff --git a/scripts/build/BUILD.gn b/scripts/build/BUILD.gn index 11ea4e9b721e84..0e716ae7e9b390 100644 --- a/scripts/build/BUILD.gn +++ b/scripts/build/BUILD.gn @@ -31,8 +31,8 @@ pw_python_package("build_examples") { "testdata/dry_run_linux-arm64-ota-requestor-nodeps-ipv6only.txt", "testdata/dry_run_linux-x64-all-clusters-coverage.txt", "testdata/dry_run_nrf-nrf52840dk-pump.txt", - "testdata/dry_run_openiotsdk-lock.txt", - "testdata/dry_run_openiotsdk-shell.txt", + "testdata/dry_run_openiotsdk-lock-mbedtls.txt", + "testdata/dry_run_openiotsdk-shell-mbedtls.txt", ] sources = [ diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 17c01600e91ad8..4fc614518cda55 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -28,7 +28,7 @@ from builders.mbed import MbedApp, MbedBoard, MbedBuilder, MbedProfile from builders.mw320 import MW320App, MW320Builder from builders.nrf import NrfApp, NrfBoard, NrfConnectBuilder -from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder +from builders.openiotsdk import OpenIotSdkApp, OpenIotSdkBuilder, OpenIotSdkCryptoBackend from builders.qpg import QpgApp, QpgBoard, QpgBuilder from builders.telink import TelinkApp, TelinkBoard, TelinkBuilder from builders.ti import TIApp, TIBoard, TIBuilder @@ -674,6 +674,10 @@ def BuildOpenIotSdkTargets(): TargetPart('lock', app=OpenIotSdkApp.LOCK), ]) + # Modifiers + target.AppendModifier('mbedtls', crypto=OpenIotSdkCryptoBackend.MBEDTLS).ExceptIfRe('-(psa)') + target.AppendModifier('psa', crypto=OpenIotSdkCryptoBackend.PSA).ExceptIfRe('-(mbedtls)') + return target diff --git a/scripts/build/builders/openiotsdk.py b/scripts/build/builders/openiotsdk.py index 7f3cd682d86ba3..89aad6a59e9a16 100644 --- a/scripts/build/builders/openiotsdk.py +++ b/scripts/build/builders/openiotsdk.py @@ -42,13 +42,29 @@ def AppNamePrefix(self): raise Exception('Unknown app type: %r' % self) +class OpenIotSdkCryptoBackend(Enum): + PSA = auto() + MBEDTLS = auto() + + @property + def CryptoBackendName(self): + if self == OpenIotSdkCryptoBackend.PSA: + return 'psa' + elif self == OpenIotSdkCryptoBackend.MBEDTLS: + return 'mbedtls' + else: + raise Exception('Unknown crypto backend type: %r' % self) + + class OpenIotSdkBuilder(Builder): def __init__(self, root, runner, - app: OpenIotSdkApp = OpenIotSdkApp.SHELL): + app: OpenIotSdkApp = OpenIotSdkApp.SHELL, + crypto: OpenIotSdkCryptoBackend = OpenIotSdkCryptoBackend.MBEDTLS): super(OpenIotSdkBuilder, self).__init__(root, runner) self.app = app + self.crypto = crypto self.toolchain_path = os.path.join( 'toolchains', 'toolchain-arm-none-eabi-gcc.cmake') self.system_processor = 'cortex-m55' @@ -65,6 +81,8 @@ def generate(self): '-DCMAKE_SYSTEM_PROCESSOR={}'.format( self.system_processor), '-DCMAKE_BUILD_TYPE=Release', + '-DCONFIG_CHIP_CRYPTO={}'.format( + self.crypto.CryptoBackendName), ], title='Generating ' + self.identifier) def _build(self): diff --git a/scripts/build/test.py b/scripts/build/test.py index 70fca73f082f7b..c89a4d98109357 100644 --- a/scripts/build/test.py +++ b/scripts/build/test.py @@ -109,8 +109,8 @@ def test_general_dry_runs(self): 'android-arm64-chip-tool', 'nrf-nrf52840dk-pump', 'efr32-brd4161a-light-rpc-no-version', - 'openiotsdk-lock', - 'openiotsdk-shell' + 'openiotsdk-lock-mbedtls', + 'openiotsdk-shell-mbedtls' ] for target in TARGETS: diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index b0e8ca28fc4936..b3e88f5d1752b0 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -22,4 +22,4 @@ nrf-native-posix-64-tests qpg-qpg6105-{lock,light,shell,persistent-storage} tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan] telink-tlsr9518adk80d-{all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,temperature-measurement,thermostat,window-covering}[-shell][-rpc][-factory-data] -openiotsdk-{shell,lock} +openiotsdk-{shell,lock}[-mbedtls][-psa] diff --git a/scripts/build/testdata/dry_run_openiotsdk-lock-mbedtls.txt b/scripts/build/testdata/dry_run_openiotsdk-lock-mbedtls.txt new file mode 100644 index 00000000000000..77816cf664190c --- /dev/null +++ b/scripts/build/testdata/dry_run_openiotsdk-lock-mbedtls.txt @@ -0,0 +1,8 @@ +# Commands will be run in CHIP project root. +cd "{root}" + +# Generating openiotsdk-lock-mbedtls +cmake -GNinja -S {root}/examples/lock-app/openiotsdk -B {out}/openiotsdk-lock-mbedtls --toolchain=toolchains/toolchain-arm-none-eabi-gcc.cmake -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 -DCMAKE_BUILD_TYPE=Release -DCONFIG_CHIP_CRYPTO=mbedtls + +# Building openiotsdk-lock-mbedtls +cmake --build {out}/openiotsdk-lock-mbedtls diff --git a/scripts/build/testdata/dry_run_openiotsdk-lock.txt b/scripts/build/testdata/dry_run_openiotsdk-lock.txt deleted file mode 100644 index a0c36ee27f53ad..00000000000000 --- a/scripts/build/testdata/dry_run_openiotsdk-lock.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Commands will be run in CHIP project root. -cd "{root}" - -# Generating openiotsdk-lock -cmake -GNinja -S {root}/examples/lock-app/openiotsdk -B {out}/openiotsdk-lock --toolchain=toolchains/toolchain-arm-none-eabi-gcc.cmake -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 -DCMAKE_BUILD_TYPE=Release - -# Building openiotsdk-lock -cmake --build {out}/openiotsdk-lock diff --git a/scripts/build/testdata/dry_run_openiotsdk-shell-mbedtls.txt b/scripts/build/testdata/dry_run_openiotsdk-shell-mbedtls.txt new file mode 100644 index 00000000000000..70438c5fe091bd --- /dev/null +++ b/scripts/build/testdata/dry_run_openiotsdk-shell-mbedtls.txt @@ -0,0 +1,8 @@ +# Commands will be run in CHIP project root. +cd "{root}" + +# Generating openiotsdk-shell-mbedtls +cmake -GNinja -S {root}/examples/shell/openiotsdk -B {out}/openiotsdk-shell-mbedtls --toolchain=toolchains/toolchain-arm-none-eabi-gcc.cmake -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 -DCMAKE_BUILD_TYPE=Release -DCONFIG_CHIP_CRYPTO=mbedtls + +# Building openiotsdk-shell-mbedtls +cmake --build {out}/openiotsdk-shell-mbedtls diff --git a/scripts/build/testdata/dry_run_openiotsdk-shell.txt b/scripts/build/testdata/dry_run_openiotsdk-shell.txt deleted file mode 100644 index 6c7c63befb4e7a..00000000000000 --- a/scripts/build/testdata/dry_run_openiotsdk-shell.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Commands will be run in CHIP project root. -cd "{root}" - -# Generating openiotsdk-shell -cmake -GNinja -S {root}/examples/shell/openiotsdk -B {out}/openiotsdk-shell --toolchain=toolchains/toolchain-arm-none-eabi-gcc.cmake -DCMAKE_SYSTEM_PROCESSOR=cortex-m55 -DCMAKE_BUILD_TYPE=Release - -# Building openiotsdk-shell -cmake --build {out}/openiotsdk-shell diff --git a/scripts/examples/openiotsdk_example.sh b/scripts/examples/openiotsdk_example.sh index 496fc04605f1bb..f80b537d1e0668 100755 --- a/scripts/examples/openiotsdk_example.sh +++ b/scripts/examples/openiotsdk_example.sh @@ -44,6 +44,7 @@ FVP_NETWORK="user" KVS_STORAGE_TYPE="tdb" KVS_STORAGE_FILE="" NO_ACTIVATE="" +CRYPTO_BACKEND="mbedtls" declare -A tdb_storage_param=([instance]=sram [memspace]=0 [address]=0x0 [size]=0x100000) declare -A ps_storage_param=([instance]=qspi_sram [memspace]=0 [address]=0x660000 [size]=0x12000) @@ -67,6 +68,7 @@ Options: -d,--debug Build in debug mode -l,--lwipdebug Build with LwIP debug logs support -k,--kvsstore Select KVS storage type + -b,--backend -p,--path Build path -K,--kvsfile Path to KVS storage file which will be used to ensure persistence -n,--network FVP network interface name @@ -135,6 +137,8 @@ function build_with_cmake() { BUILD_OPTIONS+=(-DCONFIG_CHIP_OPEN_IOT_SDK_USE_PSA_PS=YES) fi + BUILD_OPTIONS+=(-DCONFIG_CHIP_CRYPTO="$CRYPTO_BACKEND") + cmake -G Ninja -S "$EXAMPLE_PATH" -B "$BUILD_PATH" --toolchain="$TOOLCHAIN_PATH" "${BUILD_OPTIONS[@]}" cmake --build "$BUILD_PATH" } @@ -269,8 +273,8 @@ function run_test() { fi } -SHORT=C:,p:,d:,l:,n:,k:,K:,c,s,h -LONG=command:,path:,debug:,lwipdebug:,network:,kvsstore:,kvsfile:,clean,scratch,help,no-activate +SHORT=C:,p:,d:,l:,b:,n:,k:,K:,c,s,h +LONG=command:,path:,debug:,lwipdebug:,backend:,network:,kvsstore:,kvsfile:,clean,scratch,help,no-activate OPTS=$(getopt -n build --options "$SHORT" --longoptions "$LONG" -- "$@") eval set -- "$OPTS" @@ -309,6 +313,10 @@ while :; do KVS_STORAGE_FILE=$2 shift 2 ;; + -b | --backend) + CRYPTO_BACKEND=$2 + shift 2 + ;; -p | --path) BUILD_PATH=$CHIP_ROOT/$2 shift 2 @@ -385,6 +393,15 @@ case "$KVS_STORAGE_TYPE" in ;; esac +case "$CRYPTO_BACKEND" in + psa | mbedtls) ;; + *) + echo "Wrong crypto type definition" + show_usage + exit 2 + ;; +esac + TOOLCHAIN_PATH="toolchains/toolchain-$TOOLCHAIN.cmake" if [ -z "$BUILD_PATH" ]; then diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index c026fb36a65a7a..5e4a67ef55944a 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -23,6 +23,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-clu load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml"; +load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/ethernet-network-diagnostics-cluster.xml"; diff --git a/src/app/AttributeAccessInterface.h b/src/app/AttributeAccessInterface.h index 2b16392e107fb1..8b4ec3a0c91d47 100644 --- a/src/app/AttributeAccessInterface.h +++ b/src/app/AttributeAccessInterface.h @@ -370,11 +370,6 @@ class AttributeValueDecoder return CHIP_NO_ERROR; } - /** - * Is the next element of the stream NULL. - */ - bool WillDecodeNull() const { return mReader.GetType() == TLV::kTLVType_Null; } - bool TriedDecode() const { return mTriedDecode; } /** diff --git a/src/app/data-model/BasicTypes.h b/src/app/data-model/BasicTypes.h index 6bc1c967d18423..4011d7b2180e0c 100644 --- a/src/app/data-model/BasicTypes.h +++ b/src/app/data-model/BasicTypes.h @@ -56,12 +56,24 @@ struct IsBasicType static constexpr bool value = true; }; +template <> +struct IsBasicType +{ + static constexpr bool value = true; +}; + template <> struct IsBasicType { static constexpr bool value = true; }; +template <> +struct IsBasicType +{ + static constexpr bool value = true; +}; + } // namespace DataModel } // namespace app } // namespace chip diff --git a/src/app/zap-templates/zcl/data-model/all.xml b/src/app/zap-templates/zcl/data-model/all.xml index 9364d830c45340..ca275414705c4f 100644 --- a/src/app/zap-templates/zcl/data-model/all.xml +++ b/src/app/zap-templates/zcl/data-model/all.xml @@ -21,6 +21,7 @@ + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml new file mode 100644 index 00000000000000..b734980d1d78ba --- /dev/null +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + Dishwasher Alarm + Appliances + Attributes and commands for configuring the Dishwasher alarm. + 0x005D + DISHWASHER_ALARM_CLUSTER + + true + true + + Mask + Latch + State + Supported + + + Reset alarm + + + + + Modify enabled alarms + + + + + Notify + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml index 16ca9a02487e3b..0a11025bad1000 100644 --- a/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml @@ -23,11 +23,19 @@ limitations under the License. + + + + + + + + Appliances - Washer Controls + Laundry Washer Controls 0x0053 - WASHER_CONTROLS_CLUSTER + LAUNDRY_WASHER_CONTROLS_CLUSTER true true This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. @@ -36,7 +44,8 @@ limitations under the License. SpinSpeeds SpinSpeedCurrent - NumberOfRinses - MaxRinses + NumberOfRinses + SupportedRinses + \ No newline at end of file diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 07eca6ae3db3d3..ce387388c772ad 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -35,6 +35,7 @@ "content-launch-cluster.xml", "descriptor-cluster.xml", "diagnostic-logs-cluster.xml", + "dishwasher-alarm-cluster.xml", "dishwasher-mode-cluster.xml", "door-lock-cluster.xml", "electrical-measurement-cluster.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 24cc5cb2c4a6d1..686ca4d51c3795 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -34,6 +34,7 @@ "content-launch-cluster.xml", "descriptor-cluster.xml", "diagnostic-logs-cluster.xml", + "dishwasher-alarm-cluster.xml", "dishwasher-mode-cluster.xml", "door-lock-cluster.xml", "electrical-measurement-cluster.xml", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index 4a005bd706ee68..5f6fa66ad798cf 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -36,6 +36,7 @@ "DESCRIPTOR_CLUSTER": [], "DEVICE_TEMP_CLUSTER": [], "DIAGNOSTIC_LOGS_CLUSTER": [], + "DISHWASHER_ALARM_CLUSTER": [], "DISHWASHER_MODE_CLUSTER": [], "DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [], "DOOR_LOCK_CLUSTER": [], @@ -140,7 +141,7 @@ "UV_FILTER_MONITORING_CLUSTER": [], "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [], "WAKE_ON_LAN_CLUSTER": [], - "WASHER_CONTROLS_CLUSTER": [], + "LAUNDRY_WASHER_CONTROLS_CLUSTER": [], "WATER_TANK_MONITORING_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], "WINDOW_COVERING_CLUSTER": [], @@ -187,6 +188,7 @@ "DESCRIPTOR_CLUSTER": ["descriptor"], "DEVICE_TEMP_CLUSTER": [], "DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"], + "DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"], "DISHWASHER_MODE_CLUSTER": ["mode-select-server"], "DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER": [], "DOOR_LOCK_CLUSTER": ["door-lock-server"], diff --git a/src/controller/data_model/BUILD.gn b/src/controller/data_model/BUILD.gn index 22f59e0292cb80..f97ccd00a43af7 100644 --- a/src/controller/data_model/BUILD.gn +++ b/src/controller/data_model/BUILD.gn @@ -108,6 +108,8 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/DescriptorClient-ReadImpl.cpp", "jni/DiagnosticLogsClient-InvokeSubscribeImpl.cpp", "jni/DiagnosticLogsClient-ReadImpl.cpp", + "jni/DishwasherAlarmClient-InvokeSubscribeImpl.cpp", + "jni/DishwasherAlarmClient-ReadImpl.cpp", "jni/DishwasherModeClient-InvokeSubscribeImpl.cpp", "jni/DishwasherModeClient-ReadImpl.cpp", "jni/DissolvedOxygenConcentrationMeasurementClient-InvokeSubscribeImpl.cpp", @@ -298,8 +300,8 @@ if (current_os == "android" || matter_enable_java_compilation) { "jni/UvFilterMonitoringClient-ReadImpl.cpp", "jni/WakeOnLanClient-InvokeSubscribeImpl.cpp", "jni/WakeOnLanClient-ReadImpl.cpp", - "jni/WasherControlsClient-InvokeSubscribeImpl.cpp", - "jni/WasherControlsClient-ReadImpl.cpp", + "jni/LaundryWasherControlsClient-InvokeSubscribeImpl.cpp", + "jni/LaundryWasherControlsClient-ReadImpl.cpp", "jni/WaterTankMonitoringClient-InvokeSubscribeImpl.cpp", "jni/WaterTankMonitoringClient-ReadImpl.cpp", "jni/WiFiNetworkDiagnosticsClient-InvokeSubscribeImpl.cpp", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index e3c54ed2523660..6e95ea7a83dcfc 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2895,7 +2895,14 @@ client cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { } /** This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such as a washing machine. */ -client cluster WasherControls = 83 { +client cluster LaundryWasherControls = 83 { + enum NumberOfRinsesEnum : ENUM8 { + kNone = 0; + kNormal = 1; + kExtra = 2; + kMax = 3; + } + bitmap Feature : BITMAP32 { kSpin = 0x1; kRinse = 0x2; @@ -2903,8 +2910,8 @@ client cluster WasherControls = 83 { readonly attribute optional CHAR_STRING spinSpeeds[] = 0; attribute optional nullable int8u spinSpeedCurrent = 1; - attribute optional nullable int8u numberOfRinses = 2; - readonly attribute optional int8u maxRinses = 3; + attribute optional NumberOfRinsesEnum numberOfRinses = 2; + readonly attribute optional NumberOfRinsesEnum supportedRinses[] = 3; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3258,6 +3265,49 @@ client cluster SmokeCoAlarm = 92 { command SelfTestRequest(): DefaultSuccess = 0; } +/** Attributes and commands for configuring the Dishwasher alarm. */ +client cluster DishwasherAlarm = 93 { + bitmap AlarmMap : BITMAP32 { + kInflowError = 0x1; + kDrainError = 0x2; + kDoorError = 0x4; + kTempTooLow = 0x8; + kTempTooHigh = 0x10; + kWaterLevelError = 0x20; + } + + info event Notify = 0 { + AlarmMap active = 0; + AlarmMap inactive = 1; + AlarmMap state = 2; + AlarmMap mask = 3; + } + + readonly attribute AlarmMap mask = 0; + readonly attribute optional AlarmMap latch = 1; + readonly attribute AlarmMap state = 2; + readonly attribute AlarmMap supported = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ResetRequest { + AlarmMap alarms = 0; + } + + request struct ModifyEnabledAlarmsRequest { + AlarmMap mask = 0; + } + + /** Reset alarm */ + command Reset(ResetRequest): DefaultSuccess = 0; + /** Modify enabled alarms */ + command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1; +} + /** This cluster supports remotely monitoring and, where supported, changing the operational state of any device where a state machine is a part of the operation. */ client cluster OperationalState = 96 { enum ErrorStateEnum : ENUM8 { diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 0a357eb62955c7..69218e0355a231 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -16,12 +16,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../app/zap-templates/zcl/zcl.json", @@ -29,6 +23,12 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" } ], "endpointTypes": [ @@ -10550,7 +10550,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10614,7 +10614,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10630,7 +10630,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10646,7 +10646,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10662,7 +10662,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10775,30 +10775,14 @@ } ], "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", - "code": 1, + "code": 0, "mfgCode": null, "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10809,7 +10793,7 @@ }, { "name": "CurrentMode", - "code": 2, + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", @@ -10825,11 +10809,11 @@ }, { "name": "StartUpMode", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -10841,7 +10825,7 @@ }, { "name": "OnMode", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "type": "int8u", @@ -10862,7 +10846,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10878,7 +10862,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10894,7 +10878,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -10910,7 +10894,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11023,30 +11007,14 @@ } ], "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", - "code": 1, + "code": 0, "mfgCode": null, "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11057,7 +11025,7 @@ }, { "name": "CurrentMode", - "code": 2, + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", @@ -11073,11 +11041,11 @@ }, { "name": "StartUpMode", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -11089,7 +11057,7 @@ }, { "name": "OnMode", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "type": "int8u", @@ -11110,7 +11078,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11126,7 +11094,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11142,7 +11110,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11158,7 +11126,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11202,10 +11170,10 @@ ] }, { - "name": "Washer Controls", + "name": "Laundry Washer Controls", "code": 83, "mfgCode": null, - "define": "WASHER_CONTROLS_CLUSTER", + "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", "side": "client", "enabled": 1, "attributes": [ @@ -11244,10 +11212,10 @@ ] }, { - "name": "Washer Controls", + "name": "Laundry Washer Controls", "code": 83, "mfgCode": null, - "define": "WASHER_CONTROLS_CLUSTER", + "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", "side": "server", "enabled": 0, "attributes": [ @@ -11483,30 +11451,14 @@ } ], "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", - "code": 1, + "code": 0, "mfgCode": null, "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11517,7 +11469,7 @@ }, { "name": "CurrentMode", - "code": 2, + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", @@ -11533,11 +11485,11 @@ }, { "name": "StartUpMode", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -11549,7 +11501,7 @@ }, { "name": "OnMode", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "type": "int8u", @@ -11570,7 +11522,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11586,7 +11538,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11602,7 +11554,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11618,7 +11570,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11731,30 +11683,14 @@ } ], "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", - "code": 1, + "code": 0, "mfgCode": null, "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11765,7 +11701,7 @@ }, { "name": "CurrentMode", - "code": 2, + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", @@ -11781,11 +11717,11 @@ }, { "name": "StartUpMode", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -11797,7 +11733,7 @@ }, { "name": "OnMode", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "type": "int8u", @@ -11818,7 +11754,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11834,7 +11770,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11850,7 +11786,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11866,7 +11802,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -11910,12 +11846,22 @@ ] }, { - "name": "Refrigerator Alarm", - "code": 87, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "REFRIGERATOR_ALARM_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "client", "enabled": 1, + "commands": [ + { + "name": "SetTemperature", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], "attributes": [ { "name": "FeatureMap", @@ -11952,40 +11898,104 @@ ] }, { - "name": "Refrigerator Alarm", - "code": 87, + "name": "Temperature Control", + "code": 86, "mfgCode": null, - "define": "REFRIGERATOR_ALARM_CLUSTER", + "define": "TEMPERATURE_CONTROL_CLUSTER", "side": "server", "enabled": 0, "attributes": [ { - "name": "Mask", + "name": "TemperatureSetpoint", "code": 0, "mfgCode": null, "side": "server", - "type": "AlarmMap", - "included": 1, + "type": "temperature", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "State", + "name": "MinTemperature", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxTemperature", "code": 2, "mfgCode": null, "side": "server", - "type": "AlarmMap", - "included": 1, + "type": "temperature", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Step", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "temperature", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SelectedTemperatureLevel", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedTemperatureLevels", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12090,8 +12100,188 @@ ] }, { - "name": "Dishwasher Mode", - "code": 89, + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Refrigerator Alarm", + "code": 87, + "mfgCode": null, + "define": "REFRIGERATOR_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Mode", + "code": 89, "mfgCode": null, "define": "DISHWASHER_MODE_CLUSTER", "side": "client", @@ -12159,30 +12349,14 @@ } ], "attributes": [ - { - "name": "Description", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "SupportedModes", - "code": 1, + "code": 0, "mfgCode": null, "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12193,7 +12367,7 @@ }, { "name": "CurrentMode", - "code": 2, + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", @@ -12209,11 +12383,11 @@ }, { "name": "StartUpMode", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "type": "int8u", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -12225,7 +12399,7 @@ }, { "name": "OnMode", - "code": 4, + "code": 3, "mfgCode": null, "side": "server", "type": "int8u", @@ -12246,7 +12420,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12262,7 +12436,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12278,7 +12452,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12294,7 +12468,7 @@ "side": "server", "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12851,6 +13025,212 @@ } ] }, + { + "name": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Reset", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Dishwasher Alarm", + "code": 93, + "mfgCode": null, + "define": "DISHWASHER_ALARM_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "Mask", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Latch", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "State", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "AlarmMap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Operational State", "code": 96, diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index fc0b38b9bb4380..b3410f47be2aa9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -160,8 +160,8 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == RefrigeratorAndTemperatureControlledCabinetMode.ID) { return new RefrigeratorAndTemperatureControlledCabinetMode(); } - if (clusterId == WasherControls.ID) { - return new WasherControls(); + if (clusterId == LaundryWasherControls.ID) { + return new LaundryWasherControls(); } if (clusterId == RvcRunMode.ID) { return new RvcRunMode(); @@ -184,6 +184,9 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == SmokeCoAlarm.ID) { return new SmokeCoAlarm(); } + if (clusterId == DishwasherAlarm.ID) { + return new DishwasherAlarm(); + } if (clusterId == OperationalState.ID) { return new OperationalState(); } @@ -6562,7 +6565,7 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class WasherControls implements BaseCluster { + public static class LaundryWasherControls implements BaseCluster { public static final long ID = 83L; public long getID() { return ID; @@ -6572,7 +6575,7 @@ public enum Attribute { SpinSpeeds(0L), SpinSpeedCurrent(1L), NumberOfRinses(2L), - MaxRinses(3L), + SupportedRinses(3L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -7486,6 +7489,147 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } + public static class DishwasherAlarm implements BaseCluster { + public static final long ID = 93L; + public long getID() { + return ID; + } + + public enum Attribute { + Mask(0L), + Latch(1L), + State(2L), + Supported(3L), + GeneratedCommandList(65528L), + AcceptedCommandList(65529L), + EventList(65530L), + AttributeList(65531L), + FeatureMap(65532L), + ClusterRevision(65533L),; + private final long id; + Attribute(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Attribute value(long id) throws NoSuchFieldError { + for (Attribute attribute : Attribute.values()) { + if (attribute.getID() == id) { + return attribute; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Event { + Notify(0L),; + private final long id; + Event(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Event value(long id) throws NoSuchFieldError { + for (Event event : Event.values()) { + if (event.getID() == id) { + return event; + } + } + throw new NoSuchFieldError(); + } + } + + public enum Command { + Reset(0L), + ModifyEnabledAlarms(1L),; + private final long id; + Command(long id) { + this.id = id; + } + + public long getID() { + return id; + } + + public static Command value(long id) throws NoSuchFieldError { + for (Command command : Command.values()) { + if (command.getID() == id) { + return command; + } + } + throw new NoSuchFieldError(); + } + }public enum ResetCommandField {Alarms(0),; + private final int id; + ResetCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ResetCommandField value(int id) throws NoSuchFieldError { + for (ResetCommandField field : ResetCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum ModifyEnabledAlarmsCommandField {Mask(0),; + private final int id; + ModifyEnabledAlarmsCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static ModifyEnabledAlarmsCommandField value(int id) throws NoSuchFieldError { + for (ModifyEnabledAlarmsCommandField field : ModifyEnabledAlarmsCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }@Override + public String getAttributeName(long id) throws NoSuchFieldError { + return Attribute.value(id).toString(); + } + + @Override + public String getEventName(long id) throws NoSuchFieldError { + return Event.value(id).toString(); + } + + @Override + public String getCommandName(long id) throws NoSuchFieldError { + return Command.value(id).toString(); + } + + @Override + public long getAttributeID(String name) throws IllegalArgumentException { + return Attribute.valueOf(name).getID(); + } + + @Override + public long getEventID(String name) throws IllegalArgumentException { + return Event.valueOf(name).getID(); + } + + @Override + public long getCommandID(String name) throws IllegalArgumentException { + return Command.valueOf(name).getID(); + } + } public static class OperationalState implements BaseCluster { public static final long ID = 96L; public long getID() { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 948295592f8450..dde5901bd4aaa4 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -6284,117 +6284,117 @@ private static Map readRefrigeratorAndTemperatureContro return result; } - private static Map readWasherControlsInteractionInfo() { - Map result = new LinkedHashMap<>();Map readWasherControlsSpinSpeedsCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo( + private static Map readLaundryWasherControlsInteractionInfo() { + Map result = new LinkedHashMap<>();Map readLaundryWasherControlsSpinSpeedsCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSpinSpeedsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedsAttribute( - (ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSpinSpeedsAttribute( + (ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedsAttributeCallback(), - readWasherControlsSpinSpeedsCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback(), + readLaundryWasherControlsSpinSpeedsCommandParams ); - result.put("readSpinSpeedsAttribute", readWasherControlsSpinSpeedsAttributeInteractionInfo); - Map readWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + result.put("readSpinSpeedsAttribute", readLaundryWasherControlsSpinSpeedsAttributeInteractionInfo); + Map readLaundryWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readSpinSpeedCurrentAttribute( - (ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSpinSpeedCurrentAttribute( + (ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback(), - readWasherControlsSpinSpeedCurrentCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback(), + readLaundryWasherControlsSpinSpeedCurrentCommandParams ); - result.put("readSpinSpeedCurrentAttribute", readWasherControlsSpinSpeedCurrentAttributeInteractionInfo); - Map readWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + result.put("readSpinSpeedCurrentAttribute", readLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map readLaundryWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readNumberOfRinsesAttribute( - (ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readNumberOfRinsesAttribute( + (ChipClusters.IntegerAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback(), - readWasherControlsNumberOfRinsesCommandParams + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readLaundryWasherControlsNumberOfRinsesCommandParams ); - result.put("readNumberOfRinsesAttribute", readWasherControlsNumberOfRinsesAttributeInteractionInfo); - Map readWasherControlsMaxRinsesCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsMaxRinsesAttributeInteractionInfo = new InteractionInfo( + result.put("readNumberOfRinsesAttribute", readLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo); + Map readLaundryWasherControlsSupportedRinsesCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsSupportedRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readMaxRinsesAttribute( - (ChipClusters.IntegerAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readSupportedRinsesAttribute( + (ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readWasherControlsMaxRinsesCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback(), + readLaundryWasherControlsSupportedRinsesCommandParams ); - result.put("readMaxRinsesAttribute", readWasherControlsMaxRinsesAttributeInteractionInfo); - Map readWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readSupportedRinsesAttribute", readLaundryWasherControlsSupportedRinsesAttributeInteractionInfo); + Map readLaundryWasherControlsGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback(), - readWasherControlsGeneratedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback(), + readLaundryWasherControlsGeneratedCommandListCommandParams ); - result.put("readGeneratedCommandListAttribute", readWasherControlsGeneratedCommandListAttributeInteractionInfo); - Map readWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + result.put("readGeneratedCommandListAttribute", readLaundryWasherControlsGeneratedCommandListAttributeInteractionInfo); + Map readLaundryWasherControlsAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback(), - readWasherControlsAcceptedCommandListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback(), + readLaundryWasherControlsAcceptedCommandListCommandParams ); - result.put("readAcceptedCommandListAttribute", readWasherControlsAcceptedCommandListAttributeInteractionInfo); - Map readWasherControlsEventListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsEventListAttributeInteractionInfo = new InteractionInfo( + result.put("readAcceptedCommandListAttribute", readLaundryWasherControlsAcceptedCommandListAttributeInteractionInfo); + Map readLaundryWasherControlsEventListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsEventListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readEventListAttribute( - (ChipClusters.WasherControlsCluster.EventListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readEventListAttribute( + (ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterEventListAttributeCallback(), - readWasherControlsEventListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterEventListAttributeCallback(), + readLaundryWasherControlsEventListCommandParams ); - result.put("readEventListAttribute", readWasherControlsEventListAttributeInteractionInfo); - Map readWasherControlsAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo( + result.put("readEventListAttribute", readLaundryWasherControlsEventListAttributeInteractionInfo); + Map readLaundryWasherControlsAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsAttributeListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readAttributeListAttribute( - (ChipClusters.WasherControlsCluster.AttributeListAttributeCallback) callback + ((ChipClusters.LaundryWasherControlsCluster) cluster).readAttributeListAttribute( + (ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedWasherControlsClusterAttributeListAttributeCallback(), - readWasherControlsAttributeListCommandParams + () -> new ClusterInfoMapping.DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback(), + readLaundryWasherControlsAttributeListCommandParams ); - result.put("readAttributeListAttribute", readWasherControlsAttributeListAttributeInteractionInfo); - Map readWasherControlsFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( + result.put("readAttributeListAttribute", readLaundryWasherControlsAttributeListAttributeInteractionInfo); + Map readLaundryWasherControlsFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsFeatureMapAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readFeatureMapAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).readFeatureMapAttribute( (ChipClusters.LongAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readWasherControlsFeatureMapCommandParams + readLaundryWasherControlsFeatureMapCommandParams ); - result.put("readFeatureMapAttribute", readWasherControlsFeatureMapAttributeInteractionInfo); - Map readWasherControlsClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( + result.put("readFeatureMapAttribute", readLaundryWasherControlsFeatureMapAttributeInteractionInfo); + Map readLaundryWasherControlsClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readLaundryWasherControlsClusterRevisionAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).readClusterRevisionAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).readClusterRevisionAttribute( (ChipClusters.IntegerAttributeCallback) callback ); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readWasherControlsClusterRevisionCommandParams + readLaundryWasherControlsClusterRevisionCommandParams ); - result.put("readClusterRevisionAttribute", readWasherControlsClusterRevisionAttributeInteractionInfo); + result.put("readClusterRevisionAttribute", readLaundryWasherControlsClusterRevisionAttributeInteractionInfo); return result; } @@ -7273,6 +7273,120 @@ private static Map readSmokeCoAlarmInteractionInfo() { return result; } + private static Map readDishwasherAlarmInteractionInfo() { + Map result = new LinkedHashMap<>();Map readDishwasherAlarmMaskCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmMaskAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readMaskAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherAlarmMaskCommandParams + ); + result.put("readMaskAttribute", readDishwasherAlarmMaskAttributeInteractionInfo); + Map readDishwasherAlarmLatchCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmLatchAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readLatchAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherAlarmLatchCommandParams + ); + result.put("readLatchAttribute", readDishwasherAlarmLatchAttributeInteractionInfo); + Map readDishwasherAlarmStateCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmStateAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readStateAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherAlarmStateCommandParams + ); + result.put("readStateAttribute", readDishwasherAlarmStateAttributeInteractionInfo); + Map readDishwasherAlarmSupportedCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmSupportedAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readSupportedAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherAlarmSupportedCommandParams + ); + result.put("readSupportedAttribute", readDishwasherAlarmSupportedAttributeInteractionInfo); + Map readDishwasherAlarmGeneratedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readGeneratedCommandListAttribute( + (ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback(), + readDishwasherAlarmGeneratedCommandListCommandParams + ); + result.put("readGeneratedCommandListAttribute", readDishwasherAlarmGeneratedCommandListAttributeInteractionInfo); + Map readDishwasherAlarmAcceptedCommandListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readAcceptedCommandListAttribute( + (ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback(), + readDishwasherAlarmAcceptedCommandListCommandParams + ); + result.put("readAcceptedCommandListAttribute", readDishwasherAlarmAcceptedCommandListAttributeInteractionInfo); + Map readDishwasherAlarmEventListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmEventListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readEventListAttribute( + (ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherAlarmClusterEventListAttributeCallback(), + readDishwasherAlarmEventListCommandParams + ); + result.put("readEventListAttribute", readDishwasherAlarmEventListAttributeInteractionInfo); + Map readDishwasherAlarmAttributeListCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmAttributeListAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readAttributeListAttribute( + (ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedDishwasherAlarmClusterAttributeListAttributeCallback(), + readDishwasherAlarmAttributeListCommandParams + ); + result.put("readAttributeListAttribute", readDishwasherAlarmAttributeListAttributeInteractionInfo); + Map readDishwasherAlarmFeatureMapCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmFeatureMapAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readFeatureMapAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readDishwasherAlarmFeatureMapCommandParams + ); + result.put("readFeatureMapAttribute", readDishwasherAlarmFeatureMapAttributeInteractionInfo); + Map readDishwasherAlarmClusterRevisionCommandParams = new LinkedHashMap(); + InteractionInfo readDishwasherAlarmClusterRevisionAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster).readClusterRevisionAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readDishwasherAlarmClusterRevisionCommandParams + ); + result.put("readClusterRevisionAttribute", readDishwasherAlarmClusterRevisionAttributeInteractionInfo); + + return result; + } private static Map readOperationalStateInteractionInfo() { Map result = new LinkedHashMap<>();Map readOperationalStatePhaseListCommandParams = new LinkedHashMap(); InteractionInfo readOperationalStatePhaseListAttributeInteractionInfo = new InteractionInfo( @@ -23294,7 +23408,7 @@ public Map> getReadAttributeMap() { put("modeSelect", readModeSelectInteractionInfo()); put("laundryWasherMode", readLaundryWasherModeInteractionInfo()); put("refrigeratorAndTemperatureControlledCabinetMode", readRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo()); - put("washerControls", readWasherControlsInteractionInfo()); + put("laundryWasherControls", readLaundryWasherControlsInteractionInfo()); put("rvcRunMode", readRvcRunModeInteractionInfo()); put("rvcCleanMode", readRvcCleanModeInteractionInfo()); put("temperatureControl", readTemperatureControlInteractionInfo()); @@ -23302,6 +23416,7 @@ public Map> getReadAttributeMap() { put("dishwasherMode", readDishwasherModeInteractionInfo()); put("airQuality", readAirQualityInteractionInfo()); put("smokeCoAlarm", readSmokeCoAlarmInteractionInfo()); + put("dishwasherAlarm", readDishwasherAlarmInteractionInfo()); put("operationalState", readOperationalStateInteractionInfo()); put("rvcOperationalState", readRvcOperationalStateInteractionInfo()); put("hepaFilterMonitoring", readHepaFilterMonitoringInteractionInfo()); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index a3e32eb5a39671..0848e009deb4b5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -862,52 +862,52 @@ public Map> getWriteAttributeMap() { ); writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo.put("writeOnModeAttribute", writeRefrigeratorAndTemperatureControlledCabinetModeOnModeAttributeInteractionInfo); writeAttributeMap.put("refrigeratorAndTemperatureControlledCabinetMode", writeRefrigeratorAndTemperatureControlledCabinetModeInteractionInfo); - Map writeWasherControlsInteractionInfo = new LinkedHashMap<>(); - Map writeWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); - CommandParameterInfo washerControlsspinSpeedCurrentCommandParameterInfo = + Map writeLaundryWasherControlsInteractionInfo = new LinkedHashMap<>(); + Map writeLaundryWasherControlsSpinSpeedCurrentCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherControlsspinSpeedCurrentCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeWasherControlsSpinSpeedCurrentCommandParams.put( + writeLaundryWasherControlsSpinSpeedCurrentCommandParams.put( "value", - washerControlsspinSpeedCurrentCommandParameterInfo + laundryWasherControlsspinSpeedCurrentCommandParameterInfo ); - InteractionInfo writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).writeSpinSpeedCurrentAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWasherControlsSpinSpeedCurrentCommandParams + writeLaundryWasherControlsSpinSpeedCurrentCommandParams ); - writeWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeWasherControlsSpinSpeedCurrentAttributeInteractionInfo); - Map writeWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); - CommandParameterInfo washerControlsnumberOfRinsesCommandParameterInfo = + writeLaundryWasherControlsInteractionInfo.put("writeSpinSpeedCurrentAttribute", writeLaundryWasherControlsSpinSpeedCurrentAttributeInteractionInfo); + Map writeLaundryWasherControlsNumberOfRinsesCommandParams = new LinkedHashMap(); + CommandParameterInfo laundryWasherControlsnumberOfRinsesCommandParameterInfo = new CommandParameterInfo( "value", Integer.class, Integer.class ); - writeWasherControlsNumberOfRinsesCommandParams.put( + writeLaundryWasherControlsNumberOfRinsesCommandParams.put( "value", - washerControlsnumberOfRinsesCommandParameterInfo + laundryWasherControlsnumberOfRinsesCommandParameterInfo ); - InteractionInfo writeWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( + InteractionInfo writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.WasherControlsCluster) cluster).writeNumberOfRinsesAttribute( + ((ChipClusters.LaundryWasherControlsCluster) cluster).writeNumberOfRinsesAttribute( (DefaultClusterCallback) callback, (Integer) commandArguments.get("value") ); }, () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeWasherControlsNumberOfRinsesCommandParams + writeLaundryWasherControlsNumberOfRinsesCommandParams ); - writeWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeWasherControlsNumberOfRinsesAttributeInteractionInfo); - writeAttributeMap.put("washerControls", writeWasherControlsInteractionInfo); + writeLaundryWasherControlsInteractionInfo.put("writeNumberOfRinsesAttribute", writeLaundryWasherControlsNumberOfRinsesAttributeInteractionInfo); + writeAttributeMap.put("laundryWasherControls", writeLaundryWasherControlsInteractionInfo); Map writeRvcRunModeInteractionInfo = new LinkedHashMap<>(); Map writeRvcRunModeStartUpModeCommandParams = new LinkedHashMap(); CommandParameterInfo rvcRunModestartUpModeCommandParameterInfo = @@ -1076,6 +1076,8 @@ public Map> getWriteAttributeMap() { ); writeSmokeCoAlarmInteractionInfo.put("writeSensitivityLevelAttribute", writeSmokeCoAlarmSensitivityLevelAttributeInteractionInfo); writeAttributeMap.put("smokeCoAlarm", writeSmokeCoAlarmInteractionInfo); + Map writeDishwasherAlarmInteractionInfo = new LinkedHashMap<>(); + writeAttributeMap.put("dishwasherAlarm", writeDishwasherAlarmInteractionInfo); Map writeOperationalStateInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("operationalState", writeOperationalStateInteractionInfo); Map writeRvcOperationalStateInteractionInfo = new LinkedHashMap<>(); diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index f2779bf1a8b339..8fdbbde37221e9 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -12805,8 +12805,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::WasherControls::Id: { - using namespace app::Clusters::WasherControls; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mAttributeId) { case Attributes::SpinSpeeds::Id: { @@ -12861,21 +12861,14 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); - } + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + static_cast(cppValue), value); return value; } - case Attributes::MaxRinses::Id: { - using TypeInfo = Attributes::MaxRinses::TypeInfo; + case Attributes::SupportedRinses::Id: { + using TypeInfo = Attributes::SupportedRinses::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -12883,10 +12876,19 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } case Attributes::GeneratedCommandList::Id: { @@ -14792,6 +14794,202 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } + case app::Clusters::DishwasherAlarm::Id: { + using namespace app::Clusters::DishwasherAlarm; + switch (aPath.mAttributeId) + { + case Attributes::Mask::Id: { + using TypeInfo = Attributes::Mask::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::Latch::Id: { + using TypeInfo = Attributes::Latch::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::State::Id: { + using TypeInfo = Attributes::State::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::Supported::Id: { + using TypeInfo = Attributes::Supported::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue.Raw(), value); + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) + { + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + cppValue, value); + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } case app::Clusters::OperationalState::Id: { using namespace app::Clusters::OperationalState; switch (aPath.mAttributeId) diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 9e3c8a92513186..07f71ec192639c 100644 --- a/src/controller/java/zap-generated/CHIPClientCallbacks.h +++ b/src/controller/java/zap-generated/CHIPClientCallbacks.h @@ -499,15 +499,18 @@ typedef void (*RefrigeratorAndTemperatureControlledCabinetModeEventListListAttri void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RefrigeratorAndTemperatureControlledCabinetModeAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsSpinSpeedsListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsGeneratedCommandListListAttributeCallback)( +typedef void (*LaundryWasherControlsSpinSpeedsListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsSupportedRinsesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAcceptedCommandListListAttributeCallback)( +typedef void (*LaundryWasherControlsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAttributeListListAttributeCallback)( +typedef void (*LaundryWasherControlsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LaundryWasherControlsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RvcRunModeSupportedModesListAttributeCallback)( void * context, @@ -577,6 +580,14 @@ typedef void (*SmokeCoAlarmEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SmokeCoAlarmAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherAlarmGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherAlarmAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherAlarmEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*DishwasherAlarmAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalStatePhaseListListAttributeCallback)( void * context, const chip::app::DataModel::Nullable> & data); typedef void (*OperationalStateOperationalStateListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 4fe9a9ebc89a9e..e92be17671753d 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -2584,12 +2584,12 @@ JNI_METHOD(void, RefrigeratorAndTemperatureControlledCabinetModeCluster, writeOn onFailure.release(); } -JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) +JNI_METHOD(void, LaundryWasherControlsCluster, writeSpinSpeedCurrentAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; @@ -2618,8 +2618,8 @@ JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); @@ -2644,27 +2644,19 @@ JNI_METHOD(void, WasherControlsCluster, writeSpinSpeedCurrentAttribute) onFailure.release(); } -JNI_METHOD(void, WasherControlsCluster, writeNumberOfRinsesAttribute) +JNI_METHOD(void, LaundryWasherControlsCluster, writeNumberOfRinsesAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { chip::DeviceLayer::StackLock lock; ListFreer listFreer; - using TypeInfo = chip::app::Clusters::WasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; TypeInfo::Type cppValue; std::vector> cleanupByteArrays; std::vector> cleanupStrings; - if (value == nullptr) - { - cppValue.SetNull(); - } - else - { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>( - chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - } + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -2678,8 +2670,8 @@ JNI_METHOD(void, WasherControlsCluster, writeNumberOfRinsesAttribute) chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - CHIP_ERROR err = CHIP_NO_ERROR; - WasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); + CHIP_ERROR err = CHIP_NO_ERROR; + LaundryWasherControlsCluster * cppCluster = reinterpret_cast(clusterPtr); VerifyOrReturn(cppCluster != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index ea8d604224fa77..96c6f70a45ff5b 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -2445,8 +2445,8 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::WasherControls::Id: { - using namespace app::Clusters::WasherControls; + case app::Clusters::LaundryWasherControls::Id: { + using namespace app::Clusters::LaundryWasherControls; switch (aPath.mEventId) { default: @@ -2866,6 +2866,68 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } + case app::Clusters::DishwasherAlarm::Id: { + using namespace app::Clusters::DishwasherAlarm; + switch (aPath.mEventId) + { + case Events::Notify::Id: { + Events::Notify::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_active; + std::string value_activeClassName = "java/lang/Long"; + std::string value_activeCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_activeClassName.c_str(), value_activeCtorSignature.c_str(), cppValue.active.Raw(), value_active); + + jobject value_inactive; + std::string value_inactiveClassName = "java/lang/Long"; + std::string value_inactiveCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_inactiveClassName.c_str(), value_inactiveCtorSignature.c_str(), cppValue.inactive.Raw(), value_inactive); + + jobject value_state; + std::string value_stateClassName = "java/lang/Long"; + std::string value_stateCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_stateClassName.c_str(), value_stateCtorSignature.c_str(), cppValue.state.Raw(), value_state); + + jobject value_mask; + std::string value_maskClassName = "java/lang/Long"; + std::string value_maskCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + value_maskClassName.c_str(), value_maskCtorSignature.c_str(), cppValue.mask.Raw(), value_mask); + + jclass notifyStructClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipEventStructs$DishwasherAlarmClusterNotifyEvent", notifyStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$DishwasherAlarmClusterNotifyEvent"); + return nullptr; + } + jmethodID notifyStructCtor = env->GetMethodID(notifyStructClass, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;)V"); + if (notifyStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$DishwasherAlarmClusterNotifyEvent constructor"); + return nullptr; + } + + jobject value = + env->NewObject(notifyStructClass, notifyStructCtor, value_active, value_inactive, value_state, value_mask); + + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case app::Clusters::OperationalState::Id: { using namespace app::Clusters::OperationalState; switch (aPath.mEventId) diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index 215fd94d28c22f..d113e22b7436cc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -21392,8 +21392,10 @@ void CHIPRefrigeratorAndTemperatureControlledCabinetModeAttributeListAttributeCa env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsSpinSpeedsAttributeCallback::CHIPWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CHIPLaundryWasherControlsSpinSpeedsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21409,7 +21411,7 @@ CHIPWasherControlsSpinSpeedsAttributeCallback::CHIPWasherControlsSpinSpeedsAttri } } -CHIPWasherControlsSpinSpeedsAttributeCallback::~CHIPWasherControlsSpinSpeedsAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedsAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21420,8 +21422,8 @@ CHIPWasherControlsSpinSpeedsAttributeCallback::~CHIPWasherControlsSpinSpeedsAttr env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsSpinSpeedsAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21430,8 +21432,8 @@ void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21458,9 +21460,9 @@ void CHIPWasherControlsSpinSpeedsAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CHIPWasherControlsSpinSpeedCurrentAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21477,7 +21479,7 @@ CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CHIPWasherControlsSpinSpeed } } -CHIPWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPWasherControlsSpinSpeedCurrentAttributeCallback() +CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21488,8 +21490,8 @@ CHIPWasherControlsSpinSpeedCurrentAttributeCallback::~CHIPWasherControlsSpinSpee env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21497,8 +21499,8 @@ void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * cont jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21525,9 +21527,9 @@ void CHIPWasherControlsSpinSpeedCurrentAttributeCallback::CallbackFn(void * cont env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPWasherControlsNumberOfRinsesAttributeCallback::CHIPWasherControlsNumberOfRinsesAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CHIPLaundryWasherControlsSupportedRinsesAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21544,7 +21546,7 @@ CHIPWasherControlsNumberOfRinsesAttributeCallback::CHIPWasherControlsNumberOfRin } } -CHIPWasherControlsNumberOfRinsesAttributeCallback::~CHIPWasherControlsNumberOfRinsesAttributeCallback() +CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::~CHIPLaundryWasherControlsSupportedRinsesAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21555,8 +21557,9 @@ CHIPWasherControlsNumberOfRinsesAttributeCallback::~CHIPWasherControlsNumberOfRi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPLaundryWasherControlsSupportedRinsesAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21564,8 +21567,9 @@ void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * contex jobject javaCallbackRef; VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21573,28 +21577,31 @@ void CHIPWasherControlsNumberOfRinsesAttributeCallback::CallbackFn(void * contex ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); jmethodID javaMethod; - err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); - jobject javaValue; - if (value.IsNull()) - { - javaValue = nullptr; - } - else + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) { - std::string javaValueClassName = "java/lang/Integer"; - std::string javaValueCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Integer"; + std::string newElement_0CtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), static_cast(entry_0), newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsGeneratedCommandListAttributeCallback::CHIPWasherControlsGeneratedCommandListAttributeCallback( +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21611,7 +21618,7 @@ CHIPWasherControlsGeneratedCommandListAttributeCallback::CHIPWasherControlsGener } } -CHIPWasherControlsGeneratedCommandListAttributeCallback::~CHIPWasherControlsGeneratedCommandListAttributeCallback() +CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::~CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21622,7 +21629,7 @@ CHIPWasherControlsGeneratedCommandListAttributeCallback::~CHIPWasherControlsGene env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21632,8 +21639,8 @@ void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21663,9 +21670,9 @@ void CHIPWasherControlsGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsAcceptedCommandListAttributeCallback::CHIPWasherControlsAcceptedCommandListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21682,7 +21689,7 @@ CHIPWasherControlsAcceptedCommandListAttributeCallback::CHIPWasherControlsAccept } } -CHIPWasherControlsAcceptedCommandListAttributeCallback::~CHIPWasherControlsAcceptedCommandListAttributeCallback() +CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::~CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21693,7 +21700,7 @@ CHIPWasherControlsAcceptedCommandListAttributeCallback::~CHIPWasherControlsAccep env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21703,8 +21710,8 @@ void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21734,8 +21741,10 @@ void CHIPWasherControlsAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsEventListAttributeCallback::CHIPWasherControlsEventListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +CHIPLaundryWasherControlsEventListAttributeCallback::CHIPLaundryWasherControlsEventListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21751,7 +21760,7 @@ CHIPWasherControlsEventListAttributeCallback::CHIPWasherControlsEventListAttribu } } -CHIPWasherControlsEventListAttributeCallback::~CHIPWasherControlsEventListAttributeCallback() +CHIPLaundryWasherControlsEventListAttributeCallback::~CHIPLaundryWasherControlsEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21762,8 +21771,8 @@ CHIPWasherControlsEventListAttributeCallback::~CHIPWasherControlsEventListAttrib env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPLaundryWasherControlsEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -21772,8 +21781,8 @@ void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -21803,9 +21812,9 @@ void CHIPWasherControlsEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPWasherControlsAttributeListAttributeCallback::CHIPWasherControlsAttributeListAttributeCallback(jobject javaCallback, - bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPLaundryWasherControlsAttributeListAttributeCallback::CHIPLaundryWasherControlsAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -21822,7 +21831,7 @@ CHIPWasherControlsAttributeListAttributeCallback::CHIPWasherControlsAttributeLis } } -CHIPWasherControlsAttributeListAttributeCallback::~CHIPWasherControlsAttributeListAttributeCallback() +CHIPLaundryWasherControlsAttributeListAttributeCallback::~CHIPLaundryWasherControlsAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -21833,7 +21842,7 @@ CHIPWasherControlsAttributeListAttributeCallback::~CHIPWasherControlsAttributeLi env->DeleteGlobalRef(javaCallbackRef); } -void CHIPWasherControlsAttributeListAttributeCallback::CallbackFn( +void CHIPLaundryWasherControlsAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -21843,8 +21852,8 @@ void CHIPWasherControlsAttributeListAttributeCallback::CallbackFn( VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback.get()->javaCallbackRef; @@ -24731,6 +24740,288 @@ void CHIPSmokeCoAlarmAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CHIPDishwasherAlarmGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::~CHIPDishwasherAlarmGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherAlarmGeneratedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CHIPDishwasherAlarmAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::~CHIPDishwasherAlarmAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherAlarmAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherAlarmEventListAttributeCallback::CHIPDishwasherAlarmEventListAttributeCallback(jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherAlarmEventListAttributeCallback::~CHIPDishwasherAlarmEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherAlarmEventListAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPDishwasherAlarmAttributeListAttributeCallback::CHIPDishwasherAlarmAttributeListAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPDishwasherAlarmAttributeListAttributeCallback::~CHIPDishwasherAlarmAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPDishwasherAlarmAttributeListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject arrayListObj; + chip::JniReferences::GetInstance().CreateArrayList(arrayListObj); + + auto iter_arrayListObj_0 = list.begin(); + while (iter_arrayListObj_0.Next()) + { + auto & entry_0 = iter_arrayListObj_0.GetValue(); + jobject newElement_0; + std::string newElement_0ClassName = "java/lang/Long"; + std::string newElement_0CtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0ClassName.c_str(), + newElement_0CtorSignature.c_str(), entry_0, newElement_0); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPOperationalStatePhaseListAttributeCallback::CHIPOperationalStatePhaseListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index f999a2d15b3889..6b848ae9a7f385 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -14262,10 +14262,10 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } - public static class WasherControlsCluster extends BaseChipCluster { + public static class LaundryWasherControlsCluster extends BaseChipCluster { public static final long CLUSTER_ID = 83L; - public WasherControlsCluster(long devicePtr, int endpointId) { + public LaundryWasherControlsCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId); } @@ -14282,8 +14282,8 @@ public interface SpinSpeedCurrentAttributeCallback { void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } - public interface NumberOfRinsesAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface SupportedRinsesAttributeCallback { + void onSuccess( List valueList); void onError(Exception ex); default void onSubscriptionEstablished(long subscriptionId) {} } @@ -14340,7 +14340,7 @@ public void subscribeSpinSpeedCurrentAttribute( } public void readNumberOfRinsesAttribute( - NumberOfRinsesAttributeCallback callback + IntegerAttributeCallback callback ) { readNumberOfRinsesAttribute(chipClusterPtr, callback); } @@ -14352,22 +14352,22 @@ public void writeNumberOfRinsesAttribute(DefaultClusterCallback callback, Intege writeNumberOfRinsesAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeNumberOfRinsesAttribute( - NumberOfRinsesAttributeCallback callback - , + IntegerAttributeCallback callback +, int minInterval, int maxInterval) { subscribeNumberOfRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readMaxRinsesAttribute( - IntegerAttributeCallback callback + public void readSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback ) { - readMaxRinsesAttribute(chipClusterPtr, callback); + readSupportedRinsesAttribute(chipClusterPtr, callback); } - public void subscribeMaxRinsesAttribute( - IntegerAttributeCallback callback -, + public void subscribeSupportedRinsesAttribute( + SupportedRinsesAttributeCallback callback + , int minInterval, int maxInterval) { - subscribeMaxRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); + subscribeSupportedRinsesAttribute(chipClusterPtr, callback, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -14459,21 +14459,21 @@ private native void subscribeSpinSpeedCurrentAttribute(long chipClusterPtr, , int minInterval, int maxInterval); private native void readNumberOfRinsesAttribute(long chipClusterPtr, - NumberOfRinsesAttributeCallback callback + IntegerAttributeCallback callback ); private native void writeNumberOfRinsesAttribute(long chipClusterPtr, DefaultClusterCallback callback, Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeNumberOfRinsesAttribute(long chipClusterPtr, - NumberOfRinsesAttributeCallback callback - , int minInterval, int maxInterval); - - private native void readMaxRinsesAttribute(long chipClusterPtr, - IntegerAttributeCallback callback - ); - private native void subscribeMaxRinsesAttribute(long chipClusterPtr, IntegerAttributeCallback callback , int minInterval, int maxInterval); + private native void readSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + ); + private native void subscribeSupportedRinsesAttribute(long chipClusterPtr, + SupportedRinsesAttributeCallback callback + , int minInterval, int maxInterval); + private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback ); @@ -15077,6 +15077,20 @@ public TemperatureControlCluster(long devicePtr, int endpointId) { @Override public native long initWithDevice(long devicePtr, int endpointId); + public void setTemperature(DefaultClusterCallback callback + , Optional targetTemperature, Optional targetTemperatureLevel) { + setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, null); + } + + public void setTemperature(DefaultClusterCallback callback + , Optional targetTemperature, Optional targetTemperatureLevel + , int timedInvokeTimeoutMs) { + setTemperature(chipClusterPtr, callback, targetTemperature, targetTemperatureLevel, timedInvokeTimeoutMs); + } + private native void setTemperature(long chipClusterPtr, DefaultClusterCallback Callback + , Optional targetTemperature, Optional targetTemperatureLevel + , @Nullable Integer timedInvokeTimeoutMs); + public interface SupportedTemperatureLevelsAttributeCallback { void onSuccess( List valueList); void onError(Exception ex); @@ -16391,6 +16405,242 @@ private native void subscribeClusterRevisionAttribute(long chipClusterPtr, , int minInterval, int maxInterval); } + public static class DishwasherAlarmCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 93L; + + public DishwasherAlarmCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId); + } + + @Override + public native long initWithDevice(long devicePtr, int endpointId); + + public void reset(DefaultClusterCallback callback + , Long alarms) { + reset(chipClusterPtr, callback, alarms, null); + } + + public void reset(DefaultClusterCallback callback + , Long alarms + , int timedInvokeTimeoutMs) { + reset(chipClusterPtr, callback, alarms, timedInvokeTimeoutMs); + } + private native void reset(long chipClusterPtr, DefaultClusterCallback Callback + , Long alarms + , @Nullable Integer timedInvokeTimeoutMs); + + public interface GeneratedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AcceptedCommandListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface EventListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + public interface AttributeListAttributeCallback { + void onSuccess( List valueList); + void onError(Exception ex); + default void onSubscriptionEstablished(long subscriptionId) {} + } + + public void readMaskAttribute( + LongAttributeCallback callback + ) { + readMaskAttribute(chipClusterPtr, callback); + } + public void subscribeMaskAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeMaskAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readLatchAttribute( + LongAttributeCallback callback + ) { + readLatchAttribute(chipClusterPtr, callback); + } + public void subscribeLatchAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeLatchAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readStateAttribute( + LongAttributeCallback callback + ) { + readStateAttribute(chipClusterPtr, callback); + } + public void subscribeStateAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeStateAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readSupportedAttribute( + LongAttributeCallback callback + ) { + readSupportedAttribute(chipClusterPtr, callback); + } + public void subscribeSupportedAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeSupportedAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + ) { + readGeneratedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeGeneratedCommandListAttribute( + GeneratedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeGeneratedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + ) { + readAcceptedCommandListAttribute(chipClusterPtr, callback); + } + public void subscribeAcceptedCommandListAttribute( + AcceptedCommandListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAcceptedCommandListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readEventListAttribute( + EventListAttributeCallback callback + ) { + readEventListAttribute(chipClusterPtr, callback); + } + public void subscribeEventListAttribute( + EventListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeEventListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readAttributeListAttribute( + AttributeListAttributeCallback callback + ) { + readAttributeListAttribute(chipClusterPtr, callback); + } + public void subscribeAttributeListAttribute( + AttributeListAttributeCallback callback + , + int minInterval, int maxInterval) { + subscribeAttributeListAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readFeatureMapAttribute( + LongAttributeCallback callback + ) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void subscribeFeatureMapAttribute( + LongAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeFeatureMapAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + public void readClusterRevisionAttribute( + IntegerAttributeCallback callback + ) { + readClusterRevisionAttribute(chipClusterPtr, callback); + } + public void subscribeClusterRevisionAttribute( + IntegerAttributeCallback callback +, + int minInterval, int maxInterval) { + subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); + } + + private native void readMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeMaskAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readLatchAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeLatchAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readStateAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeStateAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeSupportedAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + ); + private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, + GeneratedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + ); + private native void subscribeAcceptedCommandListAttribute(long chipClusterPtr, + AcceptedCommandListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + ); + private native void subscribeEventListAttribute(long chipClusterPtr, + EventListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + ); + private native void subscribeAttributeListAttribute(long chipClusterPtr, + AttributeListAttributeCallback callback + , int minInterval, int maxInterval); + + private native void readFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback + ); + private native void subscribeFeatureMapAttribute(long chipClusterPtr, + LongAttributeCallback callback +, int minInterval, int maxInterval); + + private native void readClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback + ); + private native void subscribeClusterRevisionAttribute(long chipClusterPtr, + IntegerAttributeCallback callback +, int minInterval, int maxInterval); + } + public static class OperationalStateCluster extends BaseChipCluster { public static final long CLUSTER_ID = 96L; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java index 81ef1fa558d09f..c3dbcb84c12ca2 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipEventStructs.java @@ -1251,6 +1251,45 @@ public String toString() { } } +public static class DishwasherAlarmClusterNotifyEvent { +public Long active; +public Long inactive; +public Long state; +public Long mask; + + public DishwasherAlarmClusterNotifyEvent( + Long active + , Long inactive + , Long state + , Long mask + ) { + this.active = active; + this.inactive = inactive; + this.state = state; + this.mask = mask; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("DishwasherAlarmClusterNotifyEvent {\n"); + output.append("\tactive: "); + output.append(active); + output.append("\n"); + output.append("\tinactive: "); + output.append(inactive); + output.append("\n"); + output.append("\tstate: "); + output.append(state); + output.append("\n"); + output.append("\tmask: "); + output.append(mask); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} + public static class OperationalStateClusterOperationalErrorEvent { public ChipStructs.OperationalStateClusterErrorStateStruct errorState; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java index 1e0ad3a7b2f76d..4f5ccf131b6450 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipIdLookup.java @@ -157,7 +157,7 @@ public static String clusterIdToName(long clusterId) { return "RefrigeratorAndTemperatureControlledCabinetMode"; } if (clusterId == 83L) { - return "WasherControls"; + return "LaundryWasherControls"; } if (clusterId == 84L) { return "RvcRunMode"; @@ -180,6 +180,9 @@ public static String clusterIdToName(long clusterId) { if (clusterId == 92L) { return "SmokeCoAlarm"; } + if (clusterId == 93L) { + return "DishwasherAlarm"; + } if (clusterId == 96L) { return "OperationalState"; } @@ -2251,7 +2254,7 @@ public static String attributeIdToName(long clusterId, long attributeId) { return "NumberOfRinses"; } if (attributeId == 3L) { - return "MaxRinses"; + return "SupportedRinses"; } if (attributeId == 65528L) { return "GeneratedCommandList"; @@ -2525,6 +2528,39 @@ public static String attributeIdToName(long clusterId, long attributeId) { } return ""; } + if (clusterId == 93L) { + if (attributeId == 0L) { + return "Mask"; + } + if (attributeId == 1L) { + return "Latch"; + } + if (attributeId == 2L) { + return "State"; + } + if (attributeId == 3L) { + return "Supported"; + } + if (attributeId == 65528L) { + return "GeneratedCommandList"; + } + if (attributeId == 65529L) { + return "AcceptedCommandList"; + } + if (attributeId == 65530L) { + return "EventList"; + } + if (attributeId == 65531L) { + return "AttributeList"; + } + if (attributeId == 65532L) { + return "FeatureMap"; + } + if (attributeId == 65533L) { + return "ClusterRevision"; + } + return ""; + } if (clusterId == 96L) { if (attributeId == 0L) { return "PhaseList"; @@ -7390,6 +7426,12 @@ public static String eventIdToName(long clusterId, long eventId) { } return ""; } + if (clusterId == 93L) { + if (eventId == 0L) { + return "Notify"; + } + return ""; + } if (clusterId == 96L) { if (eventId == 0L) { return "OperationalError"; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 3db9f1bd3dba72..d34fdec327f3b9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -6224,7 +6224,7 @@ public void onError(Exception ex) { } } - public static class DelegatedWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedsAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6243,7 +6243,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.WasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSpinSpeedCurrentAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SpinSpeedCurrentAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6262,7 +6262,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterNumberOfRinsesAttributeCallback implements ChipClusters.WasherControlsCluster.NumberOfRinsesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterSupportedRinsesAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.SupportedRinsesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6270,10 +6270,10 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); - responseValues.put(commandResponseInfo, value); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @Override @@ -6281,7 +6281,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterGeneratedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6300,7 +6300,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.WasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAcceptedCommandListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6319,7 +6319,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterEventListAttributeCallback implements ChipClusters.WasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterEventListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -6338,7 +6338,7 @@ public void onError(Exception ex) { callback.onFailure(ex); } } - public static class DelegatedWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.WasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedLaundryWasherControlsClusterAttributeListAttributeCallback implements ChipClusters.LaundryWasherControlsCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -7143,6 +7143,83 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { this.callback = callback; } +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + +@Override + public void onSuccess( List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + @Override public void onSuccess( List valueList) { Map responseValues = new LinkedHashMap<>(); @@ -19976,9 +20053,9 @@ public Map initializeClusterMap() { ClusterInfo refrigeratorAndTemperatureControlledCabinetModeClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.RefrigeratorAndTemperatureControlledCabinetModeCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("refrigeratorAndTemperatureControlledCabinetMode", refrigeratorAndTemperatureControlledCabinetModeClusterInfo); - ClusterInfo washerControlsClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.WasherControlsCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("washerControls", washerControlsClusterInfo); + ClusterInfo laundryWasherControlsClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.LaundryWasherControlsCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("laundryWasherControls", laundryWasherControlsClusterInfo); ClusterInfo rvcRunModeClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.RvcRunModeCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("rvcRunMode", rvcRunModeClusterInfo); @@ -20000,6 +20077,9 @@ public Map initializeClusterMap() { ClusterInfo smokeCoAlarmClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.SmokeCoAlarmCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("smokeCoAlarm", smokeCoAlarmClusterInfo); + ClusterInfo dishwasherAlarmClusterInfo = new ClusterInfo( + (ptr, endpointId) -> new ChipClusters.DishwasherAlarmCluster(ptr, endpointId), new HashMap<>()); + clusterMap.put("dishwasherAlarm", dishwasherAlarmClusterInfo); ClusterInfo operationalStateClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.OperationalStateCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("operationalState", operationalStateClusterInfo); @@ -20288,7 +20368,7 @@ public void combineCommand(Map destination, Map destination, Map> getCommandMap() { ); refrigeratorAndTemperatureControlledCabinetModeClusterInteractionInfoMap.put("changeToMode", refrigeratorAndTemperatureControlledCabinetModechangeToModeInteractionInfo); commandMap.put("refrigeratorAndTemperatureControlledCabinetMode", refrigeratorAndTemperatureControlledCabinetModeClusterInteractionInfoMap); - Map washerControlsClusterInteractionInfoMap = new LinkedHashMap<>(); - commandMap.put("washerControls", washerControlsClusterInteractionInfoMap); + Map laundryWasherControlsClusterInteractionInfoMap = new LinkedHashMap<>(); + commandMap.put("laundryWasherControls", laundryWasherControlsClusterInteractionInfoMap); Map rvcRunModeClusterInteractionInfoMap = new LinkedHashMap<>(); Map rvcRunModechangeToModeCommandParams = new LinkedHashMap(); CommandParameterInfo rvcRunModechangeToModenewModeCommandParameterInfo = new CommandParameterInfo("newMode", Integer.class, Integer.class); @@ -22377,6 +22458,28 @@ public Map> getCommandMap() { rvcCleanModeClusterInteractionInfoMap.put("changeToMode", rvcCleanModechangeToModeInteractionInfo); commandMap.put("rvcCleanMode", rvcCleanModeClusterInteractionInfoMap); Map temperatureControlClusterInteractionInfoMap = new LinkedHashMap<>(); + Map temperatureControlsetTemperatureCommandParams = new LinkedHashMap(); + CommandParameterInfo temperatureControlsetTemperaturetargetTemperatureCommandParameterInfo = new CommandParameterInfo("targetTemperature", Optional.class, Integer.class); + temperatureControlsetTemperatureCommandParams.put("targetTemperature",temperatureControlsetTemperaturetargetTemperatureCommandParameterInfo); + + CommandParameterInfo temperatureControlsetTemperaturetargetTemperatureLevelCommandParameterInfo = new CommandParameterInfo("targetTemperatureLevel", Optional.class, Integer.class); + temperatureControlsetTemperatureCommandParams.put("targetTemperatureLevel",temperatureControlsetTemperaturetargetTemperatureLevelCommandParameterInfo); + + InteractionInfo temperatureControlsetTemperatureInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.TemperatureControlCluster) cluster) + .setTemperature((DefaultClusterCallback) callback + , (Optional) + commandArguments.get("targetTemperature") + , (Optional) + commandArguments.get("targetTemperatureLevel") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + temperatureControlsetTemperatureCommandParams + ); + temperatureControlClusterInteractionInfoMap.put("setTemperature", temperatureControlsetTemperatureInteractionInfo); commandMap.put("temperatureControl", temperatureControlClusterInteractionInfoMap); Map refrigeratorAlarmClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("refrigeratorAlarm", refrigeratorAlarmClusterInteractionInfoMap); @@ -22415,6 +22518,25 @@ public Map> getCommandMap() { ); smokeCoAlarmClusterInteractionInfoMap.put("selfTestRequest", smokeCoAlarmselfTestRequestInteractionInfo); commandMap.put("smokeCoAlarm", smokeCoAlarmClusterInteractionInfoMap); + Map dishwasherAlarmClusterInteractionInfoMap = new LinkedHashMap<>(); + Map dishwasherAlarmresetCommandParams = new LinkedHashMap(); + CommandParameterInfo dishwasherAlarmresetalarmsCommandParameterInfo = new CommandParameterInfo("alarms", Long.class, Long.class); + dishwasherAlarmresetCommandParams.put("alarms",dishwasherAlarmresetalarmsCommandParameterInfo); + + InteractionInfo dishwasherAlarmresetInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.DishwasherAlarmCluster) cluster) + .reset((DefaultClusterCallback) callback + , (Long) + commandArguments.get("alarms") + + ); + }, + () -> new DelegatedDefaultClusterCallback(), + dishwasherAlarmresetCommandParams + ); + dishwasherAlarmClusterInteractionInfoMap.put("reset", dishwasherAlarmresetInteractionInfo); + commandMap.put("dishwasherAlarm", dishwasherAlarmClusterInteractionInfoMap); Map operationalStateClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("operationalState", operationalStateClusterInteractionInfoMap); Map rvcOperationalStateClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index e05ea26f35bd49..052caee654993c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4511,8 +4511,8 @@ class ChipClusters: }, }, } - _WASHER_CONTROLS_CLUSTER_INFO = { - "clusterName": "WasherControls", + _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO = { + "clusterName": "LaundryWasherControls", "clusterId": 0x00000053, "commands": { }, @@ -4538,7 +4538,7 @@ class ChipClusters: "writable": True, }, 0x00000003: { - "attributeName": "MaxRinses", + "attributeName": "SupportedRinses", "attributeId": 0x00000003, "type": "int", "reportable": True, @@ -5141,6 +5141,88 @@ class ChipClusters: }, }, } + _DISHWASHER_ALARM_CLUSTER_INFO = { + "clusterName": "DishwasherAlarm", + "clusterId": 0x0000005D, + "commands": { + 0x00000000: { + "commandId": 0x00000000, + "commandName": "Reset", + "args": { + "alarms": "int", + }, + }, + 0x00000001: { + "commandId": 0x00000001, + "commandName": "ModifyEnabledAlarms", + "args": { + "mask": "int", + }, + }, + }, + "attributes": { + 0x00000000: { + "attributeName": "Mask", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "Latch", + "attributeId": 0x00000001, + "type": "int", + "reportable": True, + }, + 0x00000002: { + "attributeName": "State", + "attributeId": 0x00000002, + "type": "int", + "reportable": True, + }, + 0x00000003: { + "attributeName": "Supported", + "attributeId": 0x00000003, + "type": "int", + "reportable": True, + }, + 0x0000FFF8: { + "attributeName": "GeneratedCommandList", + "attributeId": 0x0000FFF8, + "type": "int", + "reportable": True, + }, + 0x0000FFF9: { + "attributeName": "AcceptedCommandList", + "attributeId": 0x0000FFF9, + "type": "int", + "reportable": True, + }, + 0x0000FFFA: { + "attributeName": "EventList", + "attributeId": 0x0000FFFA, + "type": "int", + "reportable": True, + }, + 0x0000FFFB: { + "attributeName": "AttributeList", + "attributeId": 0x0000FFFB, + "type": "int", + "reportable": True, + }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + "reportable": True, + }, + 0x0000FFFD: { + "attributeName": "ClusterRevision", + "attributeId": 0x0000FFFD, + "type": "int", + "reportable": True, + }, + }, + } _OPERATIONAL_STATE_CLUSTER_INFO = { "clusterName": "OperationalState", "clusterId": 0x00000060, @@ -15626,7 +15708,7 @@ class ChipClusters: 0x00000050: _MODE_SELECT_CLUSTER_INFO, 0x00000051: _LAUNDRY_WASHER_MODE_CLUSTER_INFO, 0x00000052: _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, - 0x00000053: _WASHER_CONTROLS_CLUSTER_INFO, + 0x00000053: _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO, 0x00000054: _RVC_RUN_MODE_CLUSTER_INFO, 0x00000055: _RVC_CLEAN_MODE_CLUSTER_INFO, 0x00000056: _TEMPERATURE_CONTROL_CLUSTER_INFO, @@ -15634,6 +15716,7 @@ class ChipClusters: 0x00000059: _DISHWASHER_MODE_CLUSTER_INFO, 0x0000005B: _AIR_QUALITY_CLUSTER_INFO, 0x0000005C: _SMOKE_CO_ALARM_CLUSTER_INFO, + 0x0000005D: _DISHWASHER_ALARM_CLUSTER_INFO, 0x00000060: _OPERATIONAL_STATE_CLUSTER_INFO, 0x00000061: _RVC_OPERATIONAL_STATE_CLUSTER_INFO, 0x00000071: _HEPA_FILTER_MONITORING_CLUSTER_INFO, @@ -15761,7 +15844,7 @@ class ChipClusters: "ModeSelect": _MODE_SELECT_CLUSTER_INFO, "LaundryWasherMode": _LAUNDRY_WASHER_MODE_CLUSTER_INFO, "RefrigeratorAndTemperatureControlledCabinetMode": _REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER_INFO, - "WasherControls": _WASHER_CONTROLS_CLUSTER_INFO, + "LaundryWasherControls": _LAUNDRY_WASHER_CONTROLS_CLUSTER_INFO, "RvcRunMode": _RVC_RUN_MODE_CLUSTER_INFO, "RvcCleanMode": _RVC_CLEAN_MODE_CLUSTER_INFO, "TemperatureControl": _TEMPERATURE_CONTROL_CLUSTER_INFO, @@ -15769,6 +15852,7 @@ class ChipClusters: "DishwasherMode": _DISHWASHER_MODE_CLUSTER_INFO, "AirQuality": _AIR_QUALITY_CLUSTER_INFO, "SmokeCoAlarm": _SMOKE_CO_ALARM_CLUSTER_INFO, + "DishwasherAlarm": _DISHWASHER_ALARM_CLUSTER_INFO, "OperationalState": _OPERATIONAL_STATE_CLUSTER_INFO, "RvcOperationalState": _RVC_OPERATIONAL_STATE_CLUSTER_INFO, "HepaFilterMonitoring": _HEPA_FILTER_MONITORING_CLUSTER_INFO, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 51d61c3802f5f8..e9ee0c02b107a2 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -15684,7 +15684,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: @dataclass -class WasherControls(Cluster): +class LaundryWasherControls(Cluster): id: typing.ClassVar[int] = 0x0053 @ChipUtility.classproperty @@ -15693,8 +15693,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="spinSpeeds", Tag=0x00000000, Type=typing.Optional[typing.List[str]]), ClusterObjectFieldDescriptor(Label="spinSpeedCurrent", Tag=0x00000001, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="numberOfRinses", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="maxRinses", Tag=0x00000003, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfRinses", Tag=0x00000002, Type=typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]), + ClusterObjectFieldDescriptor(Label="supportedRinses", Tag=0x00000003, Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -15705,8 +15705,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: spinSpeeds: 'typing.Optional[typing.List[str]]' = None spinSpeedCurrent: 'typing.Union[None, Nullable, uint]' = None - numberOfRinses: 'typing.Union[None, Nullable, uint]' = None - maxRinses: 'typing.Optional[uint]' = None + numberOfRinses: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None + supportedRinses: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -15714,6 +15714,18 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Enums: + class NumberOfRinsesEnum(MatterIntEnum): + kNone = 0x00 + kNormal = 0x01 + kExtra = 0x02 + kMax = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + class Bitmaps: class Feature(IntFlag): kSpin = 0x1 @@ -15764,12 +15776,12 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]) - value: 'typing.Union[None, Nullable, uint]' = None + value: 'typing.Optional[LaundryWasherControls.Enums.NumberOfRinsesEnum]' = None @dataclass - class MaxRinses(ClusterAttributeDescriptor): + class SupportedRinses(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0053 @@ -15780,9 +15792,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[typing.List[LaundryWasherControls.Enums.NumberOfRinsesEnum]]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @@ -17956,6 +17968,267 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) +@dataclass +class DishwasherAlarm(Cluster): + id: typing.ClassVar[int] = 0x005D + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mask", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="latch", Tag=0x00000001, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="state", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="supported", Tag=0x00000003, Type=uint), + ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), + ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), + ]) + + mask: 'uint' = None + latch: 'typing.Optional[uint]' = None + state: 'uint' = None + supported: 'uint' = None + generatedCommandList: 'typing.List[uint]' = None + acceptedCommandList: 'typing.List[uint]' = None + eventList: 'typing.List[uint]' = None + attributeList: 'typing.List[uint]' = None + featureMap: 'uint' = None + clusterRevision: 'uint' = None + + class Bitmaps: + class AlarmMap(IntFlag): + kInflowError = 0x1 + kDrainError = 0x2 + kDoorError = 0x4 + kTempTooLow = 0x8 + kTempTooHigh = 0x10 + kWaterLevelError = 0x20 + + class Commands: + @dataclass + class Reset(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x005D + command_id: typing.ClassVar[int] = 0x00000000 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="alarms", Tag=0, Type=uint), + ]) + + alarms: 'uint' = 0 + + @dataclass + class ModifyEnabledAlarms(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x005D + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="mask", Tag=0, Type=uint), + ]) + + mask: 'uint' = 0 + + class Attributes: + @dataclass + class Mask(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class Latch(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class State(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000002 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class Supported(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class GeneratedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF8 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFF9 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class EventList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFA + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class AttributeList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFB + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + + value: 'typing.List[uint]' = field(default_factory=lambda: []) + + @dataclass + class FeatureMap(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFC + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class ClusterRevision(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000FFFD + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + class Events: + @dataclass + class Notify(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x005D + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="active", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="inactive", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="state", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="mask", Tag=3, Type=uint), + ]) + + active: 'uint' = 0 + inactive: 'uint' = 0 + state: 'uint' = 0 + mask: 'uint' = 0 + + @dataclass class OperationalState(Cluster): id: typing.ClassVar[int] = 0x0060 diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index a9069957076878..00e1106f583134 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -7443,6 +7443,7 @@ RefrigeratorAlarm: - Mask - State + - Supported - GeneratedCommandList - AcceptedCommandList - AttributeList @@ -8390,8 +8391,9 @@ - RVCRunMode - RVCCleanMode - DishwasherMode - - WasherControls + - LaundryWasherControls - RVCOperationalState + - DishwasherAlarm # Once we actually unmark TimeSynchronization as provisional, all these bits should go away too, and we should instead # mark things as introduced/deprecated as needed. The "ids" entries should go away, in particular. ids: diff --git a/src/darwin/Framework/CHIPTests/MTRControllerTests.m b/src/darwin/Framework/CHIPTests/MTRControllerTests.m index 63a5baf32b64d5..e7a18bcb13804f 100644 --- a/src/darwin/Framework/CHIPTests/MTRControllerTests.m +++ b/src/darwin/Framework/CHIPTests/MTRControllerTests.m @@ -1524,6 +1524,8 @@ - (void)testControllerCATs [controller shutdown]; XCTAssertFalse([controller isRunning]); + fprintf(stderr, "DOING TOO LONG TEST\n"); + // // Trying to bring up the same fabric with too-long CATs should fail, if we // are taking the provided CATs into account. @@ -1534,6 +1536,8 @@ - (void)testControllerCATs controller = [factory createControllerOnExistingFabric:params error:nil]; XCTAssertNil(controller); + fprintf(stderr, "DOING INVALID TEST\n"); + // // Trying to bring up the same fabric with invalid CATs should fail, if we // are taking the provided CATs into account. @@ -1541,9 +1545,12 @@ - (void)testControllerCATs params.nodeID = @(17); params.operationalKeypair = operationalKeys; params.caseAuthenticatedTags = invalidCATs; + fprintf(stderr, "BRINGING UP CONTROLLER\n"); controller = [factory createControllerOnExistingFabric:params error:nil]; + fprintf(stderr, "CONTROLLER SHOULD BE NIL\n"); XCTAssertNil(controller); + fprintf(stderr, "STOPPING FACTORY\n"); [factory stopControllerFactory]; XCTAssertFalse([factory isRunning]); } diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 3350100d208491..03c94bc395960b 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -1576,6 +1576,7 @@ CONFIG_BUILD_FOR_HOST_UNIT_TEST, CONFIG_USE_LOCAL_STORAGE, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", + "CONFIG_USE_INTERACTIVE_MODE=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples/darwin-framework-tool", @@ -1595,6 +1596,10 @@ "$(CHIP_ROOT)/examples/chip-tool/commands/clusters", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path", + "$(BUILT_PRODUCTS_DIR)", + ); "LIBRARY_SEARCH_PATHS[arch=*]" = ( "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", @@ -1625,6 +1630,7 @@ CONFIG_BUILD_FOR_HOST_UNIT_TEST, CONFIG_USE_LOCAL_STORAGE, "CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1", + "CONFIG_USE_INTERACTIVE_MODE=1", ); "HEADER_SEARCH_PATHS[arch=*]" = ( "$(CHIP_ROOT)/examples//darwin-framework-tool", @@ -1645,6 +1651,10 @@ "$(CHIP_ROOT)/examples/chip-tool", "$(CHIP_ROOT)/zzz_generated/chip-tool", ); + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path", + "$(BUILT_PRODUCTS_DIR)", + ); "LIBRARY_SEARCH_PATHS[arch=*]" = ( "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/lib", "$(CONFIGURATION_TEMP_DIR)/Matter.build/out/obj/src/app/lib", diff --git a/src/python_testing/TestMatterTestingSupport.py b/src/python_testing/TestMatterTestingSupport.py index 59476e033d4a52..8762e9d8ff15bc 100644 --- a/src/python_testing/TestMatterTestingSupport.py +++ b/src/python_testing/TestMatterTestingSupport.py @@ -21,9 +21,9 @@ import chip.clusters as Clusters from chip.clusters.Types import Nullable, NullValue from chip.tlv import uint -from matter_testing_support import (MatterBaseTest, async_test_body, default_matter_test_main, parse_pics, type_matches, - utc_time_in_matter_epoch) -from mobly import asserts +from matter_testing_support import (MatterBaseTest, async_test_body, compare_time, default_matter_test_main, parse_pics, + type_matches, utc_time_in_matter_epoch) +from mobly import asserts, signals def get_raw_type_list(): @@ -157,6 +157,33 @@ async def test_pics_support(self): except ValueError: pass + def test_time_compare_function(self): + # only offset, exact match + compare_time(received=1000, offset=timedelta(microseconds=1000), utc=0, tolerance=timedelta()) + # only utc, exact match + compare_time(received=1000, offset=timedelta(), utc=1000, tolerance=timedelta()) + # both, exact match + compare_time(received=2000, offset=timedelta(microseconds=1000), utc=1000, tolerance=timedelta()) + # both, negative offset + compare_time(received=0, offset=timedelta(microseconds=-1000), utc=1000, tolerance=timedelta()) + + # Exact match, within delta, both + compare_time(received=2000, offset=timedelta(microseconds=1000), utc=1000, tolerance=timedelta(seconds=5)) + + # Just inside tolerance + compare_time(received=1001, offset=timedelta(), utc=2000, tolerance=timedelta(microseconds=1000)) + + # Just outside tolerance + try: + compare_time(received=999, offset=timedelta(), utc=2000, tolerance=timedelta(microseconds=1000)) + asserts.fail("Expected failure case for time just outside of the tolerance failed") + except signals.TestFailure: + pass + + # everything in the seconds range + compare_time(received=timedelta(seconds=3600).total_seconds() * 1000000, + offset=timedelta(seconds=3605), utc=0, tolerance=timedelta(seconds=5)) + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 9f72c6af858784..d3e768c806e84e 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -188,10 +188,11 @@ def compare_time(received: int, offset: timedelta = timedelta(), utc: int = None if utc is None: utc = utc_time_in_matter_epoch() - expected = utc + offset.microseconds + # total seconds includes fractional for microseconds + expected = utc + offset.total_seconds()*1000000 delta_us = abs(expected - received) delta = timedelta(microseconds=delta_us) - asserts.assert_less(delta, tolerance, "Received time is out of tolerance") + asserts.assert_less_equal(delta, tolerance, "Received time is out of tolerance") @dataclass diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index d5f4039227a896..63b50b56cd1709 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit d5f4039227a896db6886fc552993953f8f6dff6a +Subproject commit 63b50b56cd17092f6a43f1526969cac3919474df diff --git a/third_party/openthread/repo b/third_party/openthread/repo index 36b1b838d9416d..434ea2c0d0acb8 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit 36b1b838d9416d46765fb60610db59bb433a3ce7 +Subproject commit 434ea2c0d0acb8379df1499bdf8fae8bf0f9a222 diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 45b1073516c7f9..4e9bb2b06e3b34 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 45b1073516c7f9bd949f1004505abc89f31abbd4 +Subproject commit 4e9bb2b06e3b34981ba3064a8a496dd573c6f0b8 diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 9d40a30973a38d..893fb06b852f32 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -7656,7 +7656,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeedCurrent { @@ -7666,7 +7666,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -7688,7 +7688,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -7697,7 +7697,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -7714,65 +7714,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NumberOfRinses { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) { - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace NumberOfRinses - -namespace MaxRinses { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7781,9 +7728,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -7791,10 +7738,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace MaxRinses +} // namespace NumberOfRinses namespace FeatureMap { @@ -7803,7 +7750,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7822,7 +7769,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -7834,7 +7781,7 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WasherControls::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -7853,13 +7800,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { @@ -9430,6 +9377,198 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +namespace Attributes { + +namespace Mask { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Mask + +namespace Latch { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Latch + +namespace State { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace State + +namespace Supported { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) +{ + using Traits = NumericAttributeTraits>; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) +{ + using Traits = NumericAttributeTraits>; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace Supported + +namespace FeatureMap { + +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DishwasherAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherAlarm + namespace OperationalState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 775425d4a0a93d..3a6170ec8d2680 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -1452,7 +1452,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeedCurrent { @@ -1463,17 +1463,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace SpinSpeedCurrent namespace NumberOfRinses { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value); // NumberOfRinsesEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); } // namespace NumberOfRinses -namespace MaxRinses { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace MaxRinses - namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); @@ -1485,7 +1479,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { @@ -1767,6 +1761,42 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace Attributes } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +namespace Attributes { + +namespace Mask { +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace Mask + +namespace Latch { +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace Latch + +namespace State { +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace State + +namespace Supported { +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value); // AlarmMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); +} // namespace Supported + +namespace FeatureMap { +EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +} // namespace FeatureMap + +namespace ClusterRevision { +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherAlarm + namespace OperationalState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 8a1dc67b15eeef..e71de4f5854f5e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -385,13 +385,13 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpoint); */ void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Init +/** @brief Laundry Washer Controls Cluster Init * * Cluster Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterInitCallback(chip::EndpointId endpoint); /** @brief RVC Run Mode Cluster Init * @@ -449,6 +449,14 @@ void emberAfAirQualityClusterInitCallback(chip::EndpointId endpoint); */ void emberAfSmokeCoAlarmClusterInitCallback(chip::EndpointId endpoint); +/** @brief Dishwasher Alarm Cluster Init + * + * Cluster Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherAlarmClusterInitCallback(chip::EndpointId endpoint); + /** @brief Operational State Cluster Init * * Cluster Init @@ -4486,42 +4494,42 @@ void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterServerTickCall void emberAfRefrigeratorAndTemperatureControlledCabinetModeClusterClientTickCallback(chip::EndpointId endpoint); // -// Washer Controls Cluster +// Laundry Washer Controls Cluster // -/** @brief Washer Controls Cluster Server Init +/** @brief Laundry Washer Controls Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Server Shutdown +/** @brief Laundry Washer Controls Cluster Server Shutdown * * Server Shutdown * * @param endpoint Endpoint that is being shutdown */ -void MatterWasherControlsClusterServerShutdownCallback(chip::EndpointId endpoint); +void MatterLaundryWasherControlsClusterServerShutdownCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Client Init +/** @brief Laundry Washer Controls Cluster Client Init * * Client Init * * @param endpoint Endpoint that is being initialized */ -void emberAfWasherControlsClusterClientInitCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterClientInitCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Server Attribute Changed +/** @brief Laundry Washer Controls Cluster Server Attribute Changed * * Server Attribute Changed * * @param attributePath Concrete attribute path that changed */ -void MatterWasherControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); +void MatterLaundryWasherControlsClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); -/** @brief Washer Controls Cluster Server Pre Attribute Changed +/** @brief Laundry Washer Controls Cluster Server Pre Attribute Changed * * Server Pre Attribute Changed * @@ -4530,11 +4538,10 @@ void MatterWasherControlsClusterServerAttributeChangedCallback(const chip::app:: * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status -MatterWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +chip::Protocols::InteractionModel::Status MatterLaundryWasherControlsClusterServerPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Washer Controls Cluster Client Pre Attribute Changed +/** @brief Laundry Washer Controls Cluster Client Pre Attribute Changed * * Client Pre Attribute Changed * @@ -4543,25 +4550,24 @@ MatterWasherControlsClusterServerPreAttributeChangedCallback(const chip::app::Co * @param size Attribute size * @param value Attribute value */ -chip::Protocols::InteractionModel::Status -MatterWasherControlsClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); +chip::Protocols::InteractionModel::Status MatterLaundryWasherControlsClusterClientPreAttributeChangedCallback( + const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); -/** @brief Washer Controls Cluster Server Tick +/** @brief Laundry Washer Controls Cluster Server Tick * * Server Tick * * @param endpoint Endpoint that is being served */ -void emberAfWasherControlsClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterServerTickCallback(chip::EndpointId endpoint); -/** @brief Washer Controls Cluster Client Tick +/** @brief Laundry Washer Controls Cluster Client Tick * * Client Tick * * @param endpoint Endpoint that is being served */ -void emberAfWasherControlsClusterClientTickCallback(chip::EndpointId endpoint); +void emberAfLaundryWasherControlsClusterClientTickCallback(chip::EndpointId endpoint); // // RVC Run Mode Cluster @@ -5107,6 +5113,84 @@ void emberAfSmokeCoAlarmClusterServerTickCallback(chip::EndpointId endpoint); */ void emberAfSmokeCoAlarmClusterClientTickCallback(chip::EndpointId endpoint); +// +// Dishwasher Alarm Cluster +// + +/** @brief Dishwasher Alarm Cluster Server Init + * + * Server Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherAlarmClusterServerInitCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Alarm Cluster Server Shutdown + * + * Server Shutdown + * + * @param endpoint Endpoint that is being shutdown + */ +void MatterDishwasherAlarmClusterServerShutdownCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Alarm Cluster Client Init + * + * Client Init + * + * @param endpoint Endpoint that is being initialized + */ +void emberAfDishwasherAlarmClusterClientInitCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Alarm Cluster Server Attribute Changed + * + * Server Attribute Changed + * + * @param attributePath Concrete attribute path that changed + */ +void MatterDishwasherAlarmClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); + +/** @brief Dishwasher Alarm Cluster Server Pre Attribute Changed + * + * Server Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterDishwasherAlarmClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Dishwasher Alarm Cluster Client Pre Attribute Changed + * + * Client Pre Attribute Changed + * + * @param attributePath Concrete attribute path to be changed + * @param attributeType Attribute type + * @param size Attribute size + * @param value Attribute value + */ +chip::Protocols::InteractionModel::Status +MatterDishwasherAlarmClusterClientPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, + EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); + +/** @brief Dishwasher Alarm Cluster Server Tick + * + * Server Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDishwasherAlarmClusterServerTickCallback(chip::EndpointId endpoint); + +/** @brief Dishwasher Alarm Cluster Client Tick + * + * Client Tick + * + * @param endpoint Endpoint that is being served + */ +void emberAfDishwasherAlarmClusterClientTickCallback(chip::EndpointId endpoint); + // // Operational State Cluster // @@ -11759,6 +11843,18 @@ bool emberAfDishwasherModeClusterChangeToModeCallback( bool emberAfSmokeCoAlarmClusterSelfTestRequestCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::DecodableType & commandData); +/** + * @brief Dishwasher Alarm Cluster Reset Command callback (from client) + */ +bool emberAfDishwasherAlarmClusterResetCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DishwasherAlarm::Commands::Reset::DecodableType & commandData); +/** + * @brief Dishwasher Alarm Cluster ModifyEnabledAlarms Command callback (from client) + */ +bool emberAfDishwasherAlarmClusterModifyEnabledAlarmsCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::DecodableType & commandData); /** * @brief Operational State Cluster Pause Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 4db5f488faf6aa..29e512d7077f65 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1265,6 +1265,21 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(RefrigeratorAndTemperat } } +static auto __attribute__((unused)) EnsureKnownEnumValue(LaundryWasherControls::NumberOfRinsesEnum val) +{ + using EnumType = LaundryWasherControls::NumberOfRinsesEnum; + switch (val) + { + case EnumType::kNone: + case EnumType::kNormal: + case EnumType::kExtra: + case EnumType::kMax: + return val; + default: + return static_cast(4); + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(RvcRunMode::ModeTag val) { using EnumType = RvcRunMode::ModeTag; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 121eaeae62f0ed..68f1155d5433d0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -1519,7 +1519,21 @@ enum class Feature : uint32_t }; } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { + +// Enum for NumberOfRinsesEnum +enum class NumberOfRinsesEnum : uint8_t +{ + kNone = 0x00, + kNormal = 0x01, + kExtra = 0x02, + kMax = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; // Bitmap for Feature enum class Feature : uint32_t @@ -1527,7 +1541,7 @@ enum class Feature : uint32_t kSpin = 0x1, kRinse = 0x2, }; -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { @@ -1765,6 +1779,20 @@ enum class Feature : uint32_t }; } // namespace SmokeCoAlarm +namespace DishwasherAlarm { + +// Bitmap for AlarmMap +enum class AlarmMap : uint32_t +{ + kInflowError = 0x1, + kDrainError = 0x2, + kDoorError = 0x4, + kTempTooLow = 0x8, + kTempTooHigh = 0x10, + kWaterLevelError = 0x20, +}; +} // namespace DishwasherAlarm + namespace OperationalState { // Enum for ErrorStateEnum diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index c702047822a7d8..edf1be6ff666ef 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -11870,7 +11870,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Commands {} // namespace Commands @@ -11888,8 +11888,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre case Attributes::NumberOfRinses::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, numberOfRinses)); break; - case Attributes::MaxRinses::TypeInfo::GetAttributeId(): - ReturnErrorOnFailure(DataModel::Decode(reader, maxRinses)); + case Attributes::SupportedRinses::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supportedRinses)); break; case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); @@ -11919,7 +11919,7 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Structs {} // namespace Structs @@ -13021,6 +13021,181 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace SmokeCoAlarm +namespace DishwasherAlarm { + +namespace Commands { +namespace Reset { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kAlarms), alarms)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kAlarms): + ReturnErrorOnFailure(DataModel::Decode(reader, alarms)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace Reset. +namespace ModifyEnabledAlarms { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kMask): + ReturnErrorOnFailure(DataModel::Decode(reader, mask)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace ModifyEnabledAlarms. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + case Attributes::Mask::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, mask)); + break; + case Attributes::Latch::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, latch)); + break; + case Attributes::State::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, state)); + break; + case Attributes::Supported::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, supported)); + break; + case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, generatedCommandList)); + break; + case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, acceptedCommandList)); + break; + case Attributes::EventList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, eventList)); + break; + case Attributes::AttributeList::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeList)); + break; + case Attributes::FeatureMap::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, featureMap)); + break; + case Attributes::ClusterRevision::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterRevision)); + break; + default: + break; + } + + return CHIP_NO_ERROR; +} +} // namespace Attributes + +namespace Events { +namespace Notify { +CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kActive), active)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kInactive), inactive)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kState), state)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(Fields::kMask), mask)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVType outer; + VerifyOrReturnError(TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + if (!TLV::IsContextTag(reader.GetTag())) + { + continue; + } + switch (TLV::TagNumFromTag(reader.GetTag())) + { + case to_underlying(Fields::kActive): + ReturnErrorOnFailure(DataModel::Decode(reader, active)); + break; + case to_underlying(Fields::kInactive): + ReturnErrorOnFailure(DataModel::Decode(reader, inactive)); + break; + case to_underlying(Fields::kState): + ReturnErrorOnFailure(DataModel::Decode(reader, state)); + break; + case to_underlying(Fields::kMask): + ReturnErrorOnFailure(DataModel::Decode(reader, mask)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + return CHIP_NO_ERROR; +} +} // namespace Notify. +} // namespace Events + +} // namespace DishwasherAlarm namespace OperationalState { namespace Structs {} // namespace Structs @@ -28199,6 +28374,13 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } + case Clusters::DishwasherAlarm::Id: { + switch (aCommand) + { + default: + return false; + } + } case Clusters::OperationalState::Id: { switch (aCommand) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index fded9ec775c322..3b906f74c4e5ca 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -14719,7 +14719,7 @@ struct TypeInfo }; } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { @@ -14730,7 +14730,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14742,7 +14742,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -14750,61 +14750,62 @@ struct TypeInfo namespace NumberOfRinses { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; + using DecodableArgType = chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace NumberOfRinses -namespace MaxRinses { +namespace SupportedRinses { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxRinses::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxRinses +} // namespace SupportedRinses namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } }; } // namespace ClusterRevision @@ -14812,14 +14813,15 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); Attributes::SpinSpeeds::TypeInfo::DecodableType spinSpeeds; Attributes::SpinSpeedCurrent::TypeInfo::DecodableType spinSpeedCurrent; - Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses; - Attributes::MaxRinses::TypeInfo::DecodableType maxRinses = static_cast(0); + Attributes::NumberOfRinses::TypeInfo::DecodableType numberOfRinses = + static_cast(0); + Attributes::SupportedRinses::TypeInfo::DecodableType supportedRinses; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -14829,7 +14831,7 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; @@ -16427,6 +16429,247 @@ struct DecodableType } // namespace AllClear } // namespace Events } // namespace SmokeCoAlarm +namespace DishwasherAlarm { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace Reset { +struct Type; +struct DecodableType; +} // namespace Reset + +namespace ModifyEnabledAlarms { +struct Type; +struct DecodableType; +} // namespace ModifyEnabledAlarms + +} // namespace Commands + +namespace Commands { +namespace Reset { +enum class Fields : uint8_t +{ + kAlarms = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask alarms = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Reset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask alarms = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Reset +namespace ModifyEnabledAlarms { +enum class Fields : uint8_t +{ + kMask = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ModifyEnabledAlarms::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask mask = static_cast>(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ModifyEnabledAlarms +} // namespace Commands + +namespace Attributes { + +namespace Mask { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Mask +namespace Latch { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Latch::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Latch +namespace State { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace State +namespace Supported { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Supported +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Mask::TypeInfo::DecodableType mask = + static_cast>(0); + Attributes::Latch::TypeInfo::DecodableType latch = + static_cast>(0); + Attributes::State::TypeInfo::DecodableType state = + static_cast>(0); + Attributes::Supported::TypeInfo::DecodableType supported = + static_cast>(0); + Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; + Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; + Attributes::EventList::TypeInfo::DecodableType eventList; + Attributes::AttributeList::TypeInfo::DecodableType attributeList; + Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); + Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); + }; +}; +} // namespace Attributes +namespace Events { +namespace Notify { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kActive = 0, + kInactive = 1, + kState = 2, + kMask = 3, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Notify::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } + + chip::BitMask active = static_cast>(0); + chip::BitMask inactive = static_cast>(0); + chip::BitMask state = static_cast>(0); + chip::BitMask mask = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Notify +} // namespace Events +} // namespace DishwasherAlarm namespace OperationalState { namespace Structs { namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 8e5a2b524c5f31..fee87ccb33989c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2559,7 +2559,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeeds { @@ -2574,9 +2574,9 @@ namespace NumberOfRinses { static constexpr AttributeId Id = 0x00000002; } // namespace NumberOfRinses -namespace MaxRinses { +namespace SupportedRinses { static constexpr AttributeId Id = 0x00000003; -} // namespace MaxRinses +} // namespace SupportedRinses namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; @@ -2603,7 +2603,7 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace ClusterRevision } // namespace Attributes -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { namespace Attributes { @@ -2955,6 +2955,52 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +namespace Attributes { + +namespace Mask { +static constexpr AttributeId Id = 0x00000000; +} // namespace Mask + +namespace Latch { +static constexpr AttributeId Id = 0x00000001; +} // namespace Latch + +namespace State { +static constexpr AttributeId Id = 0x00000002; +} // namespace State + +namespace Supported { +static constexpr AttributeId Id = 0x00000003; +} // namespace Supported + +namespace GeneratedCommandList { +static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; +} // namespace GeneratedCommandList + +namespace AcceptedCommandList { +static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id; +} // namespace AcceptedCommandList + +namespace EventList { +static constexpr AttributeId Id = Globals::Attributes::EventList::Id; +} // namespace EventList + +namespace AttributeList { +static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id; +} // namespace AttributeList + +namespace FeatureMap { +static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id; +} // namespace FeatureMap + +namespace ClusterRevision { +static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace DishwasherAlarm + namespace OperationalState { namespace Attributes { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h index 9be3dacbbae75d..2a5feb503189de 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h @@ -157,9 +157,9 @@ static constexpr ClusterId Id = 0x00000051; namespace RefrigeratorAndTemperatureControlledCabinetMode { static constexpr ClusterId Id = 0x00000052; } // namespace RefrigeratorAndTemperatureControlledCabinetMode -namespace WasherControls { +namespace LaundryWasherControls { static constexpr ClusterId Id = 0x00000053; -} // namespace WasherControls +} // namespace LaundryWasherControls namespace RvcRunMode { static constexpr ClusterId Id = 0x00000054; } // namespace RvcRunMode @@ -181,6 +181,9 @@ static constexpr ClusterId Id = 0x0000005B; namespace SmokeCoAlarm { static constexpr ClusterId Id = 0x0000005C; } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +static constexpr ClusterId Id = 0x0000005D; +} // namespace DishwasherAlarm namespace OperationalState { static constexpr ClusterId Id = 0x00000060; } // namespace OperationalState diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index f81eea1404fb8a..4214a21b46efbb 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -731,6 +731,20 @@ static constexpr CommandId Id = 0x00000000; } // namespace Commands } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +namespace Commands { + +namespace Reset { +static constexpr CommandId Id = 0x00000000; +} // namespace Reset + +namespace ModifyEnabledAlarms { +static constexpr CommandId Id = 0x00000001; +} // namespace ModifyEnabledAlarms + +} // namespace Commands +} // namespace DishwasherAlarm + namespace OperationalState { namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h index 65d06ed3442de0..4f8f77d84168e8 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h @@ -327,6 +327,16 @@ static constexpr EventId Id = 0x0000000A; } // namespace Events } // namespace SmokeCoAlarm +namespace DishwasherAlarm { +namespace Events { + +namespace Notify { +static constexpr EventId Id = 0x00000000; +} // namespace Notify + +} // namespace Events +} // namespace DishwasherAlarm + namespace OperationalState { namespace Events { diff --git a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h index 59c7a06a25bdbb..ee050bcdd18c08 100644 --- a/zzz_generated/app-common/app-common/zap-generated/print-cluster.h +++ b/zzz_generated/app-common/app-common/zap-generated/print-cluster.h @@ -307,10 +307,11 @@ #define CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER #endif -#if defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_WASHER_CONTROLS_CLUSTER_CLIENT) -#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER { chip::app::Clusters::WasherControls::Id, "Washer Controls" }, +#if defined(ZCL_USING_LAUNDRY_WASHER_CONTROLS_CLUSTER_SERVER) || defined(ZCL_USING_LAUNDRY_WASHER_CONTROLS_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER \ + { chip::app::Clusters::LaundryWasherControls::Id, "Laundry Washer Controls" }, #else -#define CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER +#define CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER #endif #if defined(ZCL_USING_RVC_RUN_MODE_CLUSTER_SERVER) || defined(ZCL_USING_RVC_RUN_MODE_CLUSTER_CLIENT) @@ -355,6 +356,12 @@ #define CHIP_PRINTCLUSTER_SMOKE_CO_ALARM_CLUSTER #endif +#if defined(ZCL_USING_DISHWASHER_ALARM_CLUSTER_SERVER) || defined(ZCL_USING_DISHWASHER_ALARM_CLUSTER_CLIENT) +#define CHIP_PRINTCLUSTER_DISHWASHER_ALARM_CLUSTER { chip::app::Clusters::DishwasherAlarm::Id, "Dishwasher Alarm" }, +#else +#define CHIP_PRINTCLUSTER_DISHWASHER_ALARM_CLUSTER +#endif + #if defined(ZCL_USING_OPERATIONAL_STATE_CLUSTER_SERVER) || defined(ZCL_USING_OPERATIONAL_STATE_CLUSTER_CLIENT) #define CHIP_PRINTCLUSTER_OPERATIONAL_STATE_CLUSTER { chip::app::Clusters::OperationalState::Id, "Operational State" }, #else @@ -973,7 +980,7 @@ CHIP_PRINTCLUSTER_MODE_SELECT_CLUSTER \ CHIP_PRINTCLUSTER_LAUNDRY_WASHER_MODE_CLUSTER \ CHIP_PRINTCLUSTER_REFRIGERATOR_AND_TEMPERATURE_CONTROLLED_CABINET_MODE_CLUSTER \ - CHIP_PRINTCLUSTER_WASHER_CONTROLS_CLUSTER \ + CHIP_PRINTCLUSTER_LAUNDRY_WASHER_CONTROLS_CLUSTER \ CHIP_PRINTCLUSTER_RVC_RUN_MODE_CLUSTER \ CHIP_PRINTCLUSTER_RVC_CLEAN_MODE_CLUSTER \ CHIP_PRINTCLUSTER_TEMPERATURE_CONTROL_CLUSTER \ @@ -981,6 +988,7 @@ CHIP_PRINTCLUSTER_DISHWASHER_MODE_CLUSTER \ CHIP_PRINTCLUSTER_AIR_QUALITY_CLUSTER \ CHIP_PRINTCLUSTER_SMOKE_CO_ALARM_CLUSTER \ + CHIP_PRINTCLUSTER_DISHWASHER_ALARM_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_CLUSTER \ CHIP_PRINTCLUSTER_OPERATIONAL_STATE_RVC_CLUSTER \ CHIP_PRINTCLUSTER_HEPA_FILTER_MONITORING_CLUSTER \ diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index cf8ff0e172bc26..b25e9cc931ff6e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -76,7 +76,7 @@ | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | -| WasherControls | 0x0053 | +| LaundryWasherControls | 0x0053 | | RvcRunMode | 0x0054 | | RvcCleanMode | 0x0055 | | TemperatureControl | 0x0056 | @@ -84,6 +84,7 @@ | DishwasherMode | 0x0059 | | AirQuality | 0x005B | | SmokeCoAlarm | 0x005C | +| DishwasherAlarm | 0x005D | | OperationalState | 0x0060 | | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 | @@ -4188,7 +4189,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust }; /*----------------------------------------------------------------------------*\ -| Cluster WasherControls | 0x0053 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -4196,7 +4197,7 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust | * SpinSpeeds | 0x0000 | | * SpinSpeedCurrent | 0x0001 | | * NumberOfRinses | 0x0002 | -| * MaxRinses | 0x0003 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4523,6 +4524,90 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster DishwasherAlarm | 0x005D | +|------------------------------------------------------------------------------| +| Commands: | | +| * Reset | 0x00 | +| * ModifyEnabledAlarms | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Mask | 0x0000 | +| * Latch | 0x0001 | +| * State | 0x0002 | +| * Supported | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Notify | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/* + * Command Reset + */ +class DishwasherAlarmReset : public ClusterCommand +{ +public: + DishwasherAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", credsIssuerConfig) + { + AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000000) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005D, 0x00000000, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000000) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005D, 0x00000000, mRequest); + } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; +}; + +/* + * Command ModifyEnabledAlarms + */ +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand +{ +public: + DishwasherAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("modify-enabled-alarms", credsIssuerConfig) + { + AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000001) on endpoint %u", endpointIds.at(0)); + + return ClusterCommand::SendCommand(device, endpointIds.at(0), 0x0000005D, 0x00000001, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000005D) command (0x00000001) on Group %u", groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, 0x0000005D, 0x00000001, mRequest); + } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| @@ -14762,11 +14847,11 @@ void registerClusterRefrigeratorAndTemperatureControlledCabinetMode(Commands & c commands.Register(clusterName, clusterCommands); } -void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterLaundryWasherControls(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::WasherControls; + using namespace chip::app::Clusters::LaundryWasherControls; - const char * clusterName = "WasherControls"; + const char * clusterName = "LaundryWasherControls"; commands_list clusterCommands = { // @@ -14780,7 +14865,7 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -14793,10 +14878,11 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique>>(Id, "spin-speed-current", 0, UINT8_MAX, Attributes::SpinSpeedCurrent::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( + make_unique>( Id, "number-of-rinses", 0, UINT8_MAX, Attributes::NumberOfRinses::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "max-rinses", 0, UINT8_MAX, Attributes::MaxRinses::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-rinses", Attributes::SupportedRinses::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -14814,7 +14900,7 @@ void registerClusterWasherControls(Commands & commands, CredentialIssuerCommands make_unique(Id, "spin-speeds", Attributes::SpinSpeeds::Id, credsIssuerConfig), // make_unique(Id, "spin-speed-current", Attributes::SpinSpeedCurrent::Id, credsIssuerConfig), // make_unique(Id, "number-of-rinses", Attributes::NumberOfRinses::Id, credsIssuerConfig), // - make_unique(Id, "max-rinses", Attributes::MaxRinses::Id, credsIssuerConfig), // + make_unique(Id, "supported-rinses", Attributes::SupportedRinses::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15372,6 +15458,77 @@ void registerClusterSmokeCoAlarm(Commands & commands, CredentialIssuerCommands * commands.Register(clusterName, clusterCommands); } +void registerClusterDishwasherAlarm(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +{ + using namespace chip::app::Clusters::DishwasherAlarm; + + const char * clusterName = "DishwasherAlarm"; + + commands_list clusterCommands = { + // + // Commands + // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // + // + // Attributes + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + make_unique>(Id, credsIssuerConfig), // + make_unique>>( + Id, "mask", 0, UINT32_MAX, Attributes::Mask::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "latch", 0, UINT32_MAX, Attributes::Latch::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "state", 0, UINT32_MAX, Attributes::State::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported", 0, UINT32_MAX, Attributes::Supported::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "mask", Attributes::Mask::Id, credsIssuerConfig), // + make_unique(Id, "latch", Attributes::Latch::Id, credsIssuerConfig), // + make_unique(Id, "state", Attributes::State::Id, credsIssuerConfig), // + make_unique(Id, "supported", Attributes::Supported::Id, credsIssuerConfig), // + make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // + make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // + make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // + make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // + make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // + // + // Events + // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "notify", Events::Notify::Id, credsIssuerConfig), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterOperationalState(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::OperationalState; @@ -24454,7 +24611,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterModeSelect(commands, credsIssuerConfig); registerClusterLaundryWasherMode(commands, credsIssuerConfig); registerClusterRefrigeratorAndTemperatureControlledCabinetMode(commands, credsIssuerConfig); - registerClusterWasherControls(commands, credsIssuerConfig); + registerClusterLaundryWasherControls(commands, credsIssuerConfig); registerClusterRvcRunMode(commands, credsIssuerConfig); registerClusterRvcCleanMode(commands, credsIssuerConfig); registerClusterTemperatureControl(commands, credsIssuerConfig); @@ -24462,6 +24619,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterDishwasherMode(commands, credsIssuerConfig); registerClusterAirQuality(commands, credsIssuerConfig); registerClusterSmokeCoAlarm(commands, credsIssuerConfig); + registerClusterDishwasherAlarm(commands, credsIssuerConfig); registerClusterOperationalState(commands, credsIssuerConfig); registerClusterRvcOperationalState(commands, credsIssuerConfig); registerClusterHepaFilterMonitoring(commands, credsIssuerConfig); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index e66c47e327fd73..a520f57b9e31e0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3714,6 +3714,46 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Sm return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const DishwasherAlarm::Events::Notify::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Active", indent + 1, value.active); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Active'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Inactive", indent + 1, value.inactive); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Inactive'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("State", indent + 1, value.state); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'State'"); + return err; + } + } + { + CHIP_ERROR err = DataModelLogger::LogValue("Mask", indent + 1, value.mask); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Mask'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const OperationalState::Events::OperationalError::DecodableType & value) { @@ -8009,55 +8049,55 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case WasherControls::Id: { + case LaundryWasherControls::Id: { switch (path.mAttributeId) { - case WasherControls::Attributes::SpinSpeeds::Id: { + case LaundryWasherControls::Attributes::SpinSpeeds::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SpinSpeeds", 1, value); } - case WasherControls::Attributes::SpinSpeedCurrent::Id: { + case LaundryWasherControls::Attributes::SpinSpeedCurrent::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SpinSpeedCurrent", 1, value); } - case WasherControls::Attributes::NumberOfRinses::Id: { - chip::app::DataModel::Nullable value; + case LaundryWasherControls::Attributes::NumberOfRinses::Id: { + chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("NumberOfRinses", 1, value); } - case WasherControls::Attributes::MaxRinses::Id: { - uint8_t value; + case LaundryWasherControls::Attributes::SupportedRinses::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("MaxRinses", 1, value); + return DataModelLogger::LogValue("SupportedRinses", 1, value); } - case WasherControls::Attributes::GeneratedCommandList::Id: { + case LaundryWasherControls::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GeneratedCommandList", 1, value); } - case WasherControls::Attributes::AcceptedCommandList::Id: { + case LaundryWasherControls::Attributes::AcceptedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AcceptedCommandList", 1, value); } - case WasherControls::Attributes::EventList::Id: { + case LaundryWasherControls::Attributes::EventList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("EventList", 1, value); } - case WasherControls::Attributes::AttributeList::Id: { + case LaundryWasherControls::Attributes::AttributeList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AttributeList", 1, value); } - case WasherControls::Attributes::FeatureMap::Id: { + case LaundryWasherControls::Attributes::FeatureMap::Id: { uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("FeatureMap", 1, value); } - case WasherControls::Attributes::ClusterRevision::Id: { + case LaundryWasherControls::Attributes::ClusterRevision::Id: { uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ClusterRevision", 1, value); @@ -8493,6 +8533,62 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } + case DishwasherAlarm::Id: { + switch (path.mAttributeId) + { + case DishwasherAlarm::Attributes::Mask::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Mask", 1, value); + } + case DishwasherAlarm::Attributes::Latch::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Latch", 1, value); + } + case DishwasherAlarm::Attributes::State::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("State", 1, value); + } + case DishwasherAlarm::Attributes::Supported::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Supported", 1, value); + } + case DishwasherAlarm::Attributes::GeneratedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GeneratedCommandList", 1, value); + } + case DishwasherAlarm::Attributes::AcceptedCommandList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AcceptedCommandList", 1, value); + } + case DishwasherAlarm::Attributes::EventList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("EventList", 1, value); + } + case DishwasherAlarm::Attributes::AttributeList::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("AttributeList", 1, value); + } + case DishwasherAlarm::Attributes::FeatureMap::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("FeatureMap", 1, value); + } + case DishwasherAlarm::Attributes::ClusterRevision::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ClusterRevision", 1, value); + } + } + break; + } case OperationalState::Id: { switch (path.mAttributeId) { @@ -17050,6 +17146,17 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case DishwasherAlarm::Id: { + switch (header.mPath.mEventId) + { + case DishwasherAlarm::Events::Notify::Id: { + chip::app::Clusters::DishwasherAlarm::Events::Notify::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Notify", 1, value); + } + } + break; + } case OperationalState::Id: { switch (header.mPath.mEventId) { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index c259176393d7f8..c5a27058990bb3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -332,6 +332,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::SmokeCoAlarm::Events::InterconnectCOAlarm::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::SmokeCoAlarm::Events::AllClear::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::DishwasherAlarm::Events::Notify::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::OperationalState::Events::OperationalError::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 5c26e91d4e1764..61f12b52a9de60 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -79,7 +79,7 @@ | ModeSelect | 0x0050 | | LaundryWasherMode | 0x0051 | | RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | -| WasherControls | 0x0053 | +| LaundryWasherControls | 0x0053 | | RvcRunMode | 0x0054 | | RvcCleanMode | 0x0055 | | TemperatureControl | 0x0056 | @@ -87,6 +87,7 @@ | DishwasherMode | 0x0059 | | AirQuality | 0x005B | | SmokeCoAlarm | 0x005C | +| DishwasherAlarm | 0x005D | | OperationalState | 0x0060 | | RvcOperationalState | 0x0061 | | HepaFilterMonitoring | 0x0071 |